Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67180

Log Parser Plugin with security error since latest Jenkins LTS update

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • log-parser-plugin
    • 2.2

      Since the last Jenkins LTS Update to 2.303.3 we have the issue that the Log Parser Plugin cannot copy the console log within a Jenkins Job due to security 144 error.

      This happens in our pipeline job with the following parameters:

      // Parse console output to detect any failures that are not captured by Jenkins
      	    stage ('Log parser (Post)') 
      	    {
      	        steps
      	        {
      	            step([$class: 'LogParserPublisher',  
          	        parsingRulesPath: '/mnt/**/fail_build_on_uncaught_errors_parsingrules', 
          	        useProjectRule: false, 
          	        failBuildOnError: true, 
          	        unstableOnWarning: true])
      	        }
                  }

      The Pipeline Job itself is executed on a Windows 10 Agent with the following environment:

      java.runtime.name Java(TM) SE Runtime Environment
      java.runtime.version 1.8.0_231-b11

       

      os.arch x86
      os.name Windows 10
      os.version 10.0

       

      Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection to jenkins.server.com/IP:46381
      		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
      		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
      		at hudson.remoting.Channel.call(Channel.java:957)
      		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:212)
      		at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      		at hudson.remoting.Request$2.run(Request.java:369)
      		at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      		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:93)
      		at java.lang.Thread.run(Unknown Source)
      java.lang.SecurityException: Agent tried to access build directory of a build not currently running on this system. Learn more: https://www.jenkins.io/redirect/security-144/
      	at jenkins.security.s2m.RunningBuildFilePathFilter.op(RunningBuildFilePathFilter.java:128)
      	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(FutureTask.java:264)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.lang.Thread.run(Thread.java:834)
      Caused: java.io.IOException: Failed to deserialize response to UserRequest:hudson.FilePath$CopyTo@1a96daf
      	at hudson.remoting.Channel.call(Channel.java:965)
      	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)
      Caused: java.io.IOException: Failed to copy /mnt/**/builds/94/log to C:\Users\stes\AppData\Local\Temp\log-parser_**_build_94
      	at hudson.FilePath.copyTo(FilePath.java:2451)
      	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)
      Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from D1380050c.server.com/IP:62733
      		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 org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:100)
      		at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:70)
      		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      		at java.base/java.lang.Thread.run(Thread.java:834)
      Caused: java.lang.RuntimeException
      	at hudson.plugins.logparser.LogParserStatusComputer$1.call(LogParserStatusComputer.java:62)
      	at hudson.plugins.logparser.LogParserStatusComputer$1.call(LogParserStatusComputer.java:47)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      	at hudson.remoting.Request$2.run(Request.java:369)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	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:93)
      	at java.lang.Thread.run(Unknown Source)
      Finished: FAILURE
      

          [JENKINS-67180] Log Parser Plugin with security error since latest Jenkins LTS update

          Martin Jost added a comment -

          Note:
          We rely heavily on the log-parser, but I haven't seen this using 2.303.3.

          I assume, you're mostly referring to:
          java.lang.SecurityException: Agent tried to access build directory of a build not currently running on this system. Learn more
          and I further assume, tat this makes ALL parsed console fail - so the problem should be obvious.

          Differences in our configuration:

          1. We're using freestyle jobs - not pipelines; but the console parser should run after the job itself as well
          2. We're using RH7 Linux, not Windows
          3. We're using JDK 11.0.12
            I understood, that JDK11 is recommended over JDK8,

          Martin Jost added a comment - Note: We rely heavily on the log-parser, but I haven't seen this using 2.303.3. I assume, you're mostly referring to: java.lang.SecurityException: Agent tried to access build directory of a build not currently running on this system. Learn more and I further assume, tat this makes ALL parsed console fail - so the problem should be obvious. Differences in our configuration: We're using freestyle jobs - not pipelines; but the console parser should run after the job itself as well We're using RH7 Linux, not Windows We're using JDK 11.0.12 I understood, that JDK11 is recommended over JDK8,

          Basil Crow added a comment -

          Is this resolved in 2.2?

          Basil Crow added a comment - Is this resolved in 2.2 ?

          Steve Mokris added a comment -

          Yes, this seems to have been fixed in 2.2 (specifically https://github.com/jenkinsci/log-parser-plugin/pull/32).

          Steve Mokris added a comment - Yes, this seems to have been fixed in 2.2 (specifically https://github.com/jenkinsci/log-parser-plugin/pull/32 ).

          Daniel Beck added a comment -

          FTR this particular error is caused by an old version of Pipeline: Nodes and Processes Plugin as documented at https://www.jenkins.io/doc/upgrade-guide/2.303/#SECURITY-2428

          log-parser 2.2 is more compatible with other recent changes in 2.326 (JEP-235), and as a side effect, doesn't need a current release of Pipeline: Nodes and Processes.

          Daniel Beck added a comment - FTR this particular error is caused by an old version of Pipeline: Nodes and Processes Plugin as documented at https://www.jenkins.io/doc/upgrade-guide/2.303/#SECURITY-2428 log-parser 2.2 is more compatible with other recent changes in 2.326 (JEP-235), and as a side effect, doesn't need a current release of Pipeline: Nodes and Processes.

            mreinhardt Martin Reinhardt
            lobi81 Florian Lobmaier
            Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: