Getting Access Service/Router Connectivity Issues on Startup? Try Setting the Node IP

Anand Das
2022-08-25 05:55

A relatively common issue that we have seen during startup on Artifactory 7.X are cases where the JFrog Router cannot connect to the Access Server and vice versa.

Errors in the access logs might appear as follows.
 2021-06-21T13:55:18.754Z [jfac ] [WARN ] [8c35632628b33f54] [o.j.c.ExecutionUtils:165 ] [pool-9-thread-2 ] - Retry 50 Elapsed 50.01 secs failed: Registration with router on URL http://localhost:8046 failed with error: UNAVAILABLE: io exception. Trying again
And from the router logs, you may see something like the following.
 2021-06-21T13:54:41.623Z [jfrou] [INFO ] [6439a33cdf7c481f] [join_executor.go:165 ] [main ] - Cluster join: Retry 5: Service registry ping failed, will retry. Error: Get "http://localhost:8040/access/api/v1/system/ping": context deadline exceeded

2021-06-21T13:55:20.162Z [jfrou] [FATAL] [6439a33cdf7c481f] [bootstrap.go:105 ] [main ] - Could not join access, err: cluster join: Service registry ping failed; context deadline exceeded. last error: Get "http://localhost:8040/access/api/v1/system/ping": context deadline exceeded
The most common cause for this issue is that Artifactory is using an improper IP address to refer to the server it is running on. By default on startup, Artifactory runs a process similar to the ifconfig command in UNIX based systems and then selects the first available IP address.

This behavior can be changed by explicitly setting Artifactory's node IP address in the system.yaml as follows.
 shared:
node:
ip: <Node IP Address>

Refer to the system.yaml documentation for where exactly this would be placed in your existing configuration.

https://www.jfrog.com/confluence/display/JFROG/Artifactory+System+YAML

We find that this solution works best when the chosen IP address is the server's internal IPv4 address.

If you cannot resolve this issue using an IP address, reach out to Support.