1 2 3 4 5 6 7 8 9 10 11 12 13 |
- [root@zg-vcd05 logs]# ls -la | grep jmx -rw------- 1 vcloud vcloud 17631159544 Oct 7 08:57 jmx.log -rw------- 1 vcloud vcloud 23882585 Jul 23 03:50 jmx.log.1 -rw------- 1 vcloud vcloud 23838783 Jul 22 18:50 jmx.log.10 -rw------- 1 vcloud vcloud 23882652 Jul 23 02:50 jmx.log.2 -rw------- 1 vcloud vcloud 23882134 Jul 23 01:50 jmx.log.3 -rw------- 1 vcloud vcloud 23882510 Jul 23 00:50 jmx.log.4 -rw------- 1 vcloud vcloud 23881609 Jul 22 23:50 jmx.log.5 -rw------- 1 vcloud vcloud 23869479 Jul 22 22:50 jmx.log.6 -rw------- 1 vcloud vcloud 23857176 Jul 22 21:50 jmx.log.7 -rw------- 1 vcloud vcloud 23846127 Jul 22 20:50 jmx.log.8 -rw------- 1 vcloud vcloud 23845626 Jul 22 19:50 jmx.log.9 |
After getting a support ticket raised it was found that the vCD container debug logs where not even rolling…in fact there was no debug log activity on the cells (except for the cell.log) since the upgrade.
Looking at the log4j.properties file under /opt/vmware/vcloud-director/etc it looked like everything was in order and that the logs should be rotating after the file hit 20MB however it was obvious that this wasn’t happening.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
- # appender for JMX Dump logs # Comment/Uncomment to start/stop creating JMX data in separate log file. log4j.logger.com.vmware.vcloud.monitoring.jmx=INFO, jmx log4j.additivity.com.vmware.vcloud.monitoring.jmx=false log4j.appender.jmx=org.apache.log4j.RollingFileAppender log4j.appender.jmx.File=logs/jmx.log log4j.appender.jmx.MaxFileSize=20000KB log4j.appender.jmx.MaxBackupIndex=10 log4j.appender.jmx.layout=com.vmware.vcloud.logging.CustomPatternLayout log4j.appender.jmx.layout.ConversionPattern=%d{ISO8601} | %-8.8p | %-25.50t | %-30.50c{1} | %m%n # set the following value to OFF to turn off JMX dump. log4j.appender.jmx.threshold=INFO # end JMX dump section |
Working with VMware Support we came across this section of the Install and Upgrade guide where it talks about
(Optional) Update logging properties.
After an upgrade, new logging properties are written to the file /opt/vmware/vcloud-director/etc/log4j.properties.rpmnew
Sure enough our log4j.properties file had been altered to add some custom logging formats and targets and in each of the directories there was the log4j.properties.rpmnew file. That is to say there are new logging properties that come with vCD 5.6.x SP and if you had altered the file prior to upgrade those additions meant the logging broke. As suggested above all that needed to be done was to merge both files, or append the customer entries to the bottom of the .rpmnew version and save that as log4j.properties and restart the cells. Once I did this the debug logs started to flow again and the jmx.log file was rotated allowing me to shrink/delete the file consuming the storage.
References: