ARTIFACTORY: Why am I getting “Failed to start Artifactory service” ERROR: Artifactory Tomcat server did not start in 60 seconds, tomcat will be stopped

ARTIFACTORY: Why am I getting “Failed to start Artifactory service” ERROR: Artifactory Tomcat server did not start in 60 seconds, tomcat will be stopped

AuthorFullName__c
Pranav Hegde
articleNumber
000005694
ft:sourceType
Salesforce
FirstPublishedDate
2023-04-27T15:29:10Z
lastModifiedDate
2023-04-27
VersionNumber
1

In some scenarios, we might see Artifactory failing to initialize due to the tomcat timeout issue. Below is the error you would see when journalctl -xe is executed, in such cases.

artifactory.service start operation timed out. Terminating
artifactoryManage.sh[5115]: ** ERROR: Artifactory Tomcat server did not start in 60 seconds, tomcat will be stopped. This timeout can be modified by setting
systemd[1]: artifactory.service: control process exited, code=exited status=1
 systemd[1]: Failed to start Artifactory service.
-- Subject: Unit artifactory.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit artifactory.service has failed.
--
-- The result is failed.
systemd[1]: Unit artifactory.service entered failed state.
sclpjfrgapp5004 systemd[1]: artifactory.service failed.
sclpjfrgapp5004 sudo[5107]: pam_unix(sudo:session): session closed for user root
polkitd[750]: Unregistered Authentication Agent for unix-process:5109:1336500 (system bus name :1.384, object path /org/freedesktop/PolicyKit1/Authentication

Sometimes, Artifactory might take time to initialize due to background tasks such as password encryption, backup [or] due to network latency issues against the disk being used. Since we have a default 60 seconds for tomcat startup timeout, If Artifactory is unable to start within 60 seconds, tomcat will throw the above mentioned error. As a workaround, you may tune the service start timeout in the Artifactory instance, by adding the following snippet to the Artifactory's system.yaml file (/opt/jfrog/artifactory/var/etc/). The configuration value is in seconds.
shared:
  script:
    serviceStartTimeout: 600

This will increase the threshold to 10 minutes, which should be more than enough for the Tomcat server to boot up.
NOTE: Restart of the Artifactory is required for the above mentioned configuration addition to take effect.
If you still observe a similar behavior, you may also try increasing the system's default startup timeout setting. By default, it is set to 90 seconds.
# systemctl show artifactory | grep TimeoutStartUSec
TimeoutStartUSec=1min 30s