How to obtains logs from Worker/Controller manually

Issue

It is not possible to create a CJE support bundle and we need to review the logs from a worker/controller.

Environment

  • CloudBees Jenkins Enterprise (CJE)

Resolution

Access to the worker/controller and compress the log files into a tar.xz file.

dna connect worker-1
sudo tar -chJf /tmp/logfiles.tar.xz /var/log/syslog /var/log/syslog.1 /var/log/messages /var/log/messages.1 /var/log/kern.log /var/log/cloud-init.log /var/log/cloud-init-output.log /var/log/mesos/* /var/log/zookeeper/zookeeper.log /var/lib/mesos/slaves
sudo chmod ugo+r /tmp/logfiles.tar.xz
exit

download the generated file with scp, you have to replace INSTANCE with the instance name of the controller/worker, and USER with ec2-user on RedHat AMIs and ubuntu on Ubuntu AMIs, you can obtain the INSTANCE of a controller with cje run display-outputs, to obtain the INSTANCE of a worker you have to run cje run list-workers

scp -i .dna/identities/default USER@INSTANCE:/tmp/logfiles.tar.xz .

finally, remove the compressed file.

dna connect worker-1
sudo rm /tmp/logfiles.tar.xz
exit
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.