Jenkins replaces updated plugins with older integrated plugins - jenkins

I have installed jenkins server on server without internet.
Extra plugins i have installed with my own download script.
It was working without any problems.
But today i made jenkins update from 2.176.1 to 2.176.2.
And everything gone broken.
Some how jenkins loads from somewhere older plugins and even deletes newer *.hpi updates.
Here is as example i'm showing matrix-autherrors that causes fail of role-strategy plugin:
INFO: Started initialization
<Skipped some libs>
Aug 23, 2019 5:49:46 PM hudson.PluginManager considerDetachedPlugin
Aug 23, 2019 5:49:46 PM hudson.PluginManager considerDetachedPlugin
INFO: Loading a detached plugin as a dependency: /mnt/repos/jenkins_home/plugins/matrix-auth.jpi
Aug 23, 2019 5:49:47 PM hudson.ClassicPluginStrategy createClassJarFromWebInfClasses
WARNING: Created /mnt/repos/jenkins_home/plugins/matrix-auth/WEB-INF/lib/classes.jar; update plugin to a version created with a newer harness
<Skipped some other libs and corresponding erros>
Aug 23, 2019 5:49:59 PM jenkins.InitReactorRunner$1 onTaskFailed
SEVERE: Failed Loading plugin Role-based Authorization Strategy v2.13 (role-strategy)
java.io.IOException: Role-based Authorization Strategy version 2.13 failed to load.
- Matrix Authorization Strategy Plugin version 1.1 is older than required. To fix, install version 2.2 or later.
at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:868)
at hudson.PluginManager$2$1$1.run(PluginManager.java:544)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
at jenkins.model.Jenkins$5.runTask(Jenkins.java:1095)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
I have checked that jenkins removed newer matrix-auth.hpi version 2.4.2 file for from Jenkins_home/plugins and placed matrix-auth.jpi of version 1.1
Also same happens with following plugins:
[root#host plugins]# ll |grep jpi
-rw-r-----. 1 jenkins jenkins 112483 Aug 23 09:56 antisamy-markup-formatter.jpi
-rw-r-----. 1 jenkins jenkins 90421 Aug 23 09:56 ant.jpi
-rw-r-----. 1 jenkins jenkins 3387826 Aug 23 09:56 bouncycastle-api.jpi
-rw-r-----. 1 jenkins jenkins 38296 Aug 23 09:56 command-launcher.jpi
-rw-r-----. 1 jenkins jenkins 929025 Aug 23 09:56 cvs.jpi
-rw-r-----. 1 jenkins jenkins 55546 Aug 23 09:56 external-monitor-job.jpi
-rw-rw-r--. 1 jenkins jenkins 38073 Aug 23 09:56 javadoc.jpi
-rw-r-----. 1 jenkins jenkins 69669 Aug 23 09:56 jdk-tool.jpi
-rw-rw-r--. 1 jenkins jenkins 332039 Aug 23 09:56 junit.jpi
-rw-r-----. 1 jenkins jenkins 101895 Aug 23 09:56 ldap.jpi
-rw-rw-r--. 1 jenkins jenkins 116002 Aug 23 09:56 mailer.jpi
-rw-rw-r--. 1 jenkins jenkins 79681 Aug 23 09:56 matrix-auth.jpi
-rw-rw-r--. 1 jenkins jenkins 238601 Aug 23 09:56 matrix-project.jpi
-rw-rw-r--. 1 jenkins jenkins 11016783 Aug 23 09:56 maven-plugin.jpi
-rw-r-----. 1 jenkins jenkins 1030550 Aug 23 09:56 pam-auth.jpi
-rw-rw-r--. 1 jenkins jenkins 4683101 Aug 23 09:56 subversion.jpi
-rw-r-----. 1 jenkins jenkins 949638 Aug 23 09:56 windows-slaves.jpi
I have also downloaded newer versions of this plugins, cleared jenkins_home/plugins and placed plugins updates.
However each restart of jenkis deletes my hpi and place older versions in jpi
How can i prohibit jenkins to replace provided newer hpi with integrated older ones?
Jenkins 2.176.2
latest plugins

Related

Jenkins symlinks/permalinks broken after restart

Jenkins version 2.114 is running builds but they seem to disappear from the Dashboard after a restart. I have Jenkins setup on Linux and all the log is present under
${JENKINS_HOME}/jobs/${ITEM_FULL_NAME}/builds
I have tried Reload Configuration from Disk with following set in /etc/sysconfig/jenkins
JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true"
Below is build and workspace directory settings:
Workspace Root Directory :${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}
Build Record Root Directory: ${ITEM_ROOTDIR}/builds
Below you can see the build number 117 and 118, but still, the lastFailedBuild, lastStableBuild , lastSuccessfulBuild are set to -1, which doesn't exist
drwxr-xr-x 4 jenkins jenkins 4096 Apr 2 20:17 117
drwxr-xr-x 4 jenkins jenkins 4096 Apr 3 20:17 118
lrwxrwxrwx 1 jenkins jenkins 2 Apr 3 11:09 lastFailedBuild -> -1
lrwxrwxrwx 1 jenkins jenkins 2 Apr 4 10:44 lastStableBuild -> -1
lrwxrwxrwx 1 jenkins jenkins 2 Apr 4 03:21 lastSuccessfulBuild -> -1
lrwxrwxrwx 1 jenkins jenkins 2 Apr 3 10:58 lastUnstableBuild -> -1
lrwxrwxrwx 1 jenkins jenkins 2 Apr 3 10:58 lastUnsuccessfulBuild -> -1
I have also set the
Discard Old Builds Slicer - Days to keep artifacts as 30
Discard Old Builds Slicer - Max # of builds to keep as 40
I ran the jenkins-job-checker[ https://github.com/docwhat/jenkins-job-checker ] on one of the jobs and found the following :
Problem: NOTLINK: The number link builds/1 is not a symlink!
Problem: NOTLINK: The number link builds/2 is not a symlink!
Problem: NOTLINK: The number link builds/3 is not a symlink!
Proposal: Archive non-link builds/1
Proposal: Archive non-link builds/2
Proposal: Archive non-link builds/3
Really appreaciate some help
The links have been replaced with the permalinks file:
rwxr-xr-x 2 jenkins jenkins 4096 Aug 6 2018 98
drwxr-xr-x 2 jenkins jenkins 4096 Aug 7 2018 99
lrwxrwxrwx 1 jenkins jenkins 3 Jan 19 13:47 lastFailedBuild -> 649
lrwxrwxrwx 1 jenkins jenkins 3 Jan 19 13:48 lastSuccessfulBuild -> 622
lrwxrwxrwx 1 jenkins jenkins 2 Jun 14 2018 lastUnstableBuild -> -1
lrwxrwxrwx 1 jenkins jenkins 3 Jan 19 13:49 lastUnsuccessfulBuild -> 649
-rw-r--r-- 1 jenkins jenkins 0 Jun 14 2018 legacyIds
-rw-r--r-- 1 jenkins jenkins 134 Jan 19 14:42 permalinks
jenkins#ip-1-9-2-253_jenkins:~/jobs/cron_dockers/jobs/ios/builds$ cat permalinks
lastCompletedBuild 651
lastFailedBuild 650
lastStableBuild 651
lastSuccessfulBuild 651
lastUnstableBuild -1
lastUnsuccessfulBuild 650
Make sure the values in the permalinks file are correct, these are the values that are used to generate the values in the Jenkins GUI.
I installed the plugin operations-center-context and that solved my problem
I found the solution in below link:
https://support.cloudbees.com/hc/en-us/articles/216227047-After-moving-a-job-symlinks-for-folders-became-actual-folders

Buck build failing for "events-logs" Gerrit plugin (jar)

I am trying to build Gerrit plugin "events-log" jar ( https://gerrit.googlesource.com/plugins/events-log) via Buck build, but its failing with below error:
root#jenkins-test:~/events-log# ll
drwxr-xr-x 7 root root 4096 Jun 29 13:25 ./
drwxrwxr-x 24 root root 4096 Jun 29 13:22 ../
-rw-r--r-- 1 root root 1017 Jun 29 12:57 BUCK
-rw-r--r-- 1 root root 173 Jun 29 12:57 .buckconfig
drwxr-xr-x 3 root root 4096 Jun 29 13:25 .buckd/
drwxr-xr-x 6 root root 4096 Jun 29 13:05 buck-out/
drwxr-xr-x 8 root root 4096 Jun 29 13:27 .git/
-rw-r--r-- 1 root root 146 Jun 29 12:57 .gitignore
drwxr-xr-x 5 root root 4096 Jun 29 12:57 lib/
drwxr-xr-x 4 root root 4096 Jun 29 12:57 src/
root#jenkins-test:~/events-log# /root/buck/bin/buck build events-log:events-
log
Using buckd.
BUILD FAILED: No build file at events-log/BUCK when resolving target
//events-log:events-log.
Can somebody please tell how to fix it and build the jar.
Thanks
I think I've finally figured it out ...
What I wound up doing is checking out Gerrit and building the events-log plugin in the Gerrit tree.
git clone https://gerrit.googlesource.com/gerrit
cd gerrit
git co v2.11.2
git submodule init
git submodule update
git clone https://gerrit.googlesource.com/plugins/events-log plugins/events-log
buck build plugins/events-log
I'm pretty sure you just want /root/buck/bin/buck build //:events-log. See http://buckbuild.com/concept/build_target.html
Eventually I found src/main/resources/Documentation/build.md, with which I finally succeeded in building events-log:
git clone https://gerrit.googlesource.com/plugins/events-log
git clone https://gerrit.googlesource.com/bucklets
cd events-log
git checkout stable-2.12
ln -s ../bucklets .
ln -s bucklets/buckversion .buckversion
ln -s bucklets/watchmanconfig .watchmanconfig
buck build plugin
This builds buck-out/gen/events-log.jar.
If the version is 2.14 or later, please use bazle to build
And I also try to build v2.13 with buck, you need to modify gerrit_plugin.bucklet which is under bucklets folder
Old content:
target_suffix = ''):
from multiprocessing import cpu_count
from os import path,getcwd
New content:
target_suffix = ''):
with allow_unsafe_import():
from multiprocessing import cpu_count
from os import path,getcwd
Then execute "buck build plugin
Out put:
ruhu#CCM-P700:~/tools/events-log$ buck build plugin
Download http://repo1.maven.org/maven2/com/google/code/gson/gson/2.3.1/gson-2.3.1-sources.jar
Download http://repo1.maven.org/maven2/com/google/code/gson/gson/2.3.1/gson-2.3.1.jar
Download http://repo1.maven.org/maven2/com/google/gerrit/gerrit-plugin-api/2.13/gerrit-plugin-api-2.13.jar
Parsing buck files: finished in 1.3 sec (100%)
Creating action graph: finished in 1.6 sec (100%)
Building: finished in 03:47.3 min (100%) 19/19 jobs, 19 updated, 94.7% cache mis
Total time: 03:50.3 min

Jenkins slave not working on mesos

I'm using the jenkins mesos plugin for CI.
Initially, I followed the following tutorial: http://www.ebaytechblog.com/2014/05/12/delivering-ebays-ci-solution-with-apache-mesos-part-ii/
but the jenkins itself was not being setup via this. (I got error could not load config.xml file, even there was one)
Then I followed https://rogerignazio.com/blog/scaling-jenkins-mesos-marathon/
, and I was able to run jenkins master (jenkin framework/scheduler), but when I define the scripts to run, the jenkins-slaves are not being created. I think I'm missing some configuration regarding slaves. Can you tell me, what's the reason that the slaves are not being created to run jobs.
On the jenkins build page, I'm getting :
(pending—Waiting for next available executor)
And in the jenkins-logs, i'm getting following error:
INFO: Provisioning Jenkins Slave on Mesos with 1 executors. Remaining excess workload: 0 executors)
Jun 19, 2015 4:02:55 PM hudson.slaves.NodeProvisioner$StandardStrategyImpl apply
INFO: Started provisioning MesosCloud from MesosCloud with 1 executors. Remaining excess workload: 0
Jun 19, 2015 4:02:55 PM org.jenkinsci.plugins.mesos.MesosComputerLauncher <init>
INFO: Constructing MesosComputerLauncher
Jun 19, 2015 4:02:55 PM org.jenkinsci.plugins.mesos.MesosSlave <init>
INFO: Constructing Mesos slave mesos-jenkins-1f8691df-9918-4175-87b3-bcc3de80b258 from cloud
Jun 19, 2015 4:03:05 PM org.jenkinsci.plugins.mesos.MesosComputerLauncher launch
INFO: Launching slave computer mesos-jenkins-1f8691df-9918-4175-87b3-bcc3de80b258
Jun 19, 2015 4:03:05 PM org.jenkinsci.plugins.mesos.MesosComputerLauncher launch
INFO: Sending a request to start jenkins slave mesos-jenkins-1f8691df-9918-4175-87b3-bcc3de80b258
Jun 19, 2015 4:03:05 PM org.jenkinsci.plugins.mesos.JenkinsScheduler requestJenkinsSlave
INFO: Enqueuing jenkins slave request
Jun 19, 2015 4:03:05 PM hudson.slaves.NodeProvisioner update
INFO: MesosCloud provisioning successfully completed. We have now 2 computer(s)
java.lang.NullPointerException
at org.jenkinsci.plugins.mesos.JenkinsScheduler.matches(JenkinsScheduler.java:306)
at org.jenkinsci.plugins.mesos.JenkinsScheduler.resourceOffers(JenkinsScheduler.java:252)
Jun 19, 2015 4:03:06 PM org.jenkinsci.plugins.mesos.JenkinsScheduler$1 run
SEVERE: The Mesos driver was aborted! Status code: 3
Edit: I think I'm getting error, because I've not defined any container port mappings.
Can anyone tell me how to do so?
Update : Actually there were many problems with 0.7 version of mesos plugin. So, I simply downgraded to 0.6 version.
For port mappings on marathon have a look here.
Hope this helps!

