Jenkins Agent JNLP4 Connection Issue - jenkins

I am having an issue with a Jenkins agent not being able to connect with the Controller when a specific job ends. All other jobs are completed without any issues.
Basically, the job runs on the agent without any issues and gives out the expected result but, fails when it is time to hand over the job to the Jenkins master.
Both Controller and Agent are windows server VMs.
I saw multiple questions about this issue in multiple forums and Jenkins support but none of the suggested solutions is able to solve my issue.
The error message is:
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection to hostname/IP:16076
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1797)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
at hudson.remoting.Channel.call(Channel.java:1001)
at hudson.FilePath.act(FilePath.java:1166)
at hudson.FilePath.act(FilePath.java:1155)
at hudson.FilePath.copyTo(FilePath.java:2493)
at hudson.FilePath.copyTo(FilePath.java:2448)
at hudson.plugins.logparser.LogParserStatusComputer.computeStatusMatches(LogParserStatusComputer.java:88)
at hudson.plugins.logparser.LogParserStatusComputer.access$000(LogParserStatusComputer.java:22)
at hudson.plugins.logparser.LogParserStatusComputer$1.call(LogParserStatusComputer.java:54)
at hudson.plugins.logparser.LogParserStatusComputer$1.call(LogParserStatusComputer.java:47)
at hudson.remoting.UserRequest.perform(UserRequest.java:211)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:376)
at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:122)
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from hostname/IP:50925
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1797)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
at hudson.remoting.Channel.call(Channel.java:1001)
at hudson.plugins.logparser.LogParserStatusComputer.computeStatusMatches(LogParserStatusComputer.java:47)
at hudson.plugins.logparser.LogParserStatusComputer.<init>(LogParserStatusComputer.java:36)
at hudson.plugins.logparser.LogParserParser.parseLogBody(LogParserParser.java:355)
at hudson.plugins.logparser.LogParserParser.parseLog(LogParserParser.java:165)
at hudson.plugins.logparser.LogParserPublisher.perform(LogParserPublisher.java:119)
at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:806)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:755)
at hudson.model.Build$BuildExecution.post2(Build.java:178)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:699)
at hudson.model.Run.execute(Run.java:1913)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:99)
at hudson.model.Executor.run(Executor.java:431)
java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index 3
e:\jenkbuilds\(.+)\builds/[0-9]+(/.*)?
^
at java.util.regex.Pattern.error(Unknown Source)
at java.util.regex.Pattern.escape(Unknown Source)
at java.util.regex.Pattern.atom(Unknown Source)
at java.util.regex.Pattern.sequence(Unknown Source)
at java.util.regex.Pattern.expr(Unknown Source)
at java.util.regex.Pattern.compile(Unknown Source)
at java.util.regex.Pattern.<init>(Unknown Source)
at java.util.regex.Pattern.compile(Unknown Source)
at jenkins.security.s2m.RunningBuildFilePathFilter.op(RunningBuildFilePathFilter.java:91)
at jenkins.ReflectiveFilePathFilter.read(ReflectiveFilePathFilter.java:21)
at jenkins.FilePathFilterAggregator.read(FilePathFilterAggregator.java:75)
at jenkins.SoloFilePathFilter.read(SoloFilePathFilter.java:66)
at hudson.FilePath.reading(FilePath.java:3497)
at hudson.FilePath.access$300(FilePath.java:213)
at hudson.FilePath$CopyTo.invoke(FilePath.java:2507)
at hudson.FilePath$CopyTo.invoke(FilePath.java:2499)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3338)
at hudson.remoting.UserRequest.perform(UserRequest.java:211)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:376)
at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18)
at hudson.remoting.CallableDecoratorList.lambda$applyDecorator$0(CallableDecoratorList.java:19)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:80)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Build step 'Console output (build log) parsing' marked build as failure
Archiving artifacts
Recording test results
Finished: FAILURE```
Please let me know if you would like to have more information.
Any help will be greatly appriciated.

Illegal/unsupported escape sequence near index 3 e:\jenkbuilds\(.+)\builds/[0-9]+(/.*)?
Build step 'Console output (build log) parsing' marked build as failure
Archiving artifacts
It would seem it's interpreting your path regex as an escape character "\j*". Wherever that regex is, try double slash, "e:\\jenbuilds", or try chage to unix style "/".
It's either the ArchiveArtifacts step or right before that. Show your config steps?

I managed to resolve the issue using #Ian W comment. When diving into the 'Log Parser' plugin's settings, I found that my last update to Jenkins plugins reset its settings.
I wasn't aware that there is a modified rule in Jenkins for this plugin.
To be more specific:
To find the list of rules:
Manage Jenkins - > Configure System -> Multi-job Retry Rule -> Log Parser Rules
To update the job:
Job -> Configure -> Post-Build Actions -> Use Project Rule -> paste rule
I hope this will turn to be useful for someone as this was quite of a challenge to find and fix.

Related

SVN E175002 - Jenkins Failed to Checkout Job

Jenkins keeps failing to build my job because of what appears to be an SVN error (see below; I replaced the URLs and job name for security purposes). There's been other posts about this error but none of them seem to help. Also, I noticed that the workspace is not copying all the necessary files over from the SVN repository to the workspace. In fact, it's only fetching the python virtual environment folder and a couple others and none of the source code files.
Sorry about formatting, this is my first post on here. Thank you for the help.
Workspace appear to be locked, so getting a fresh workspace
Cleaning local Directory.
Checking out job at revision '2022-09-13T10:46:48.385 -0400' --quiet
Using sole credentials Subversion Credential in realm ‘url Subversion Repository’
ERROR: Failed to check out job
org.tmatesoft.svn.core.SVNException: svn: E175002: Connection reset
svn: E175002: REPORT request failed on '.../!svn/vcc/default'
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:112)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:96)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:765)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:352)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:340)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:910)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:363)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.runReport(DAVRepository.java:1361)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.update(DAVRepository.java:859)
at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.update(SVNUpdateClient16.java:507)
at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.doCheckout(SVNUpdateClient16.java:915)
at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:66)
at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:18)
at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
at hudson.scm.subversion.CheckoutUpdater$SubversionUpdateTask.perform(CheckoutUpdater.java:133)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:168)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:176)
at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:185)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:168)
at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:1073)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:1049)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:1022)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3317)
at hudson.remoting.UserRequest.perform(UserRequest.java:211)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:376)
at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:119)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at org.tmatesoft.svn.core.internal.util.ChunkedInputStream.read(ChunkedInputStream.java:75)
at java.util.zip.InflaterInputStream.fill(Unknown Source)
at java.util.zip.InflaterInputStream.read(Unknown Source)
at java.util.zip.GZIPInputStream.read(Unknown Source)
at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at org.tmatesoft.svn.core.internal.io.dav.http.XMLReader.read(XMLReader.java:39)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:898)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:863)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:220)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:451)
... 31 more
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at org.tmatesoft.svn.core.internal.util.ChunkedInputStream.read(ChunkedInputStream.java:75)
at java.util.zip.InflaterInputStream.fill(Unknown Source)
at java.util.zip.InflaterInputStream.read(Unknown Source)
at java.util.zip.GZIPInputStream.read(Unknown Source)
at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at org.tmatesoft.svn.core.internal.io.dav.http.XMLReader.read(XMLReader.java:39)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:898)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:863)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:220)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:451)
Caused: org.tmatesoft.svn.core.SVNException: svn: E175002: Connection reset
svn: E175002: REPORT request failed on '.../!svn/vcc/default'
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:112)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:96)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:765)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:352)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:340)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:910)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:363)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.runReport(DAVRepository.java:1361)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.update(DAVRepository.java:859)
at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.update(SVNUpdateClient16.java:507)
at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.doCheckout(SVNUpdateClient16.java:915)
at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:66)
at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:18)
at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
at hudson.scm.subversion.CheckoutUpdater$SubversionUpdateTask.perform(CheckoutUpdater.java:133)
Retrying after 10 seconds.
#m1haus I think I figured it out. The connection was timing out/resetting because it was fetching too many files from the repo. There was a lot because it was getting all of my python venv files. So I only committed the source code files to svn and not the venv files and it worked.
We were experiencing the same behavior in our company. We are using latest VisualSVN Server v5. Whenever we checked-out huge amount of files (e.g. tons of tools), we were seeing exactly this non-informative error. Since we are Jenkins noobs, it was quite a struggle so I hope this helps.
Initially I tried suggested fix with -Dhudson.spool-svn=true, but that didn't help at all. Later on I went to see the source of Jenkins SVN client to check whether this flag is still applicable and used in the source. It is. But when browsing though the docs I realized that I am setting the flag wrong in Jenkins config file. Since when I went to Jenkins console and called System.getProperty('hudson.spool-svn'), it returned nothing. So I copied -Dhudson.spool-svn=true from JENKINS_JAVA_OPTIONS to JENKINS_ARGS, restarted the service and since then System.getProperty('hudson.spool-svn') returned value true. But that didn't solve the issue.
After updating JDK to v17 on both master and slave I could occasionally see a different error. Something about connection timeout. After some googling we increased http-timeout and situation improved. I could still see this issue when running a stress test (more parallel checkouts) after few hours.
Searching though VisualSVN page I discovered page talking about compression and caching. We disabled the compression as recommended for fast networks (1+GB/s in our case) and increased cache size (1GB I think). Since then all stress tests passed and even multiple paralel checkouts running 9 hours finished. After enabling the compression back on, the issue reappeared.
So I am pretty sure following steps are not solution for the root cause, but rather for its effects. I believe the root cause is combination of our network and not robust Jenkins SVN client
TL;DR
Add -Dhudson.spool-svn=true to JENKINS_ARGS and to JENKINS_JAVA_OPTIONS under /etc/sysconfig/jenkins and restart the service
Verify that hudson.spool-svn property was set by calling System.getProperty('hudson.spool-svn') under <your_jenkins_url>/script URL. It should return true
Increase http-timeout on your SVN server, see e.g. https://www.visualsvn.com/support/topic/00170/
In case of VisualSVN server, adjust cache size and disable compression, see https://www.visualsvn.com/support/topic/00114/

Jenkins plug-in install issues

I am trying to use Jenkins first time for automated deployments. Installed Jenkins and can't install plug-ins. I see below errors. Please advise.
Preparation
Checking internet connectivity
Checking update center connectivity
java.io.IOException: Server returned HTTP response code: 401 for URL: http://updates.jenkins-ci.org/update-center.json?uctest at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at hudson.model.UpdateCenter$UpdateCenterConfiguration.testConnection(UpdateCenter.java:905) at hudson.model.UpdateCenter$UpdateCenterConfiguration.checkUpdateCenter(UpdateCenter.java:718) at hudson.model.UpdateCenter$ConnectionCheckJob.run(UpdateCenter.java:1079) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110) at java.lang.Thread.run(Unknown Source)
MSBuild Plugin
Failure -
hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/plugins/msbuild/1.26/msbuild.hpi
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:821)

How to prevent Jenkins from resuming an aborted job

I had aborted a job by clicking the [x] button next to it's name in the Build Executor Status panel of Jenkins, yet the job is still present and waiting.
Even when I restart Jenkins it will resume building. When I take a look at the console I see:
Sending interrupt signal to process Click here to forcibly terminate
running steps java.io.IOException: Aborting build at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source) at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source) at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at
org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
at Script1.run(Script1.groovy:1) at
groovy.lang.GroovyShell.evaluate(GroovyShell.java:585) [SNIP]
Finished: ABORTED Resuming build at Tue Oct 25 14:56:36 CDT 2016 after
Jenkins restart
I believe this version of my Pipeline script also included an "Input" block, it's possible the job was aborted as it was waiting for Input if that makes a difference
I clean these up by going Manage Jenkins -> Script Console and then putting in code like this:
Jenkins.instance.getItemByFullName(
"tpr-ereg")
.getBuildByNumber(24).
finish(hudson.model.Result.ABORTED,
new java.io.IOException("Aborting build"));
NOTE: the above may need to be all on one line in the Script Console

Jenkins - How to forcibly mark build successful

I have this error:
java.io.IOException: Remote call on build4 failed
at hudson.remoting.Channel.call(Channel.java:789)
at hudson.Launcher$RemoteLauncher.kill(Launcher.java:953)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:540)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class hudson.util.jna.GNUCLibrary
at hudson.plugins.signal_killer.SignalKiller.sendSignal(SignalKiller.java:45)
at hudson.plugins.signal_killer.SignalKiller.kill(SignalKiller.java:29)
at hudson.util.ProcessTree$OSProcess.killByKiller(ProcessTree.java:216)
at hudson.util.ProcessTree$Windows$1.killRecursively(ProcessTree.java:427)
at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:487)
at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:965)
at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:956)
at hudson.remoting.UserRequest.perform(UserRequest.java:120)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:62)
at java.lang.Thread.run(Unknown Source)
at ......remote call to build4(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:252)
at hudson.remoting.Channel.call(Channel.java:781)
... 6 more
after my build. This error marked build as FAILED.
But I need to forcibly mark it as SUCCESS, because I got successful result of build - *.exe link of my distrib.
I've tried to use Jenkins Text Finder plugin:
Settings of JTF
It was looking for my regex in console output and mark build successful but it didn't work as I expected - it found regex, but didn't mark build successful.
Is there another way to solve this problem?
This isn't possible — the build result can only be marked as worse than the existing result, and therefore the Text Finder plugin can only set your build as UNSTABLE or FAILED.
It would appear that you need to wait for a resolution to JENKINS-20481. You should add as much detail to that ticket as you can to help.

Jenkins Perforce Plugin Exception

I set up a Jenkins job to poll Perforce for changes in the depot every 15 minutes, however I am seeing the following error in the polling log:
Caught Exception communicating with perforce.P4 Where Parsing Error: //... and //some_depot/... filespecs are not allowed.
FATAL: Unable to communicate with perforce. Check log file for: P4 Where Parsing Error: //... and //some_depot/... filespecs are not allowed.
java.io.IOException: Unable to communicate with perforce. Check log file for: P4 Where Parsing Error: //... and //some_depot/... filespecs are not allowed.
at hudson.plugins.perforce.PerforceSCM.compareRemoteRevisionWith(PerforceSCM.java:1296)
at hudson.scm.SCM.poll(SCM.java:397)
at hudson.model.AbstractProject._poll(AbstractProject.java:1435)
at hudson.model.AbstractProject.poll(AbstractProject.java:1338)
at jenkins.triggers.SCMTriggerItem$SCMTriggerItems$Bridge.poll(SCMTriggerItem.java:119)
at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:515)
at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:544)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Done. Took 5.4 sec
No changes
Has anyone seen this before? Polling seemed to work perfectly a few hours ago, but now this error is appearing with each poll.
Perhaps your Perforce administrator just installed a new trigger, one which
generates the error message
//... and //some_depot/... filespecs are not allowed.
if it sees a client workspace spec with an unacceptable view map.
If that's indeed your problem, then you either have to specify a narrower (more precise) view map for the client workspace that your Jenkins build is using, or get your administrator to give you an exception in the trigger.

Resources