Why does my Artifactory and router fail to start up continuously?

Loren Yeung
2021-04-20 00:18

Subject
Sometimes you will see the router fail to start up after some time (15 seconds by default) – it usually complains about access not being reachable. However, looking through the access logs, you'll see it doesn't report any errors. You've narrowed down any source of network issues, OS etc without much success on this failing start up. This KB helps walk through another potential issue that your instance may be having; lingering xml files. 

Affected Versions
Artifactory 7x. Do not attempt this on Artifactory 6 and below.

Description
Artifactory will attempt to decrypt files on its file system, which can take a long time if there are many on the system. These include security.<timestamp>.xml files. You can see if this is the case by taking a few thread dumps after attempting to start artifactory, and you'll see these:
 

java.lang.Thread.State: RUNNABLE
at org.jfrog.security.crypto.JFrogBase58.divmod256(JFrogBase58.java:301)
at org.jfrog.security.crypto.JFrogBase58.decode(JFrogBase58.java:265)
at org.jfrog.security.crypto.DotParts.getPayload(DotParts.java:59)
at org.jfrog.security.crypto.JFrogEnvelop.isGoodChecksum(JFrogEnvelop.java:42)
at org.jfrog.security.crypto.EncryptionWrapperBase.decryptIfNeeded(EncryptionWrapperBase.java:83)

Resolution
Move all these security.<timestamp>.xml files outside of the etc, to another back up folder at a different location, followed by a restart. If you see these files getting repopulated after restart, you may have them within your DB/start up automation. In that case, look within your DB, and list the files inside the configs table. Check if your automation is injecting it via start up as well. We recommend contacting JFrog Support with this information after getting this!