How to resolve a “Service registry ping failed” error after an Artifactory upgrade

Andrey Granovsky
2021-01-12 17:00

In this article we will learn how to resolve an issue where Artifactory failed to start due to "Error while trying to connect to local router".

Cause of the issue
This is happening since access.xml and artifactory.xml files which should be located in $JFROG_HOME/artifactory/app/artifactory/tomcat/conf/Catalina/localhost directory are missing.
Since these files are missing, Access service is not able to start while you don't see an indication in access-service.log. In addition, you will not see any updates in tomcat log trying to start Access.

The following errors can be noticed in console.log:

failed fetching external topology from Access: bad response status: 404 Not FoundService registry ping failed, will retry. Error: Error while trying to connect to local router at address 'http://localhost:8046/access/api/v1/system/ping': Get "http://localhost:8046/access/api/v1/system/ping": dial tcp connect: connection refused [startup] 

In order to resolve the issue, you may want to perform the following steps: 

  1. Stop Artifactory service

  2. Navigate to $JFROG_HOME/artifactory/app/artifactory/tomcat/conf/Catalina/localhost directory – this directory should have two files: access.xml and artifactory.xml which responsible for Access and Artifactory startup. If they are missing:

  3. *Copy the missing files to the mentioned directory (download explanation below)

  4. Verify that the owner and group are “artifactory” for these files

  5. Start Artifactory service

*The missing files can be copied from the .tar.gz or .zip files of Artifactory (Linux/Windows download) on our download page.
Download the relevant version of Artifactory, unzip it, copy the access.xml and artifactory.xml from app/artifactory/tomcat/conf/Catalina/localhost directory.