How to manually obtain logs of a tenant

Issue

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

Environment

  • CloudBees Jenkins Enterprise (CJE)

Resolution

First of all we have to know where the tenant is running, to know that we have to run this command cje run find-worker-for TENANT_NAME where TENANT_NAME is the name of the tenant (cjoc, castle, palace, elacticsearch, name of the master), then we can access to the worker and compress the log files into a tar.xz file.

dna connect worker-1
sudo tar -chJf /tmp/logs.tar.xz $(find  /var/lib/mesos/slaves|grep TENANT_NAME)
exit

download the generated file with scp, you have to replace INSTANCE with the instance name of the worker, you can obtain the INSTANCE of a worker you have to run cje run list-workers

scp -i .dna/identities/default ubuntu@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.