How to stop Jenkins log from becoming huge?
This seems to be due to DNS multicast as explained here: https://issues.jenkins-ci.org/browse/JENKINS-25369
Workaround: add -Dhudson.DNSMultiCast.disabled=true
to JAVA_ARGS
.
PS: I'm answering my own question here on Stack Overflow because I couldn't find the answer on Google easily, and it will be useful to other people running Jenkins.
You can disable the logging of these DNS errors by adjusting the logging settings within Jenkins.
From the Jenkins web interface go to:
Manage Jenkins -> System Log -> Log Levels (on the left)
Add the following entry:
Name: javax.jmdns
Level: off
This way you can keep the Multicast DNS feature but without all the logging data.
Modify JAVA_ARGS in /etc/default/jenkins
(location for Debian / Ubuntu installations at least) to disable DNS multicast feature.
Change this: JAVA_ARGS="-Djava.awt.headless=true"
To this: JAVA_ARGS="-Djava.awt.headless=true -Dhudson.DNSMultiCast.disabled=true"
And restart the service service jenkins restart