Kyle Strand
Kyle Strand

Reputation: 16509

Jenkins won't start after plugin installation *and does not log anything*

I installed Jenkins' Gradle plugin and used the automatic restart option via the Jenkins web interface. Jenkins seemed to hang on the "restarting..." page, so I finally tried to manually restart the Jenkins service on the server (64-bit Debian 7) using service jenkins restart.

Now, Jenkins is no longer running at all (verified with ps -ef | grep -i [J]enkins and service jenkins status), and when I try service jenkins [re]start, I see an [ ok ] message but nothing else seems to happen. I've deleted /var/log/jenkins/jenkins.log, and each time I try a service start (or restart), the log file reappears, but it's blank (ls -lA shows that the file was recently made, but cat produces no output). I also tried rebooting the server, with no effect. I finally deleted the Gradle folders under /var/lib/jenkins/plugins, which also did not appear to make a difference.

How do I even begin to approach this problem? Should I just re-install Jenkins?

EDIT: System info:

> uname -a
Linux AUC-Workstation1 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u1 x86_64 GNU/Linux

According to dpkg -l, I'm using Debian's jenkins package, version 1.617.

EDIT 2: I'm actually using the jenkins package provided directly by Jenkins, as per the instructions here.

Upvotes: 5

Views: 7552

Answers (2)

sage
sage

Reputation: 5514

I just had a problem where multiple Jenkins plugins were breaking Jenkins startup (after an upgrade) and here is the procedure I followed to resolve the issue, which might work for other plugin startup issues.

I'm working on an Ubuntu server, but I expect that this would work for Debian if it's going to work at all - I encourage others to adjust the procedure:

  1. logged into the server and switched to the jenkins user (sudo su jenkins in my case)
  2. went to the main jenkins directory
  3. renamed plugins to plugins.problems_YYYYMMDD
    • previously, I attempted to disable the plugins, but this did not work for me (system still would not start)
  4. created an empty directory plugins
  5. restarted jenkins (sudo service jenkins restart)
    • In my case, this started just fine
  6. iteratively followed the following procedure to add plugins back in
    1. copied 1 or more plugins from plugins.problems_YYYYMMDD/ to plugins/
    2. restarted jenkins
    3. went to the plugin center and installed updates as available
      • sometimes I needed to install updates in a particular order due to dependencies
  7. evaluated results in 'Manage Old Data'
    • I think I'm facing some manual updates of the old data

Note: if you know which plugins are likely the problem, then it is easier to just disable or temporarily (re)move them rather than (re)moving all of the plugins!

Upvotes: 6

Kyle Strand
Kyle Strand

Reputation: 16509

I never did figure out the initial problem, but I did get Jenkins working again, sort of.

I uninstalled Jenkins (using apt-get purge) and then re-installed it. This time it failed to start because it needed Java 7, but I apparently only had Java 6 installed (this surprised me, because I thought I had previously configured Jenkins to use Java 7 on that machine). So I installed openjdk-7-jdk and openjdk-7-jre, set JAVA and JAVA_HOME appropriately in the Jenkins config file, and started the service again. This allowed Jenkins to start.

Upvotes: 0

Related Questions