Posted on 05-02-2023 03:44 AM
Is anyone having trouble with the Jamf Server logs not actually logging? I have a support ticket open (CS0951135) for this because I think the log4j2.xml file is not setup correct, it was broken before in 10.45, but stuff has changed in that configuration file and it is even more broken in 10.46.
I am in a windows server environment, and installed using the jamf windows installer. I am installing it on the D drive on my Jamf server and not on my C drive, but I am using the installer to do all of this, so not doing anything special. Is there anyone else out there with windows using not the c drive for Jamf with this issue?
Solved! Go to Solution.
Posted on 05-09-2023 10:11 AM
Here is what seems to work...
Change your loggingDirectory line to this:
Property name="loggingDirectory">C:/Program Files/JSS/Logs</Property>
Change all of the fileName and filePattern paths in your RollingFile lines to look like this:
<RollingFile name="JAMFCMFILE" fileName="${loggingDirectory}/JAMFChangeManagement.log" filePattern="${loggingDirectory}/JAMFChangeManagement.log.%i">
Posted on 05-09-2023 09:58 AM
Yes - broken here as well and on multiple servers. Logs are being written to C:\Program Files\JSS\Logs\Library\JSS\Logs. I have a support case open with Jamf. It seems they messed up the log4j2.xml file. The loggingDirectory property is wrong and possibly the paths to the actual log files as well.
Posted on 05-09-2023 10:11 AM
Here is what seems to work...
Change your loggingDirectory line to this:
Property name="loggingDirectory">C:/Program Files/JSS/Logs</Property>
Change all of the fileName and filePattern paths in your RollingFile lines to look like this:
<RollingFile name="JAMFCMFILE" fileName="${loggingDirectory}/JAMFChangeManagement.log" filePattern="${loggingDirectory}/JAMFChangeManagement.log.%i">
Posted on 05-09-2023 10:41 AM
I do have a support case open. I fixed mine the same way as you. They were going to verify they could replicate the issue and get engineering involved.
Posted on 05-16-2023 01:56 PM
@cbrewerthanks for providing a fix.
Apparently the original file patterns were saved in the log4j.properties file. Hopefully we do not lose log file changes on the next upgrade.
Below are the first few lines of log4j.properties file:
! Warning! Changes made to this file will not necessarily make it into customer's JSS
! instances, as some installers will overwrite the log4j.properties file
! An appender for file-based Change Management logging
log4j.appender.JAMFCMFILE=org.apache.log4j.RollingFileAppender
log4j.appender.JAMFCMFILE.File=F:\\Program Files\\JSS\\Logs\\JAMFChangeManagement.log
log4j.appender.JAMFCMFILE.MaxFileSize=10MB
log4j.appender.JAMFCMFILE.MaxBackupIndex=10
log4j.appender.JAMFCMFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.JAMFCMFILE.layout.ConversionPattern=%m%n
log4j.appender.JAMFCMFILE.encoding=UTF-8
! An appender for Syslog-based Change Management logging
log4j.appender.JAMFCMSYSLOG=org.apache.log4j.net.SyslogAppender
log4j.appender.JAMFCMSYSLOG.syslogHost=127.0.0.1:514
log4j.appender.JAMFCMSYSLOG.layout=org.apache.log4j.PatternLayout
log4j.appender.JAMFCMSYSLOG.layout.ConversionPattern=%m%n
log4j.appender.JAMFCMSYSLOG.Facility=local2
! The basic appender definitions for com.jamfsoftware.jss classes
log4j.appender.JAMF=org.apache.log4j.RollingFileAppender
log4j.appender.JAMF.File=F:\\Program Files\\JSS\\Logs\\JAMFSoftwareServer.log
log4j.appender.JAMF.MaxFileSize=100MB
log4j.appender.JAMF.MaxBackupIndex=10
log4j.appender.JAMF.layout=org.apache.log4j.PatternLayout
log4j.appender.JAMF.layout.ConversionPattern=%d{ISO8601} [%-5p] [%-11.11t] [%-25.25c{1}] - %m%n
log4j.appender.JAMF.encoding=UTF-8
Posted on 07-31-2023 11:51 AM
We have recently upgraded JAMF to version 10.48.2-t1689860131 and lost the server logs again.
My previous post was cryptic, so I will clarify what worked for us since we have JAMF installed on a Windows Server using drive F:\ similar to OP @dhausman.
To get the logs to work again we modified the log4j2.xml file located here:
F:\Program Files\JSS\Tomcat\webapps\ROOT\WEB-INF\classes
We changed the loggingDirectory property
from: <Property name="loggingDirectory">${sys:log.dir:-/Library/JSS/Logs/}</Property>
to: <Property name="loggingDirectory">F:/Program Files/JSS/Logs/</Property>
We also removed all references to C:\Program Files\JSS\Logs\ so RollingFile entries should look similar to this:
<RollingFile name="JAMF" fileName="${loggingDirectory}JAMFSoftwareServer.log" filePattern="${loggingDirectory}JAMFSoftwareServer${archiveExtensionDateAndInterval}">
Make sure you save your changes and restart Tomcat.
Posted on 07-31-2023 12:40 PM
After installing 10.48.2 things seem to just work for me using the windows installer. I don't have to mess around with the log4j2.xml file any more. The recent installers fixed things by auto feeding the install path into the log config.
Posted on 07-31-2023 04:23 PM
I found that 10.48.0 and 10.48.2 Windows installers will keep your previous log4j2.xml if there is one. If you want it rewritten with a new/default one, you need to delete the file before running the upgrade. This almost seems like a bug, but I haven't opened a support case. Regardless, it does appear that Jamf is writing correct paths into the log4j2 file when it does create a new one now.
Posted on 10-08-2024 04:23 AM
It sounds like you're experiencing issues with the Jamf Server logs not functioning properly, possibly due to the log4j2.xml file configuration in the recent updates. If you’re running a Windows server and using the D drive, you’re not alone in facing this challenge. Proper server management is crucial, and if you need additional support or solutions, consider reaching out to HostNoc for assistance with your server setup.