Jenkins-CVS plugin - Command Aborted during request processing - jenkins

The Jenkins build job fails every now and then when trying to update the workspace with latest in CVS with the following error:
[EnvInject] - Loading node environment variables.
Building on master in workspace
Using locally configured password for connection to :pserver:myuser#server:/export/home/cvsroot
cvs update -d -P -r HEAD -D 08 Jan 2013 06:29:03 -0500 prjname
ERROR: CVS Command aborted: Aborted during request processing
org.netbeans.lib.cvsclient.command.CommandAbortedException: Aborted during request processing
at org.netbeans.lib.cvsclient.Client.handleResponse(Client.java:673)
at org.netbeans.lib.cvsclient.Client.processRequests(Client.java:598)
at org.netbeans.lib.cvsclient.command.update.UpdateCommand.execute(UpdateCommand.java:347)
at org.netbeans.lib.cvsclient.Client.executeCommand(Client.java:710)
at hudson.scm.AbstractCvs$1.invoke(AbstractCvs.java:243)
at hudson.scm.AbstractCvs$1.invoke(AbstractCvs.java:223)
at hudson.FilePath.act(FilePath.java:842)
at hudson.FilePath.act(FilePath.java:824)
at hudson.scm.AbstractCvs.perform(AbstractCvs.java:223)
at hudson.scm.AbstractCvs.checkout(AbstractCvs.java:140)
at hudson.scm.CVSSCM.checkout(CVSSCM.java:318)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1256)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
at hudson.model.Run.execute(Run.java:1502)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
ERROR: Cvs task failed
If I restart the build the update goes through fine.
Jenkins Version : 1.478
Jenkins-CVS Plugin Version : 2.7

The CommandAbortedException you're seeing is being thrown because the code received an InterruptedIOException.
This signifies that the thread threw an InterruptedException whilst trying to communicate with your CVS Server, so either someone has hit the cancel button on your job, or you have a process that's trying to end Java threads.

Related

Chef - Recipe package fails to find candidate version

