title: Jenkins Agent JNLP4 Connection Issue
body: <p>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.</p>
  <p>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.</p>
  <p>Both Controller and Agent are windows server VMs.</p>
  <p>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.</p>
  <p>The error message is:</p>
  <pre><code>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.&lt;init&gt;(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.&lt;init&gt;(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.
  </code></pre>