Artifactory System Logs not updating after Migration from an older version

Viewed 636

After migrating from Artifactory OSS 5.11.0 rev 51100900 to Artifactory Commercial license 7.3.2 rev 70302900 the System Logs are no longer updated after the time stamp of the migration date.

I used JFrog’s article, “What is the best way to migrate a large Artifactory instance with minimal downtime?”, to make the migration.

Servers set up:

Old server: Artifactory OSS 5.11.0 rev 51100900
New server: Artifactory Commercial license 7.3.2 rev 70302900
Both servers are running as Docker Container on linux.
Each linux server is a VM on a physically different VM Server.

Migration Actions:

  1. On both server, I disabled Garbage collection
    Admin -> Advanced -> Maintenance -> Garbage collection
  2. Old server: Copied $ARTIFACTORY_HOME/data/filestore folder to the new server's filestore folder.
  3. Old server: Performed full system export with the Exclude Content option selected (no other options selected).
  4. New server: Performed full system import (did NOT select the Exclude Content option).
  5. New Server: Enabled Garbage Collection again
  6. Restarted new server.

Current Status:

The new server works without problems. All of the artifacts from the old server are present in the new server and are accessible. New artifacts are pushed to new server without a problem.
I’ve created two Docker registries in the new server and they also work without problems.
Creation of new users and Permission groups also works correctly.

The issue I have:

When I go to Admin -> Artifactory -> Advanced -> System Logs, I see the four system logs, but the last entry in each log is the last entry that was made by the old server.
There are no new entries that are made by the new server.

Observation and Actions I tried:

  1. I’ve set up a new local Artifactory Server (Docker container), docker exec into the container to directory /var/opt/jfrog/artifactory/log and changed the name of all log files that start with artifactory-*.log to artifactory-*.log.old. I’ve stopped the Artifactory container and started it again.
    All the logs I’ve changed their name, were recreated and started to log everything.
    When I did the same thing on the new server, the logs were NOT recreated.

  2. Started poking around in the file system of the Docker container and found a directory call artifactory.home_IS_UNDEFINED in folder /var/opt/jfrog/artifactory. The time stamp for the directory is the date and time of the migration.

  3. Run printenv and the path for home is correct:
    JF_PRODUCT_DATA_INTERNAL=/var/opt/jfrog/artifactory
    JF_PRODUCT_HOME=/opt/jfrog/artifactory

  4. New server is, in fact, logging! Just not in the desired location. In folder /var/opt/jfrog/artifactory/log there are many logs that keep track of all actions.
    Also in folder /var/opt/jfrog/artifactory/artifactory.home_IS_UNDEFINED/logs there are active logs files.

  5. None of the logs that are working show up in the UI System Logs console.

I’ve been trying to resolve this issue for a few days now (on and off) but I cant find anything related in the Artifactory knowledge-base nor using google.

Any help or insight will be greatly appreciated.

2 Answers

OK. I figured it out.

The problem was in file /var/opt/jfrog/artifactory/etc/artifactory/logback.xml.
For some reason, after the migration this file was changed from the original file that was in the new server.

The changed file had a different xml structure and all logs were using the ${artifactory.home} variable in the xml tags.
The original logback.xml was using ${log.dir} variables.

Luckily, the originl file was backed up somehow and had the name logback.original.xml.

I renamed the current (the incorrect xml structured) file to logback.xml.back and renamed file logback.original.xml to logback.xml and after a few minutes the missing logs were recreated in the correct folder and everything started to get logged.

I can also, now, see the logs in the Artifactory UI, under System Logs.

I had the same problem (Artifactory 7.19.8 run with Docker) but no usable logback*.xml file. As getting the default logback.xml was okay for me, I simply deleted $JFROG_HOME/artifactory/var/etc/artifactory/logback.xml and restarted Artifactory. That led to the creation of a new logback.xml file which now works as it should.

Related