0
votes

Hello There,

I am facing some strange issues with a new artifactory setup. We are moving to docker-compose based installation and running artifactory in container this time. JF_PRODUCT_DATA_INTERNAL (inside container refers to /var/opt/jfrog/artifactory) directory is mounteed to /opt/artifactory on local host.

First problem, I see artifactory.home_IS_UNDEFINED folder created under /opt/artifactory when I start my container.

[root@guvcdapartifa04 artifactory]# ls -ltr artifactory.home_IS_UNDEFINED/
total 8
drwxr-x---. 3 artifactory artifactory 4096 May 19 15:24 access
drwxr-x---. 2 artifactory artifactory 4096 May 19 15:24 logs

ls -ltr from one level up lists these directories...
[root@guvcdapartifa04 artifactory]# ls -ltr
total 44
drwxr-xr-x. 6 artifactory artifactory 4096 Apr 16 17:02 var
drwxr-xr-x. 5 artifactory artifactory 4096 Apr 16 21:11 app
drwxr-xr-x. 4 artifactory artifactory 4096 Apr 16 21:22 bootstrap
drwxr-xr-x. 6 artifactory artifactory 4096 Apr 16 21:22 work
drwxr-xr-x. 6 artifactory artifactory 4096 Apr 16 21:22 data
drwxr-x---. 3 artifactory artifactory 4096 May  9 13:07 access
drwxr-xr-x. 6 artifactory artifactory 4096 May 10 18:08 backup
drwxr-x---. 2 artifactory artifactory 4096 May 13 18:33 logs
drwxr-xr-x. 4 artifactory artifactory 4096 May 19 00:23 log
drwxr-xr-x. 9 artifactory artifactory 4096 May 19 14:23 etc
drwxr-x---. 4 artifactory artifactory 4096 May 19 14:23 artifactory.home_IS_UNDEFINED

I have tried setting both JF_ARTIFACTORY_HOME and artifactory.home to /var/opt/jfrog/artifactory in my compose defination for artifactory service but it didn't help and results were same. artifactory.home_IS_UNDEFINED folder is created after everytime I start the artifactory container after deleting it.

Service defination in compose.yml ...

  artifactory:
    container_name: artifactory
    image:          docker.bintray.io/jfrog/artifactory-pro:7.3.2
    links:          [ postgres ]
    expose:         [ '8081','8082' ]
    restart:        unless-stopped
    user:           artifactory
    ulimits:
      nproc: 65535
      nofile:
        soft: 32000
        hard: 40000
    logging:
      driver: json-file
      options:
        max-size: "50m"
        max-file: "30"
    environment:
      JF_ROUTER_ENTRYPOINTS_EXTERNALPORT: '8082'
      JF_ARTIFACTORY_HOME: '/var/opt/jfrog/artifactory'
      # JF_SYSTEM_YAML: '/opt/jfrog/artifactory/var/etc/system.yaml'
      # JF_ARTIFACTORY_PID: '/opt/jfrog/artifactory/app/run/artifactory.pid'
      # JF_PRODUCT_DATA_INTERNAL: '/var/opt/jfrog/artifactory'
      # JF_PRODUCT_HOME: '/opt/jfrog/artifactory'
      # JF_SHARED_NODE_IP: '192.168.76.180'
      # JF_SHARED_NODE_NAME: 'guvcdapartifa04'
      # JF_SHARED_NODE_ID: 'guvcdapartifa04'
      # JF_ARTIFACTORY_USER: 'artifactory'
    volumes:
      - type:      bind
        source:   /etc/localtime
        target:   /etc/localtime
        read_only: true
      - type:      bind
        source:    /opt/artifactory
        target:    /var/opt/jfrog/artifactory
        read_only: false

Please note the value of JF_ARTIFACTORY_HOME, Artifactory Home below.

artifactory    | ========================
artifactory    | JF Environment variables
artifactory    | ========================
artifactory    |
artifactory    | JF_SHARED_NODE_NAME                 : efec1fe35cdd
artifactory    | JF_SYSTEM_YAML                      : /opt/jfrog/artifactory/var/etc/system.yaml
artifactory    | JF_ARTIFACTORY_PID                  : /opt/jfrog/artifactory/app/run/artifactory.pid
artifactory    | JF_SHARED_EXTRAJAVAOPTS             : -Xms2g
artifactory    | -Xmx8g                              :
artifactory    | JF_PRODUCT_DATA_INTERNAL            : /var/opt/jfrog/artifactory
artifactory    | JF_PRODUCT_HOME                     : /opt/jfrog/artifactory
artifactory    | JF_ROUTER_TOPOLOGY_LOCAL_REQUIREDSERVICETYPES : jfrt,jfac,jfmd,jffe
artifactory    | JF_ROUTER_ENTRYPOINTS_EXTERNALPORT  : 8082
artifactory    | JF_ARTIFACTORY_HOME                 : /var/opt/jfrog/artifactory
artifactory    | JF_SHARED_NODE_IP                   : 172.20.0.3
artifactory    | JF_SHARED_NODE_ID                   : efec1fe35cdd
artifactory    | JF_ARTIFACTORY_USER                 : artifactory
artifactory    | Starting router...
artifactory    | router not running. Proceed to start it up.
artifactory    | router started. PID: 2732

. . .

