Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-25374

Artifactory Docker Container is crashing after start



    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 7.16.3
    • Fix Version/s: None
    • Component/s: Artifactory, Docker
    • Environment:

      current debian 10
      Docker server & client : 18.09.1 


      For more independence in future updates I've decided to install our new artifactory hosts with the jfrog docker image.

      I've followd the jfrog instruction for this: https://www.jfrog.com/confluence/display/JFROG/Installing+Artifactory

      Short what I've done:

      docker run -d \
        --name mysql \
        --network artifactory \
        --restart unless-stopped \
        -v /srv/artifactory/db/mysql:/var/lib/mysql \
        -v /srv/artifactory/db/mysql-config:/etc/mysql/conf.d \
        -e MYSQL_ROOT_PASSWORD="Top_Secret" \
        -e MYSQL_DATABASE="artifactory" \
        -e MYSQL_USER="artifactory" \
        -e MYSQL_PASSWORD="artifactory" \
      mariadb:10.5.9 --character-set-server=utf8 --collation-server=utf8_bin
      # check:
      docker run -ti --rm --network artifactory  mysql-client:latest --host mysql -uartifactory -partifactory artifactory
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 14
      Server version: 10.5.9-MariaDB-1:10.5.9+maria~focal mariadb.org binary distribution
      Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      MariaDB [artifactory]> show databases;
      | Database           |
      | artifactory        |
      | information_schema |
      2 rows in set (0.000 sec)
      MariaDB [artifactory]> show tables;
      Empty set (0.000 sec)

      My install of Artifactory itself:

      export vers=7.16.3
      docker pull releases-docker.jfrog.io/jfrog/artifactory-pro:$vers
      wget https://downloads.mariadb.com/Connectors/java/connector-java-2.7.2/mariadb-java-client-2.7.2.jar -nH
      export JFROG_HOME="/srv/artifactory/jfrog"
      mkdir -p $JFROG_HOME/artifactory/var/etc/
      touch $JFROG_HOME/artifactory/var/etc/system.yaml
      chown -R 1030 $JFROG_HOME/artifactory/var
      chmod -R 777 $JFROG_HOME/artifactory/var
      mkdir -p $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib
      cp mariadb-java-client-2.7.2.jar $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib/
      # change in default system.yaml:
      #  database:
      #    type: mariadb
      #    driver: org.mariadb.jdbc.Driver
      #    url: jdbc:mariadb://mysql:3306/artifactory?characterEncoding=UTF-8&elideSetAutoCommits=true&useSSL=false&useMysqlMetadata=true
      #    username: artifactory
      #    password: artifactory
      #  node:
      #    ip:
      cp system.yaml $JFROG_HOME/artifactory/var/etc/system.yaml
      docker run -d \
        --name artifactory \
        --network artifactory \
        -v $JFROG_HOME/artifactory/var/:/var/opt/jfrog/artifactory \
        -p 8081:8081 \
        -p 8082:8082 \

      The container starts but artifactory crashes after a few seconds with the logentry below:

      Preparing to run Artifactory in Docker
      Running as uid=1030(artifactory) gid=1030(artifactory)
      Dockerfile for this image can found inside the container.
      To view the Dockerfile: 'cat /docker/artifactory-pro/Dockerfile.artifactory'.
      Resolved shared.database.type (mariadb) from /opt/jfrog/artifactory/var/etc/system.yaml
      Resolved shared.database.url (jdbc:mariadb://mysql:3306/artifactory?characterEncoding=UTF-8&elideSetAutoCommits=true&useSSL=false&useMysqlMetadata=true) from /opt/jfrog/artifactory/var/etc/system.yaml
      Waiting for DB mariadb to be ready on mysql/3306 for 30 seconds
      Copying Artifactory bootstrap files
      2021-03-23T16:43:42.000Z [shell] [INFO ] [] [systemYamlHelper.sh:513       ] [main] - Resolved shared.node.ip ( from /opt/jfrog/artifactory/var/etc/system.yaml
      2021-03-23T16:43:42.000Z [shell] [INFO ] [] [systemYamlHelper.sh:513       ] [main] - Resolved artifactory.port (8081) from /opt/jfrog/artifactory/var/etc/system.yaml
      2021-03-23T16:43:42.000Z [shell] [INFO ] [] [systemYamlHelper.sh:513       ] [main] - Resolved artifactory.tomcat.connector.maxThreads (200) from /opt/jfrog/artifactory/var/etc/system.yaml
      2021-03-23T16:43:42.000Z [shell] [INFO ] [] [systemYamlHelper.sh:513       ] [main] - Resolved access.tomcat.connector.maxThreads (50) from /opt/jfrog/artifactory/var/etc/system.yaml
      2021-03-23T16:43:42.000Z [shell] [INFO ] [] [systemYamlHelper.sh:513       ] [main] - Resolved shared.database.type (mariadb) from /opt/jfrog/artifactory/var/etc/system.yaml
      2021-03-23T16:43:42.000Z [shell] [INFO ] [] [systemYamlHelper.sh:513       ] [main] - Resolved shared.database.url (jdbc:mariadb://mysql:3306/artifactory?characterEncoding=UTF-8&elideSetAutoCommits=true&useSSL=false&useMysqlMetadata=true) from /opt/jfrog/artifactory/var/etc/system.yaml
      2021-03-23T16:43:42.000Z [shell] [INFO ] [] [systemYamlHelper.sh:513       ] [main] - Resolved shared.database.password (__sensitive_key_hidden___) from /opt/jfrog/artifactory/var/etc/system.yaml
      2021-03-23T16:43:42.000Z [shell] [INFO ] [] [systemYamlHelper.sh:513       ] [main] - Resolved artifactory.database.maxOpenConnections (100) from /opt/jfrog/artifactory/var/etc/system.yaml
      2021-03-23T16:43:42.000Z [shell] [INFO ] [] [systemYamlHelper.sh:513       ] [main] - Resolved artifactory.database.maxIdleConnections (10) from /opt/jfrog/artifactory/var/etc/system.yaml
      2021-03-23T16:43:42.000Z [shell] [INFO ] [] [installerCommon.sh:1503       ] [main] - Checking open files and processes limits
      2021-03-23T16:43:42.000Z [shell] [INFO ] [] [installerCommon.sh:1506       ] [main] - Current max open files is 1048576
      2021-03-23T16:43:42.000Z [shell] [INFO ] [] [installerCommon.sh:1517       ] [main] - Current max open processes is unlimited
      userYaml decode failed at node .shared.database
      yaml validation failed
      2021-03-23T16:43:42.000Z [shell] [WARN ] [] [installerCommon.sh:707        ] [main] - System.yaml validation failed
      [TRACE] JDBC to MySQL URL conversion: begin
      [TRACE] JDBC to MySQL URL conversion: end
      Database connection successful
      2021-03-23T16:43:42.000Z [shell] [INFO ] [] [installerCommon.sh:1584       ] [main] - Testing directory /opt/jfrog/artifactory/var has read/write permissions for user id 1030
      2021-03-23T16:43:42.000Z [shell] [INFO ] [] [installerCommon.sh:1599       ] [main] - Permissions for /opt/jfrog/artifactory/var are good

      I've attached the complete system.yaml to the ticket.

      After the first start of artifactory, the artifactory schema in the database is empty.

      I've no idear why artifactory crashes after the start and the documentation does not go into further detail on errors of this type.


          Issue Links



                cp-fiergolla Heiko Fiergolla (Inactive)
                0 Vote for this issue
                1 Start watching this issue