I am installing and configuring a very basic Jenkins installation using Chef. When i attempt to run the following recipe:
include_recipe "apt::default"
apt_repository "jenkins" do
uri "http://pkg.jenkins-ci.org/debian"
key "http://pkg.jenkins-ci.org/debian/jenkins-ci.org"
components ["binary/"]
action :add
end
package "jenkins" do
version '2.62'
end
service "jenkins" do
supports [:stop, :start, :restart]
action [:start, :enable]
end
I receive the following errors (displayed in the terminal):
192.168.9.207 [2017-05-25T10:50:58-04:00] ERROR: Running exception handlers
192.168.9.207 Running handlers complete
192.168.9.207 [2017-05-25T10:50:58-04:00] ERROR: Exception handlers complete
192.168.9.207 Chef Client failed. 2 resources updated in 20 seconds
192.168.9.207 [2017-05-25T10:50:58-04:00] INFO: Sending resource update report (run-id: 2b59b80e-b787-4e93-805b-837b4d3264fb)
192.168.9.207 [2017-05-25T10:50:58-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
192.168.9.207 [2017-05-25T10:50:58-04:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
192.168.9.207 [2017-05-25T10:50:58-04:00] ERROR: apt_package[jenkins] (jenkins-installation::default line 21) had an error: Chef::Exceptions::Package: No candidate version available for jenkins
192.168.9.207 [2017-05-25T10:50:58-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
The error explains that there is no candidate version available for Jenkins. After the run fails, if I run sudo apt-get update on the managed node I receive the following error:
Err http://pkg.jenkins-ci.org trusty/binary/ amd64 Packages
404 Not Found
Err http://pkg.jenkins-ci.org trusty/binary/ i386 Packages
404 Not Found
Ign http://pkg.jenkins-ci.org trusty/binary/ Translation-en_US
Ign http://pkg.jenkins-ci.org trusty/binary/ Translation-en
Fetched 5,976 kB in 3s (1,528 kB/s)
W: Failed to fetch http://pkg.jenkins-ci.org/debian/dists/trusty/binary//binary-amd64/Packages 404 Not Found
W: Failed to fetch http://pkg.jenkins-ci.org/debian/dists/trusty/binary//binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
I am fairly new to Chef. This error appears to be related to retrieving a Jenkins package, however I am not sure how to remedy this error. Please let me know if additional information is required to troubleshoot this issue.
Thank you to everybody in advance for any guidance you are able to provide. I have searched through the Chef documentation but haven't seen much aside from specifying the package version: https://docs.chef.io/resource_package.html.
Specify distribution 'binary/' instead of components 'binary/'. This will fix the 404s that you get because of trusty/binary/.
At least, this is what I see from the "official" Jenkins cookbook, which I btw. suggest to use.
EDIT: So the result would be:
apt_repository "jenkins" do
uri "http://pkg.jenkins-ci.org/debian"
key "http://pkg.jenkins-ci.org/debian/jenkins-ci.org"
distribution "binary/"
end

How to run specific tests using SBT Jenkins Plugin for ScalaTest test

Currently we are using IntelliJ, Scala, SBT to kick off our tests in our local enviroment. With SBT command line, we can specify specific test, suites, wildcards, as instructed here:
ScalaTest.org Page
Such as "test-only *RedSuite"
However on our CI Jenkins server, with the SBT pluging, when specifying this, it gives an error.
In the action field, the following values were used:
Action:compile test-only test.package.name
Using the following does work for ALL tests:
Action:compile test
[success] Total time: 240 s, completed Apr 28, 2014 12:29:36 PM
[error] Expected ID character
[error] Not a valid command: org (similar: export)
[error] Expected project ID
[error] Expected configuration
[error] Expected ':' (if selecting a configuration)
[error] Expected key
[error] Not a valid key: org (similar: fork, run, doc)
[error] org.company.scalatest.abc.regressionsuite
[error] ^
Build step 'Build using sbt' changed build result to FAILURE
Build step 'Build using sbt' marked build as failure
Recording test results
Does anyone know if there is a way we can pass these parameters through the jenkins SBT plugin?
This is a quoting problem, your Action field is parsed as 3 commands:
compile
test-only
org.company.scalatest.abc.regressionsuite
And it chokes because that org is not a valid command.
Using compile "test-only org.company.scalatest.abc.regressionsuite" should fix that.

Error while executing the rcov report, rails stats report and brakeman warnings from Jenkins

I am using Jenkins for deployment process and it works fine. When i try to take rcov report rails stats report and brakeman warnings.
[ubuntu#xx.xxx.xxx.xx] executing command
** [out :: ubuntu#xx.xxx.xxx.xx] Starting Unicorn..
command finished in 2228ms
POST BUILD TASK : SUCCESS
END OF POST BUILD TASK : 0
ERROR: Publisher hudson.plugins.brakeman.BrakemanPublisher aborted due to exception
java.io.FileNotFoundException: /home/kannan/.jenkins/workspace/Publisher Dev/brakeman-output.tabs (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:137)
at hudson.FilePath.read(FilePath.java:1570)
at hudson.FilePath.readToString(FilePath.java:1595)
at hudson.plugins.brakeman.BrakemanPublisher.perform(BrakemanPublisher.java:99)
at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:146)
at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:331)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
at hudson.model.Run.execute(Run.java:1618)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247)
Publishing rails stats report...
Build failed, skipping rcov coverage report
Build step 'Publish Rcov report' marked build as failure
Finished: FAILURE
What am i supposed to do
Look at the error:
java.io.FileNotFoundException: /home/kannan/.jenkins/workspace/Publisher Dev/brakeman-output.tabs (No such file or directory)
This means Jenkins can't find the report generated by Brakeman. Either you have not set up the job correctly or Brakeman is failing for some reason. You should check the console output for Brakeman errors and verify you have configured the job correctly as described here.

Adding Post-build Actions Sonar causes Jenkins build to fail

Using Jenkins ver. 1.494; Jenkins Sonar Plugin 2.0.1; Sonar server 3.4.1.
Maven job.
Adding Post-build Actions Sonar causes Jenkins build to fail (ERROR: Failed to parse POMs).
Deleting Sonar action then again makes it pass.
Sync complete, took 35 ms
Parsing POMs
[Atlas_Phevos] $ java -Xmx512m -XX:MaxPermSize=128m -cp /home/jenkins/jenkins-home/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/home/jenkins/jenkins-home/tools/Maven/Maven304/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/jenkins/jenkins-home/tools/Maven/Maven304 /usr/local/tomcat-6.0.32/webapps/jenkins/WEB-INF/lib/remoting-2.19.jar /home/jenkins/jenkins-home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar 60147
ERROR: Failed to parse POMs
java.io.IOException: Cannot run program "java" (in directory "/home/jenkins/jenkins-home/workspace/Atlas_Phevos"): java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:763)
at hudson.Launcher$ProcStarter.start(Launcher.java:353)
at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:223)
at hudson.maven.ProcessCache.get(ProcessCache.java:231)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:670)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
at hudson.model.Run.execute(Run.java:1543)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 12 more
Skipping sonar analysis due to bad build status FAILURE
Sending e-mails to: ____
Finished: FAILURE
I haven't put updated setting.xml on Jenkins server, I guess Jenkins should take its own configuration for Sonar (sever, JDBC connection etc.)
UPDATE: Problem still exists. I tried several jobs to start sonar analysis.
From your exception it looks like Jenkins cannot find your JDK. In your job configuration you can expand the Sonar properties. Make sure that a valid JDK from your Jenkins config is selected under the JDK option.
While you are looking at the properties make sure the pom file specified under Root POM is correct.
Try that...

BuildHive Jenkins build error

I'm trying to use Cloudbees' BuildHive service to build my GitHub-hosted project - bkemu-android. This is android-maven-plugin controlled project, so Jenkins job was created using "Maven job" template. But project build is just failing constantly with some obscure log message:
Parsing POMs
[bkemu-android] $ /usr/bin/tenant-isolate /opt/jdk/jdk1.6.latest/bin/java -XX:MaxPermSize=128m -cp /scratch/jenkins/maven3-agent.jar:/opt/maven/latest/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /opt/maven/latest /scratch/jenkins/slave.jar /scratch/jenkins/maven3-interceptor.jar 52322
setup process failed (1): Success
ERROR: Failed to launch Maven. Exit code = 1
What I should change in my project or BuildHive job settings to successfully build my project?

Resources