Jenkins CI: Git 'not responding' after update - jenkins

I just updated our Jenkins installation to version 2.59 (from 2.53) for which I had to install Java 8 (also on the agents) since it is used by 2.54 and later.
The Jenkins came up again and seemed to be working but there is a problem when checking out Git repositories on any of our projects. Jenkins seems to hang:
Fetching changes from the remote Git repository
Cleaning workspace
...and that's it.
When looking into the Jenkins logs I see the following exception:
May 08, 2017 11:34:47 AM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
SEVERE: A thread (Thread-17/172) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
java.lang.NullPointerException
at com.trilead.ssh2.transport.KexManager.handleMessage(KexManager.java:447)
at com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:790)
at com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:502)
at java.lang.Thread.run(Thread.java:745)
What causes the problem here? How do I fix this?

Related

TFS checkout failing in jenkins

TFS checkout is failing in Jenkins. It is giving below error. Previously It worked fine,but from past 4 days I am getting this error. Few file are checking out and getting this error:
FATAL: java.lang.RuntimeException:
com.microsoft.tfs.core.clients.versioncontrol.exceptions.VersionControlException:
com.microsoft.tfs.core.exceptions.TECoreException: Server was unable
to process request. ---> Object reference not set to an instance of an
object. com.microsoft.tfs.core.ws.runtime.exceptions.SOAPFault: Server
was unable to process request. ---> Object reference not set to an
instance of an object.
I have tried with different versions of TFS plugins. Currently I have installed TFS 5.142 version and Jenkins version 2.176.2

Jenkins on Kubernetes node is complaining its plug-ins need newer version of Jenkins, but don't want to lose data

Jenkins (on a Kubernetes node) is complaining it requires a newer version of Jenkins to run some of my plug-ins.
SEVERE: Failed Loading plugin Matrix Authorization Strategy Plugin
v2.4.2 (matrix-auth) java.io.IOException: Matrix Authorization
Strategy Plugin v2.4.2 failed to load.
- You must update Jenkins from v2.121.2 to v2.138.3 or later to run this plugin.
The same log file also complains farther down that it can't read my config file... I'm hoping this is just because of the version issue above, but I'm including it here in case it is a sign of deeper issues:
SEVERE: Failed Loading global config
java.io.IOException: Unable to read /var/jenkins_home/config.xml
I'd either like to disable the plug-ins that are causing the issue so I can see the Jenkins UI and manage the plug-ins from there, or I'd like to update Jenkins in a way that DOES NOT DELETE MY USER DATA AND JOB CONFIG DATA.
So far, I tried disabling ALL the plug-ins by adding .disabled files to the Jenkins plug-ins folder. That got rid of most of the errors, but it still complained about the plug-in above. So I removed the .disabled file for that, and now it's complaining about Jenkins not being a new enough version again (the error above).
Note: this installation of Jenkins is using a persistent storage volume, mounted with EFS. So that will probably help alleviate some of the restrictions around upgrading Jenkins, if that's what we need to do.
Finally, whatever we do with the plug-ins and Jenkins version, I need to make sure the change is going to persist if Kubernetes re-starts the node in the future. Unfortunately, I am pretty unfamiliar with Kubernetes, and I haven't discovered yet where these changes need to be made. I'm guessing the file that controls the Kubernetes deployment configuration?
This project is using Helm, in case that matters. But again, I hardly know anything about Helm, so I don't know what files you might need to see to make this question solvable. Please comment so I know what to include here to help provide the needed information.
We faced the same problem with our cluster, and we have a basic explanation about that, but not sure about it (The following fix works)
That error come with the fact that you have installed Jenkins via Helm, and their plugins through the Jenkins UI. It works if you decide to never reboot the pod, but if one day, jenkins have to make his initialization again, you will face that error.
Jenkins try to load plugins from the JENKINS_PLUGINS_DIR, which is empty, so the pod die.
To fix the current error, you should specify your plugin in the master.installPLugins parameter.
If you followed a normal install, just go on your cluster and
helm get values jenkins_release_name
So you may have something like that:
master:
enableRawHtmlMarkupFormatter: true
installPlugins:
- kubernetes:1.16.0
- workflow-job:2.32
By default, some values are "embedded" by helm to be sure that jenkins works, see here for more details: Github Helm Charts Jenkins
So, just copy it in a file with the same syntax and add your plugins with their versions. After, you have just to use the helm upgrade command with your file on your release:
helm upgrade [RELEASE] [CHART] -f your_file.yaml
Good luck !

