I am new to jenkins, I upgraded a couple of plugins(don't remember which), after that I when I try java -jar jenkins.war I end up getting the following error.
jenkins.InitReactorRunner$1 onTaskFailed
SEVERE: Failed Loading global config
java.io.IOException: Unable to read /home/.jenkins/config.xml
I went through several links which address this issue, but no luck yet. In this link which I found https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764711 it says some plugins are missing, and surprisingly, my /home/.jenkins/plugins/ is empty!!!
How do I restore the necessary plugins from my command line?
I am using CentOS release 6.8 (Final)
Thank you :)
I had encountered this issue somedays back,however after restarting jenkins service solved the issue.
The best you can do now is rename your config file. This way jenkins will load with the default startup.
Related
Trying to run my embedded mysql based Unit tests I get an exception with this part:
Failed to instantiate [com.wix.mysql.EmbeddedMysql]: Factory method 'getEmbeddedMysql' threw exception; nested exception is com.wix.mysql.exceptions.CommandFailedException: Command 'CREATE USER 'sa'#'%' IDENTIFIED BY '';' on schema 'information_schema' failed with message 'Stream closed'
The same unit test and environment setup work on my MacBook
This machine with the error is an Ubuntu 20.04
Wix version is 4.6.2; Java 8, mysql.connector 8.0.24
I tried changing the dependencies versions and also tried with Java 11.
Run from within IntelliJ and on the command line. Same result.
Let me put the full comment I found in Github which helped me to fix this and I'm pretty sure most of the people seeing this in Ubuntu will find this as the solution:
I had this same issue with MySQL 5.7, while working on another open source project. I cloned the wix-embedded-mysql repository and ran the tests using the master branch, which also failed in the exact same way, except that I received a longer, more thorough message in the catch.
The issue was that I was on Ubuntu and did not have the ncurses 5 shared library installed. On ubuntu, I installed libncurses5 (apt install libncurses5) and everything started working (all tests on wix, and on my project).
I hope this helps resolve the issue.
Thanks to https://github.com/codesplode
I am facing an issue when I try to submit my Spark application on Yarn from eclipse. I try to submit a simple SVM program, but i gives below error. I Have macbook, and I will be so thankful if somebody give me detailed answer
16/09/17 10:04:19 ERROR SparkContext: Error initializing SparkContext.
java.lang.IllegalStateException: Library directory '.../MyProject/assembly/target/scala-2.11/jars' does not exist; make sure Spark is built.
at org.apache.spark.launcher.CommandBuilderUtils.checkState(CommandBuilderUtils.java:248)
at org.apache.spark.launcher.CommandBuilderUtils.findJarsDir(CommandBuilderUtils.java:368)
at org.apache.spark.launcher.YarnCommandBuilderUtils$.findJarsDir(YarnCommandBuilderUtils.scala:38)
at org.apache.spark.deploy.yarn.Client.prepareLocalResources(Client.scala:500)
at org.apache.spark.deploy.yarn.Client.createContainerLaunchContext(Client.scala:834)
at org.apache.spark.deploy.yarn.Client.submitApplication(Client.scala:167)
at org.apache.spark.scheduler.cluster.YarnClientSchedulerBackend.start(YarnClientSchedulerBackend.scala:56)
at org.apache.spark.scheduler.TaskSchedulerImpl.start(TaskSchedulerImpl.scala:149)
at org.apache.spark.SparkContext.<init>(SparkContext.scala:500)
at SVM.main(SVM.java:21)
Go to
Run Configurations --> Environment
in Eclipse and add the environment variable SPARK_HOME.
So, finally trying to come up from the stone age, upgraded 1.514 to 1.644 without realizing all slaves need to be running Java 1.7 as well. So I install Java 7 on my master, swap .war files to run 1.644 and start it up. Slaves don't come up due to the aforementioned Java req. After stopping Jenkins and removing Java 1.7, I swap back to the 1.514 .war and start Jenkins back up. Now my build history is gone from all jobs with this error in the log:
WARNING: could not load /var/lib/jenkins/jobs/[job name removed]/builds/312 hudson.util.IOException2: Invalid directory name /var/lib/jenkins/jobs/YYMM Check and Build/builds/312 at hudson.model.Run.parseTimestampFromBuildDir(Run.java:354)
...
Caused by: java.text.ParseException: Unparseable date: "312" at java.text.DateFormat.parse(DateFormat.java:354) at hudson.model.Run.parseTimestampFromBuildDir(Run.java:352) ... 155 more
The only things I can find online relate to issues that were fixed pre-1.514. Anyone have any ideas? Thanks for helping.
Installed the latest version that works with Java 1.6: 1.607, and that fixed the issue as soon as it started up.
Your issues are likely related the change to the build directory naming, see JENKINS-24380+Migration.
In case you want to downgrade, there is an “unmigrate” script provided to reverse the migration of $JENKINS_HOME. To do this:
Start Jenkins ≥1.597.
Visit http://server/jenkins/JENKINS-24380/ and copy the unmigration instruction.
Shut down Jenkins completely.
Run the command as instructed by the step above.
Start Jenkins <1.597 with the same $JENKINS_HOME.
Ok I'll just reformulate my question with new clues I found as I didn't get an answer with the previous one.
So!
Jenkins is using the wrong commons-io.
I'm running version 1.598 of Jenkins. In the "about" section, I can see that it's using commons-io version 2.4.
When I run my maven project on Jenkins, project build is a success, but when Jenkins start running PMD or checkstyle analysis, I have the following error:
java.lang.NoSuchMethodError: org.apache.commons.io.IOUtils.lineIterator(Ljava/io/InputStream;Ljava/nio/charset/Charset;)Lorg/apache/commons/io/LineIterator;
at hudson.plugins.analysis.util.JavaPackageDetector.detectPackageName(JavaPackageDetector.java:34)
at hudson.plugins.analysis.util.AbstractPackageDetector.detectPackageName(AbstractPackageDetector.java:25)
at hudson.plugins.analysis.util.PackageDetectors.detectPackageName(PackageDetectors.java:30)
at hudson.plugins.checkstyle.parser.CheckStyleParser.convert(CheckStyleParser.java:96)
at hudson.plugins.checkstyle.parser.CheckStyleParser.parse(CheckStyleParser.java:72)
at hudson.plugins.analysis.core.AbstractAnnotationParser.parse(AbstractAnnotationParser.java:54)
at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:323)
at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:281)
at hudson.plugins.analysis.core.FilesParser.parseSingleFile(FilesParser.java:239)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:198)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
at hudson.FilePath.act(FilePath.java:989)
...
This method (lineIterator(Ljava/io/InputStream;Ljava/nio/charset/Charset;)) exists in commons-io 2.4 so my guess is that Jenkins is using another jar.
I ran a locate on the server for commons-io and here is the result:
/etc/nexus/2.10/nexus/WEB-INF/lib/commons-io-2.4.jar
/etc/nexus/sonatype-work/nexus/storage/central/commons-io
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/1.4
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/2.2
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/2.4
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/1.4/commons-io-1.4.jar
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/1.4/commons-io-1.4.pom
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/2.2/commons-io-2.2.jar
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/2.2/commons-io-2.2.pom
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/2.4/commons-io-2.4.jar
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/2.4/commons-io-2.4.pom
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/1.4
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/2.2
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/2.4
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/1.4/commons-io-1.4.jar
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/1.4/commons-io-1.4.pom
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/2.2/commons-io-2.2.jar
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/2.2/commons-io-2.2.pom
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/2.4/commons-io-2.4.jar
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/2.4/commons-io-2.4.pom
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/jars
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/poms
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/jars/commons-io-1.4.jar
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/jars/commons-io-2.2.jar
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/jars/commons-io-2.4.jar
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/poms/commons-io-1.4.pom
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/poms/commons-io-2.2.pom
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/poms/commons-io-2.4.pom
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/jars
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/poms
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/jars/commons-io-1.4.jar
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/jars/commons-io-2.2.jar
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/jars/commons-io-2.4.jar
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/poms/commons-io-1.4.pom
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/poms/commons-io-2.2.pom
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/poms/commons-io-2.4.pom
/home/jenkins/.m2/repository/commons-io
/home/jenkins/.m2/repository/commons-io/commons-io
/home/jenkins/.m2/repository/commons-io/commons-io/1.4
/home/jenkins/.m2/repository/commons-io/commons-io/1.4/_maven.repositories
/home/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar
/home/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar.md5
/home/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.pom
/home/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.pom.md5
/home/sonarqube-4.5.2/lib/common/commons-io-2.4.jar
/root/nexus-2.10.0-02/nexus/WEB-INF/lib/commons-io-2.4.jar
/usr/share/doc/libcommons-io-java
/usr/share/doc/libcommons-io-java/NOTICE.txt
/usr/share/doc/libcommons-io-java/RELEASE-NOTES.txt.gz
/usr/share/doc/libcommons-io-java/changelog.Debian.gz
/usr/share/doc/libcommons-io-java/copyright
/usr/share/java/commons-io-1.4.jar
/usr/share/java/commons-io.jar
/usr/share/maven-repo/commons-io
/usr/share/maven-repo/commons-io/commons-io
/usr/share/maven-repo/commons-io/commons-io/1.4
/usr/share/maven-repo/commons-io/commons-io/debian
/usr/share/maven-repo/commons-io/commons-io/1.4/commons-io-1.4.jar
/usr/share/maven-repo/commons-io/commons-io/1.4/commons-io-1.4.pom
/usr/share/maven-repo/commons-io/commons-io/debian/commons-io-debian.jar
/usr/share/maven-repo/commons-io/commons-io/debian/commons-io-debian.pom
/var/cache/jenkins/war/WEB-INF/lib/commons-io-2.4.jar
/var/lib/dpkg/info/libcommons-io-java.list
/var/lib/dpkg/info/libcommons-io-java.md5sums
/var/lib/jenkins/.m2/repository/commons-io
/var/lib/jenkins/.m2/repository/commons-io/commons-io
/var/lib/jenkins/.m2/repository/commons-io/commons-io/1.4
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.2
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.4
/var/lib/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar
/var/lib/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar.sha1
/var/lib/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.pom
/var/lib/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.pom.sha1
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar.sha1
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.pom
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.pom.sha1
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar.sha1
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.pom
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.pom.sha1
/var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/commons-io-2.2.jar
As you can see there is some occurences of the commons-io 1.4, which does not contains the missing method! So it must be the one Jenkins uses.
In the log of the project I can see:
java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.6.jar:/usr/share/maven2/boot/classworlds.jar hudson.maven.agent.Main /usr/share/maven2/ /var/cache/jenkins/war/WEB-INF/lib/remoting-2.49.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.6.jar 56025
And in the locate:
/home/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar
/usr/share/java/commons-io-1.4.jar
/usr/share/maven-repo/commons-io/commons-io/1.4/commons-io-1.4.jar
/var/cache/jenkins/war/WEB-INF/lib/commons-io-2.4.jar
/var/lib/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar
So I guess the problem lies somewhere around here, but I have no idea how to fix it!
I can't just remove occurences of commons-io 1.4 from the server as some other programs might use them.
Thank you for your help,
Guillaume
We found the solution!
It seems that this was cause by the maven version used on the server (2.2).
I upgraded it in Jenkins to 3.2.2 and it now works perfectly!
I am trying to run a jenkins build. The below is my configuration.
Jenkins Version : 1.445
Deployment : as a WAR
Java : 1.7 (Server 64 bit)
Tomcat Ver : 7.0.23
It gives the following error:
Started by user jenkins-admin
Updating https://myrepo.mycompany.com/svn/repos/myrepo
ERROR: Failed to update https://myrepo.mycompany.com/svn/repos/myrepo
org.tmatesoft.svn.core.SVNException: svn: OPTIONS /svn/repos/myrepo failed
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:298)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:283)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:271)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:533)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:98)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1011)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getRepositoryUUID(DAVRepository.java:148)
at org.tmatesoft.svn.core.wc.SVNBasicClient.createRepository(SVNBasicClient.java:342)
at org.tmatesoft.svn.core.wc.SVNBasicClient.createRepository(SVNBasicClient.java:330)
at org.tmatesoft.svn.core.wc.SVNUpdateClient.update(SVNUpdateClient.java:535)
at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:401)
at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:135)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:136)
at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:787)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:768)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:752)
at hudson.FilePath.act(FilePath.java:783)
at hudson.FilePath.act(FilePath.java:765)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:742)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:684)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1195)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:571)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:460)
at hudson.model.Run.run(Run.java:1404)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Caused by: org.tmatesoft.svn.core.SVNErrorMessage: svn: OPTIONS /svn/repos/myrepo failed
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:200)
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:146)
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:89)
... 27 more
Caused by: org.tmatesoft.svn.core.SVNException: svn: OPTIONS request failed on '/svn/repos/myrepo'
svn: unknown host
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
The problem is it does NOT fail all the time. However, it fails 70-80% of the time.
The credentials and the URL for svn repo are correct.
UPDATE: I have tried every possibility now. The problem persists.
I tried with JDK 6 (both 32 and 64 bit). The problem does NOT go.
I am working on RHEL 5.6. Can anybody please help?
I noticed this line:
Caused by: org.tmatesoft.svn.core.SVNException: svn: OPTIONS request failed on '/svn/repos/myrepo'
svn: unknown host
Whenever I have a problem with Jenkins, I log into the Jenkins system as the user running Jenkins, go to the working directory inside Jenkins, and from a command line, try to do whatever Jenkins is attempting to do (like update my working directory). That usually will help you point out a particular error.
Try running an update a few times from the Jenkin's job's working directory and see if you get the same error. If you do, it could point out a network issue (unknown host).
If you can run updates from the working directory on your Jenkins server in your job's working directory, then the problem may lie with SVNKit itself. What version of Subversion and SVNKit are you using?
Try deleting the working directory and see if a clean checkout helps.
I noticed this error after upgrading my "Jenkins Subversion Plugin" from v1.42 to v1.44.
To Fix:
Please check the version of "Jenkins Subversion plugin" if it v1.44, downgrade to lower version.
Seems like we have some issues with the new Subversion Plugin.
The node running the build can not resolve the host name. Possibly a fully qualified name is required: rather than mysvnbox something like mysvnbox.mydomain.com; Or possibly the node is blocked by a firewall. The fact that it works sometimes would seem to indicate at least one node has visibility or can use an abbreviated domain specification. Good luck.
I have faced the same issue in Jenkins. It was kept on failing during checking out the code. I tried to increase Jenkins work space but it was prompted for the crowd authentication. It was failed to update and I tried clear the authentication date from subversion and restarted my build server (You can log out with your credentials and log-in). This will work.