Jenkins Valgrind plugin appears to sum errors across tests

I am really happy to see that a Valgrind plugin exists for Jenkins. I use it for C/C++ code at work.
I have set it up in Jenkins (Linux Ubuntu 14.04 - the valgrind plugin version 0.22) to dump xml files.
My config is like this
I can see that I do get my memcheck files out in the xml directory
-rw------- 1 jenkins jenkins 1379 Oct 25 18:21 main.18996.memcheck
-rw------- 1 jenkins jenkins 1379 Oct 25 18:22 main.19100.memcheck
-rw------- 1 jenkins jenkins 2452 Oct 25 18:27 main.19489.memcheck
-rw------- 1 jenkins jenkins 2453 Oct 25 18:28 main.19605.memcheck
-rw------- 1 jenkins jenkins 2453 Oct 25 18:28 main.19692.memcheck
-rw------- 1 jenkins jenkins 2453 Oct 25 18:28 main.19774.memcheck
-rw------- 1 jenkins jenkins 1379 Oct 25 18:29 main.19963.memcheck
I can see that the memcheck files look fine with some "dirty underwear" such as
<error>
<unique>0xb</unique>
<tid>1</tid>
<kind>InvalidWrite</kind>
<what>Invalid write of size 4</what>
<stack>
<frame>
<ip>0x80483EB</ip>
<obj>/home/jenkins/workspace/DemoValgrind/main</obj>
<fn>main</fn>
<dir>/home/jenkins/workspace/DemoValgrind</dir>
<file>main.c</file>
<line>12</line>
</frame>
</stack>
<auxwhat>Address 0x41ae21c is not stack'd, malloc'd or (recently) free'd</auxwhat>
</error>
My problem is that the Valgrind plugin counts the sum of all errors in all of the main.*.memcheck files.
I expected a view more like this one:
https://wiki.jenkins-ci.org/download/attachments/60918012/valgrind-trend-graph.jpg?version=1&modificationDate=1336573302000
where the number of errors go up and down.
I must be configuring the Valgrind "Publish Valgrind Results" wrongly.
Is there a syntax where I can get the overview diagram (the URL just above) to match the number of errors according to the build, i.e.
not accumulate?

