Jenkins.log location on Ubuntu 14.04 desktop

Viewed 38144

Setup

I am currently running a Jenkins instance on an Ubuntu 14.04 desktop machine. I have installed Jenkins via WAR distribution and am running Jenkins as a service on the host machine.

Issue

I am trying to access the jenkins.log file described here in the logging documentation on the Jenkins wiki. The purpose of accessing this file is to be sure we have a log to use in the event that Jenkins web UI is unavailable and there is an issue with Jenkins.

I've taken a look in /var/log/jenkins/ as the documentation suggests, however the only file in that folder is a config file.

Also, per the documentation, I have double checked the /etc/default/jenkins as well as the /etc/sysconfig/jenkins directories. Each one of these two directories does not exist on my machine.

I have also tried searching from command line using the 'find' command, as well as searching my system using the Ubuntu file explorer. Each of these approaches yielded no jenkins.log file.

Questions

  • Am I correct in my understanding that Jenkins system logs are output to the jenkins.log file?
  • Where might the jenkins.log file be located on my machine?
  • Is this the best approach in troubleshooting issues with Jenkins when the web UI is inaccessible?
2 Answers
  • Am I correct in my understanding that Jenkins system logs are output to the jenkins.log file?
    • Yes you are rigth. Internal engines, plugins, etc saves its logs in jenkins log file
  • Where might the jenkins.log file be located on my machine?
    • What is your command line which is executed as service in your machine?
  • Is this the best approach in troubleshooting issues with Jenkins when the web UI is inaccessible?

Steps to find your jenkins log path

  • locate jenkins service file :

    /etc/default/jenkins: location for most of the Linux distributions.

    /etc/sysconfig/jenkins: location for RedHat/CentOS distribution.

  • Open it and probably you will see :

    NAME=jenkins

    JENKINS_LOG=/var/log/$NAME/$NAME.log

    So your file /var/log/jenkins/jenkins.log must be exist. If not like you said, try to add this line

Related