Jenkins build is unable to checkout the code from SVN repository

I have jenkins job which is checking out the code from SVN repository and run the build but I am getting the multiple or different errors before its checking out the complete code.Please help me.
Error:
ERROR 1: svn: E155021: The path 'D:\Jenkins\workspace\Project1\branch-1.1' appears to be part of a Subversion 1.7 or greater
working copy. Please upgrade your Subversion client to use this
working copy.
org.tmatesoft.svn.core.SVNException: svn: E155021: The path 'D:\Jenkins\workspace\Project\branch-1.1' appears to be part of a Subversion 1.7 or greater
working copy. Please upgrade your Subversion client to use this
working copy.
Error 2:
D:\jenkins\workspace\project\branch.svn\wc.db: The process cannot access the file because it is being used by another process.
Please install Tortoise SVN (It has the cli interface) and add to Windows %PATH%.

Jenkins upgrade to 2.32.3 issue?

Recently i have upgraded Jenkins from v1.596.2 to 2.32.3(LTS). But after upgradation i am getting following error but no clear how to rectify it.
=========================================================================
Tomcat Deploy v1.0.16
You must update Jenkins from v2.32.3 to v3.0.0 or later to run this plugin.
Ok so I had the same problem (but with others plugins).
To fix that:
Put Jenkins in "Prepare for Shutdown" mode and shutdown it
On the server HDD go to JENKINS_HOME/plugins and delete (or move elsewhere) the folder and hpi file corresponding to plugin which produce warnings. (The name of file/folder can be a little bit different than the plugin name displayed in Jenkins)
Restart Jenkins. Warning should be deleted

How to get rid of dependency errors loading jenkins?

Just downloaded jenkins.war and did a java -jar jenkins.war (on windows 8.1)
going to http://127.0.0.1:8080/manage, i see:
There are dependency errors loading some plugins:
Email Extension Plugin v2.47
JUnit Plugin v1.2-beta-4 is older than required. To fix, install v1.2 or later.
GitHub plugin v1.20.0
Jenkins Git plugin v2.4.0 failed to load. Fix this plugin first.
Jenkins Git plugin v2.5.3
Matrix Project Plugin v1.4.1 is older than required. To fix, install v1.6 or later.
Jenkins Mailer Plugin v1.11 is older than required. To fix, install v1.16 or later.
Pipeline v2.2
Pipeline: Basic Steps v2.0 failed to load. Fix this plugin first.
Jenkins Workspace Cleanup Plugin v0.30
Matrix Project Plugin v1.4.1 is older than required. To fix, install v1.7.1 or later.
GitHub Branch Source Plugin v1.8.1
Jenkins Git plugin v2.3 failed to load. Fix this plugin first.
Pipeline: Basic Steps v2.1
Jenkins Mailer Plugin v1.11 is older than required. To fix, install v1.13 or later.
GitHub Organization Folder Plugin v1.4
GitHub Branch Source Plugin v1.5 failed to load. Fix this plugin first.
Repeating the java -jar jenkins.war, unpacks the war each tine. Is there a place he lives, so that you can just run him from the command line?
How do I get rid of the plugin errors?
Upgrading to a new war file will not update your plugins, except for a few "internal" plugins that are closely connected to the Jenkins core.
So, when you're switching from an old Jenkins version to a new one (by using a new war file), you'll get the warnings that you see.
To solve this, updating the plugins in the Jenkins update center will help.
If you cannot resolve the dependency errors on GUI level, then (manually) putting the updated hpi plugin files to $JENKINS_HOME/plugins (and then restarting) is a last resort.
Just load the latest version from jenkins page, and install the recommended plugin by default, I don't see any problem like you, console log example as follows after I open the manage page.
Maybe you can redo it with latest jenkins release.
八月 22, 2016 8:31:17 上午 hudson.PluginManager dynamicLoad
INFO: Plugin email-ext:2.47 dynamically installed
八月 22, 2016 8:31:17 上午 hudson.model.UpdateCenter$DownloadJob run
INFO: Installation successful: Email Extension Plugin
八月 22, 2016 8:31:17 上午 hudson.model.UpdateCenter$DownloadJob run
INFO: Starting the installation of Mailer Plugin on behalf of admin
八月 22, 2016 8:31:17 上午 hudson.model.UpdateCenter$InstallationJob _run
INFO: Skipping duplicate install of: Mailer Plugin#1.17
八月 22, 2016 8:31:17 上午 hudson.model.UpdateCenter$DownloadJob run
INFO: Installation successful: Mailer Plugin

Resources