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

Remoting Request classes should offer better toString(), which allow identifying them

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: remoting
    • Labels:
      None
    • Similar Issues:

      Description

      After introduction of JENKINS-45023, I see the following messages in the test logs:

      Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.056 sec - in org.jenkinsci.remoting.engine.EngineUtilTest
      Running org.jenkinsci.remoting.engine.JnlpProtocolHandlerTest
      Testing factory JNLP-connect
      Testing factory JNLP-connect
      Testing factory JNLP-connect
      Testing factory JNLP-connect
      Testing factory JNLP2-connect
      Testing factory JNLP2-connect
      Testing factory JNLP2-connect
      Testing factory JNLP2-connect
      Testing factory JNLP3-connect
      Testing factory JNLP3-connect
      Testing factory JNLP3-connect
      Testing factory JNLP3-connect
      Testing factory JNLP4-connect
      Jul 31, 2017 11:20:47 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-connect connection to 0:0:0:0:0:0:0:0/0:0:0:0:0:0:0:0:35935] Refusing headers from remote: I don't like you
      Jul 31, 2017 11:20:47 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-connect connection from 10.0.0.15/10.0.0.15:59346] Local headers refused by remote: I don't like you
      Testing factory JNLP4-connect
      Jul 31, 2017 11:20:47 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-connect connection to 0:0:0:0:0:0:0:0/0:0:0:0:0:0:0:0:32923] Refusing headers from remote: I don't like you
      Jul 31, 2017 11:20:47 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-connect connection from 10.0.0.15/10.0.0.15:51244] Local headers refused by remote: I don't like you
      Testing factory JNLP4-connect
      Jul 31, 2017 11:20:48 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-connect connection to 0:0:0:0:0:0:0:0/0:0:0:0:0:0:0:0:42337] Refusing headers from remote: I don't like you
      Jul 31, 2017 11:20:48 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-connect connection from 10.0.0.15/10.0.0.15:48772] Local headers refused by remote: I don't like you
      Testing factory JNLP4-connect
      Jul 31, 2017 11:20:48 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-connect connection to 0:0:0:0:0:0:0:0/0:0:0:0:0:0:0:0:45619] Refusing headers from remote: I don't like you
      Jul 31, 2017 11:20:48 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-connect connection from 10.0.0.15/10.0.0.15:50778] Local headers refused by remote: I don't like you
      Testing factory JNLP4-plaintext
      Jul 31, 2017 11:20:48 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-plaintext connection to /0:0:0:0:0:0:0:0:39003] Refusing headers from remote: I don't like you
      Jul 31, 2017 11:20:48 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-plaintext connection from /10.0.0.15:47458] Local headers refused by remote: I don't like you
      Testing factory JNLP4-plaintext
      Jul 31, 2017 11:20:48 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-plaintext connection to /0:0:0:0:0:0:0:0:42913] Refusing headers from remote: I don't like you
      Jul 31, 2017 11:20:48 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-plaintext connection from /10.0.0.15:41290] Local headers refused by remote: I don't like you
      Testing factory JNLP4-plaintext
      Jul 31, 2017 11:20:48 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-plaintext connection to /0:0:0:0:0:0:0:0:33732] Refusing headers from remote: I don't like you
      Jul 31, 2017 11:20:48 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-plaintext connection from /10.0.0.15:36874] Local headers refused by remote: I don't like you
      Testing factory JNLP4-plaintext
      Jul 31, 2017 11:20:48 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-plaintext connection to /0:0:0:0:0:0:0:0:32907] Refusing headers from remote: I don't like you
      Jul 31, 2017 11:20:48 PM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
      INFO: [JNLP4-plaintext connection from /10.0.0.15:45514] Local headers refused by remote: I don't like you
      Testing factory JNLP-connect
      Jul 31, 2017 11:20:48 PM hudson.remoting.Request$2 run
      WARNING: Failed to send back a reply to the request hudson.remoting.Request$2@3429ed50
      hudson.remoting.ChannelClosedException: channel is already closed
      	at hudson.remoting.Channel.send(Channel.java:664)
      	at hudson.remoting.Request$2.run(Request.java:368)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: hudson.remoting.Channel$OrderlyShutdown
      	at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1213)
      	at hudson.remoting.Channel$1.handle(Channel.java:554)
      	at hudson.remoting.AbstractByteArrayCommandTransport$1.handle(AbstractByteArrayCommandTransport.java:61)
      	at org.jenkinsci.remoting.nio.NioChannelHub$2.run(NioChannelHub.java:597)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	... 4 more
      Caused by: Command close created at
      	at hudson.remoting.Command.<init>(Command.java:60)
      	at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:1207)
      	at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:1205)
      	at hudson.remoting.Channel.close(Channel.java:1380)
      	at hudson.remoting.Channel.close(Channel.java:1347)
      	at org.apache.commons.io.IOUtils.closeQuietly(IOUtils.java:285)
      	at org.jenkinsci.remoting.engine.JnlpProtocolHandlerTest.tearDown(JnlpProtocolHandlerTest.java:142)
      	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
      	at org.jenkinsci.remoting.protocol.RepeatRule$1.evaluate(RepeatRule.java:69)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.experimental.theories.Theories$TheoryAnchor$1$1.evaluate(Theories.java:232)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithCompleteAssignment(Theories.java:218)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithAssignment(Theories.java:204)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithIncompleteAssignment(Theories.java:212)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithAssignment(Theories.java:202)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithIncompleteAssignment(Theories.java:212)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithAssignment(Theories.java:202)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithIncompleteAssignment(Theories.java:212)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithAssignment(Theories.java:202)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.evaluate(Theories.java:187)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      	at org.jenkinsci.remoting.protocol.cert.SSLContextRule$1.evaluate(SSLContextRule.java:204)
      	at org.jenkinsci.remoting.protocol.cert.SSLContextRule$1.evaluate(SSLContextRule.java:204)
      	at org.jenkinsci.remoting.protocol.cert.SSLContextRule$1.evaluate(SSLContextRule.java:204)
      	at org.jenkinsci.remoting.protocol.cert.SSLContextRule$1.evaluate(SSLContextRule.java:204)
      	at org.jenkinsci.remoting.protocol.cert.SSLContextRule$1.evaluate(SSLContextRule.java:204)
      	at org.jenkinsci.remoting.protocol.cert.SSLContextRule$1.evaluate(SSLContextRule.java:204)
      	at org.jenkinsci.remoting.protocol.cert.X509CertificateRule$1.evaluate(X509CertificateRule.java:150)
      	at org.jenkinsci.remoting.protocol.cert.X509CertificateRule$1.evaluate(X509CertificateRule.java:150)
      	at org.jenkinsci.remoting.protocol.cert.X509CertificateRule$1.evaluate(X509CertificateRule.java:150)
      	at org.jenkinsci.remoting.protocol.cert.X509CertificateRule$1.evaluate(X509CertificateRule.java:150)
      	at org.jenkinsci.remoting.protocol.cert.X509CertificateRule$1.evaluate(X509CertificateRule.java:150)
      	at org.jenkinsci.remoting.protocol.cert.KeyPairRule$1.evaluate(KeyPairRule.java:71)
      	at org.jenkinsci.remoting.protocol.cert.KeyPairRule$1.evaluate(KeyPairRule.java:71)
      	at org.jenkinsci.remoting.protocol.cert.KeyPairRule$1.evaluate(KeyPairRule.java:71)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
      
      Jul 31, 2017 11:20:48 PM hudson.remoting.Request$2 run
      WARNING: Failed to send back a reply to the request hudson.remoting.Request$2@1e98dc85
      hudson.remoting.ChannelClosedException: channel is already closed
      	at hudson.remoting.Channel.send(Channel.java:664)
      	at hudson.remoting.Request$2.run(Request.java:368)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: hudson.remoting.Channel$OrderlyShutdown
      	at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1213)
      	at hudson.remoting.Channel$1.handle(Channel.java:554)
      	at hudson.remoting.AbstractByteArrayCommandTransport$1.handle(AbstractByteArrayCommandTransport.java:61)
      	at org.jenkinsci.remoting.nio.NioChannelHub$2.run(NioChannelHub.java:597)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	... 4 more
      Caused by: Command close created at
      	at hudson.remoting.Command.<init>(Command.java:60)
      	at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:1207)
      	at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:1205)
      	at hudson.remoting.Channel.close(Channel.java:1380)
      	at hudson.remoting.Channel.close(Channel.java:1347)
      	at org.apache.commons.io.IOUtils.closeQuietly(IOUtils.java:285)
      	at org.jenkinsci.remoting.engine.JnlpProtocolHandlerTest.tearDown(JnlpProtocolHandlerTest.java:142)
      	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
      	at org.jenkinsci.remoting.protocol.RepeatRule$1.evaluate(RepeatRule.java:69)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.experimental.theories.Theories$TheoryAnchor$1$1.evaluate(Theories.java:232)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithCompleteAssignment(Theories.java:218)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithAssignment(Theories.java:204)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithIncompleteAssignment(Theories.java:212)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithAssignment(Theories.java:202)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithIncompleteAssignment(Theories.java:212)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithAssignment(Theories.java:202)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithIncompleteAssignment(Theories.java:212)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.runWithAssignment(Theories.java:202)
      	at org.junit.experimental.theories.Theories$TheoryAnchor.evaluate(Theories.java:187)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      	at org.jenkinsci.remoting.protocol.cert.SSLContextRule$1.evaluate(SSLContextRule.java:204)
      	at org.jenkinsci.remoting.protocol.cert.SSLContextRule$1.evaluate(SSLContextRule.java:204)
      	at org.jenkinsci.remoting.protocol.cert.SSLContextRule$1.evaluate(SSLContextRule.java:204)
      	at org.jenkinsci.remoting.protocol.cert.SSLContextRule$1.evaluate(SSLContextRule.java:204)
      	at org.jenkinsci.remoting.protocol.cert.SSLContextRule$1.evaluate(SSLContextRule.java:204)
      	at org.jenkinsci.remoting.protocol.cert.SSLContextRule$1.evaluate(SSLContextRule.java:204)
      	at org.jenkinsci.remoting.protocol.cert.X509CertificateRule$1.evaluate(X509CertificateRule.java:150)
      	at org.jenkinsci.remoting.protocol.cert.X509CertificateRule$1.evaluate(X509CertificateRule.java:150)
      	at org.jenkinsci.remoting.protocol.cert.X509CertificateRule$1.evaluate(X509CertificateRule.java:150)
      	at org.jenkinsci.remoting.protocol.cert.X509CertificateRule$1.evaluate(X509CertificateRule.java:150)
      	at org.jenkinsci.remoting.protocol.cert.X509CertificateRule$1.evaluate(X509CertificateRule.java:150)
      	at org.jenkinsci.remoting.protocol.cert.KeyPairRule$1.evaluate(KeyPairRule.java:71)
      	at org.jenkinsci.remoting.protocol.cert.KeyPairRule$1.evaluate(KeyPairRule.java:71)
      	at org.jenkinsci.remoting.protocol.cert.KeyPairRule$1.evaluate(KeyPairRule.java:71)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
      

        Attachments

          Issue Links

            Activity

            oleg_nenashev Oleg Nenashev created issue -
            oleg_nenashev Oleg Nenashev made changes -
            Field Original Value New Value
            Epic Link JENKINS-46154 [ 184393 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-27035 [ JENKINS-27035 ]
            oleg_nenashev Oleg Nenashev made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                oleg_nenashev Oleg Nenashev
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: