Whenever I am trying to start my Artifactory service, I am met with the following error in console.log:
2020-12-14T14:51:32.840Z [jfrt ] [ERROR] [794f6381e66d1900] [tifactoryHomeConfigListener:59] [ocalhost-startStop-2] - Failed initializing Home. Could't establish connection with db: jdbc:derby:/opt/jfrog/artifactory/var/data/artifactory/derby;create=true 2020-12-14T14:51:32.844Z [jfrt ] [ERROR] [794f6381e66d1900] [actoryContextConfigListener:82] [ocalhost-startStop-2] - Failed initializing Artifactory context: Artifactory home not initialized.
I did download the latest derby jar available over Apache and have put it under tomcat/lib folder as well still the issue persists.
The setup was working fine since a very long time but with a sudden maintenance activity over the servers, the above mentioned error has been an uninvited guest which simply doesn't let Artifactory start.
As you have mentioned an unplanned maintenance activity caused the issue, I suspect the stale derby lock file is causing the problem here. As you might aware, Artifactory uses the embedded Derby database, it won't allow more than one connection at a time. Hence removing the lock (from /opt/jfrog/artifactory/var/data/artifactory/derby) will allow the Artifactory to make a connection with the derby. In addition to that, please don't forget to remove the downloaded derby file as Artifactory comes bundled with the required dependencies.