artifactory    |                 _   _  __           _                     _____
artifactory    |      /\        | | (_)/ _|         | |                   |  __ \
artifactory    |     /  \   _ __| |_ _| |_ __ _  ___| |_ ___  _ __ _   _  | |__) | __ ___
artifactory    |    / /\ \ | '__| __| |  _/ _` |/ __| __/ _ \| '__| | | | |  ___/ '__/ _ \
artifactory    |   / ____ \| |  | |_| | || (_| | (__| || (_) | |  | |_| | | |   | | | (_) |
artifactory    |  /_/    \_\_|   \__|_|_| \__,_|\___|\__\___/|_|   \__, | |_|   |_|  \___/
artifactory    |  Version:  7.3.2                                   __/ |
artifactory    |  Revision: 70302900                               |___/
artifactory    |  Artifactory Home: '/opt/jfrog/artifactory'
artifactory    |  Node ID: 'abd383aec9fd'

Second Problem, I see these errors reported for plugings in the logs.

artifactory    | ==================Plugins Status===================
artifactory    | #  propertySetsConfig.groovy            -->  Loaded
artifactory    | #  haClusterDump.groovy                 -->  Loaded
artifactory    | #  httpSsoConfig.groovy                 -->  Loaded
artifactory    | #  repoLayoutsConfig.groovy             -->  Loaded
artifactory    | #  storageSummary.groovy                -->  Loaded
artifactory    | #  ldapGroupsConfig.groovy              -->  Loaded
artifactory    | #  ldapSettingsConfig.groovy            -->  Loaded
artifactory    | #  pluginsConfig.groovy                 -->  Error
artifactory    | #  proxiesConfig.groovy                 -->  Loaded
artifactory    | #  requestRouting.groovy                -->  Error
artifactory    | ===================================================

. . .

[root@guvcdapartifa04 artifactory]# services logs artifactory | grep ERROR
artifactory    | 2020-05-19 08:54:07,221 [art-init] [ERROR] (o.a.a.p.GroovyRunnerImpl:349) - Error loading script from '/opt/jfrog/artifactory/var/etc/artifactory/plugins/pluginsConfig.groovy'.
artifactory    | 2020-05-19 08:54:07,994 [art-init] [ERROR] (o.a.a.p.GroovyRunnerImpl:349) - Error loading script from '/opt/jfrog/artifactory/var/etc/artifactory/plugins/requestRouting.groovy'.
[root@guvcdapartifa04 artifactory]#

Third Problem, I want to get rid of "artifactory" context in url: https://node.org.local/artifactory/. I would like it to be simple as https://node.org.local/. Is it possible ?

Fourth Problem, the container instance starts with following new "ALL-UNNAMED" settings in start command - I am concerned and we would like to understand their purpose please.

--add-opens java.base/java.util=ALL-UNNAMED 
 --add-opens java.base/java.lang.reflect=ALL-UNNAMED 
 --add-opens java.base/java.lang.invoke=ALL-UNNAMED 
 --add-opens java.base/java.text=ALL-UNNAMED 
 --add-opens java.base/java.nio=ALL-UNNAMED 
 --add-opens java.desktop/java.awt.font=ALL-UNNAMED 

[root@guvcdapartifa04 artifactory]#  ps -ef | grep artifactory | grep Bootstrap
artifac+  8670  5699 35 15:24 ?        00:01:33 /opt/jfrog/artifactory/app/third-party/java/bin/java -Djava.util.logging.config.file=/opt/jfrog/artifactory/app/artifactory/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -server -Xss256k -XX:+UseG1GC -XX:OnOutOfMemoryError=kill -9 %p --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED -Dfile.encoding=UTF8 -Djruby.compile.invokedynamic=false -Djruby.bytecode.version=1.8 -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Djava.security.egd=file:/dev/./urandom -Dartdist=zip -Djf.product.home=/opt/jfrog/artifactory -Xms2g -Xmx8g -Djruby.bytecode.version=1.8 -Dartifactory.metadata.native.ui=true -Dignore.endorsed.dirs= -classpath /opt/jfrog/artifactory/app/artifactory/tomcat/bin/bootstrap.jar:/opt/jfrog/artifactory/app/artifactory/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/jfrog/artifactory/app/artifactory/tomcat -Dcatalina.home=/opt/jfrog/artifactory/app/artifactory/tomcat -Djava.io.tmpdir=/opt/jfrog/artifactory/var/work/artifactory/tomcat/temp org.apache.catalina.startup.Bootstrap start

Awaiting your response

1
Is this an upgrade that you are performing? For the first problem: I would suggest to remove the old logback.xml. - Prasanna Raghavendra
@PrasannaRaghavendra - Thank you man ! it resolved the first issue indeed. It was a fresh installation, but I migrated data from a non container based installation to a container based installation which brough logback.xml along with data. - Hemant Manwani
I was also able to fix the plugin errors - I found latest version of .groovy and that helped in fixing those. - Hemant Manwani

1 Answers

0
votes

For the first issue, I would suggest to remove the old logback.xml - you accepted thank you.

Second issue is resolved after you installed latest groovy.

For the third issue, Artifactory can no longer be configured as the Tomcat root application. To remove the /artifactory context, you'll need to set the relevant configuration in your reverse proxy (load-balancer). refer: https://www.jfrog.com/confluence/display/JFROG/HTTP+Settings

For the fourth issue. refer details on add-opens: https://www.oreilly.com/library/view/java-9-building/9781788832823/40494528-393d-49e4-a216-d7a2d4d7e95c.xhtml