2

I am using JFrog Artifactory OSS Docker image version 6.0.0 to create the repository in Amazon Linux. The issue I was facing is the Artifactory is not coming up. The docker container is up, but I verified the localhost logs it's showing error as

java.lang.RuntimeException: master.key file is missing - timed out while waiting for master.key after 60 seconds. Please provide it manually`

java.lang.IllegalStateException: Artifactory home not initialized`

But the starting line of localhost log shows

org.apache.catalina.core.ApplicationContext.log Using artifactory.home at '/opt/jfrog/artifactory' resolved from: System property

Any help is much appreciated as I was new to JFrog Artifactory.

Dror Bereznitsky
  • 20,048
  • 3
  • 48
  • 57
Vaisakh PS
  • 1,181
  • 2
  • 10
  • 19
  • Show how you have configured/run the container – Tarun Lalwani Jun 28 '18 at 11:19
  • This is how i ran the docker `docker run -d --name aip-jfrog-artifactory -e DB_TYPE=mysql -e DB_HOST=x.x.x.x -e DB_PORT=3306 -e DB_USER=xxxx -e DB_PASSWORD=xxxx -v ~/xxxx/mysql-connector-java-8.0.11/mysql-connector-java-8.0.11.jar:/opt/jfrog/artifactory/tomcat/lib/mysql-connector-java-8.0.11.jar -v ~/xxxx/mysql-connector-java-8.0.11/mysql-connector-java-8.0.11.jar:/opt/jfrog/artifactory/tomcat/webapps/access/WEB-INF/lib/mysql-connector-java-8.0.11.jar -v /xxxx/jfrog/artifactory:/var/opt/jfrog/artifactory --ulimit nofile=98304:98304 -p 8081:8081 docker.bintray.io/jfrog/artifactory-oss:6.0.0 ` – Vaisakh PS Jun 28 '18 at 13:13

2 Answers2

2

One of the purposes of the master.key is to make sure an Artifactory server is not connected to a DB of another Artifactory server. When starting up a new Artifactory server, this means with a clean DB, it creates the master.key. In your case, it looks like you are trying to connect to a DB that was already serving another Artifactory server.

Therefore you need to copy over the master.key (available at $ARTIFACTORY_HOME/etc/security/) from the Artifactory server that used this DB.

In case this is a new setup, you need to connect to a clean DB.

Ariel Kabov
  • 856
  • 4
  • 8
0

It could be due to the slowness of your docker host.

On my local machine, when I fire:

docker run --name artifactory -p 8081:8081 docker.bintray.io/jfrog/artifactory-oss:6.0.0

it loads everything in 27 seconds (Core i5 4th gen, 8GB RAM, no SSD)

madduci
  • 2,635
  • 1
  • 32
  • 51
  • did you verified the docker logs and catalina/localhost logs. I am using a standalone db and artifactory is pointing to that DB. – Vaisakh PS Jun 28 '18 at 13:13