Jenkins svn plugin clean removal

After a simple apt-get update on ubuntu 10.11, I lost the svn polling possibility. None of my projects, that could poll svn, can anymore.
The plugin Update center shows an update is available for this plugin ( 1.34 -> 1.37 ) but update does not work, wether with web interface or cli.
Jenkins logs show a whole bunch of errors relating the subversion plugin
ATTENTION: Caught exception evaluating: it.isTagged(). Reason: java.lang.NullPointerException
java.lang.NullPointerException
at hudson.scm.SubversionTagAction.isTagged(SubversionTagAction.java:157)
[...]
25 janv. 2012 16:34:37 hudson.ExpressionFactory2$JexlExpression evaluate
ATTENTION: Caught exception evaluating: it.isTagged(). Reason: java.lang.NullPointerException
[...]
INFO: Loaded all jobs
25 janv. 2012 16:34:06 hudson.util.RobustReflectionConverter doUnmarshal
ATTENTION: Skipping a non-existent field list
com.thoughtworks.xstream.converters.reflection.NonExistentFieldException: No such field hudson.scm.SubversionTagAction.list
etc ... etc ...
I removed by hand :
drwxr-xr-x 4 jenkins nogroup 4096 2012-01-25 16:33 subversion
-rw-r--r-- 1 jenkins nogroup 2105983 2012-01-24 18:34 subversion.bak
-rw-r--r-- 1 jenkins nogroup 2105983 2012-01-24 18:34 subversion.hpi
-rw-r--r-- 1 jenkins nogroup 0 2012-01-25 16:31 subversion.hpi.pinned
-rw-r--r-- 1 jenkins nogroup 2103308 2012-01-25 16:31 subversion.jpi
but the plugin keeps being listed in the update area.
Question : what is the proper procedure to remove EVERY and ALL references to this plugin, to make a very clean reinstall ?
thanks
it seems to be common problem
https://issues.jenkins-ci.org/browse/JENKINS-12449
try these steps
Downgrade jenkins, restart
Disable subversion plugin, restart
Upgrade jenkins, restart
Enable subversion plugin, restart
Edit each build configuration, enable subversion, save.

Resources