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

NPE in remoting JnlpAgentEndpointResolver

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Under certain conditions a NPE can be triggered

      Jan 27, 2017 9:15:35 AM hudson.remoting.jnlp.Main$CuiListener error
      SEVERE: null
      java.lang.NullPointerException
      	at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.header(JnlpAgentEndpointResolver.java:431)
      	at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:163)
      	at hudson.remoting.Engine.innerRun(Engine.java:335)
      	at hudson.remoting.Engine.run(Engine.java:287)
      

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            Under certain conditions a NPE can be triggered

            Please be more specific.

            Show
            danielbeck Daniel Beck added a comment - Under certain conditions a NPE can be triggered Please be more specific.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Having a Null in the header fields list seems to be a weird case, but I agree that a check may be useful.

            https://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html#getHeaderFields() does not say anything about.

            Show
            oleg_nenashev Oleg Nenashev added a comment - Having a Null in the header fields list seems to be a weird case, but I agree that a check may be useful. https://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html#getHeaderFields( ) does not say anything about.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Curtis Gagliardi
            Path:
            src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java
            http://jenkins-ci.org/commit/remoting/813489e5bc27d4c41601e80847c4d738bafd8947
            Log:
            [FIX JENKINS-40710, JENKINS-41513] JnlpAgentEndpointResolver - Add null check, use correct header for map key (#140)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Curtis Gagliardi Path: src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java http://jenkins-ci.org/commit/remoting/813489e5bc27d4c41601e80847c4d738bafd8947 Log: [FIX JENKINS-40710, JENKINS-41513] JnlpAgentEndpointResolver - Add null check, use correct header for map key (#140)
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/jenkins/815da8aa732baa699481828dda67dd5835ba4992
            Log:
            Update remoting to 3.5

            https://github.com/jenkinsci/remoting/edit/master/CHANGELOG.md

            Fixed issues:

            Improvements:

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/jenkins/815da8aa732baa699481828dda67dd5835ba4992 Log: Update remoting to 3.5 https://github.com/jenkinsci/remoting/edit/master/CHANGELOG.md Fixed issues: JENKINS-40710 ( https://issues.jenkins-ci.org/browse/JENKINS-40710 ) - Match headers case-insensitively in `JnlpAgentEndpointResolver` in order to be compliant with HTTP2 lower-case headers. ( PR #139 ( https://github.com/jenkinsci/remoting/pull/139 ), PR #140 ( https://github.com/jenkinsci/remoting/pull/140 )) JENKINS-41513 ( https://issues.jenkins-ci.org/browse/JENKINS-41513 ) - Prevent `NullPointerException` in `JnlpAgentEndpointResolver` when receiving a header with `null` name. ( PR #140 ( https://github.com/jenkinsci/remoting/pull/140 )) JENKINS-41852 ( https://issues.jenkins-ci.org/browse/JENKINS-41852 ) - Fix exported object pinning logic to prevent release due to the integer overflow. ( PR #148 ( https://github.com/jenkinsci/remoting/pull/148 )) Improvements: JENKINS-41730 ( https://issues.jenkins-ci.org/browse/JENKINS-41730 ) - Add the new `org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.ignoreJenkinsAgentProtocolsHeader` property, which allows specifying a custom list of supported protocols instead of the one returned by the Jenkins master. ( PR #146 ( https://github.com/jenkinsci/remoting/pull/146 )) Print the Filesystem Jar Cache directory location in the error message when this cache directory is not writable. ( PR #143 ( https://github.com/jenkinsci/remoting/pull/143 )) Replace `MimicException` with the older `ProxyException` when serializing non-serializable exceptions thrown by the remote code. ( PR #141 ( https://github.com/jenkinsci/remoting/pull/141 )) Use OID of the `ClassLoaderProxy` in error message when the proxy cannot be located in the export table. ( PR #147 ( https://github.com/jenkinsci/remoting/pull/147 ))
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/jenkins/1763e6400f56da0300a44c69b9c10bcf9d2cafe9
            Log:
            Merge pull request #2751 from oleg-nenashev/remoting/3.5

            [JENKINS-40710, JENKINS-41513, JENKINS-41852, JENKINS-41730] - Update remoting to 3.5

            Compare: https://github.com/jenkinsci/jenkins/compare/def0f0d11266...1763e6400f56

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/jenkins/1763e6400f56da0300a44c69b9c10bcf9d2cafe9 Log: Merge pull request #2751 from oleg-nenashev/remoting/3.5 [JENKINS-40710, JENKINS-41513, JENKINS-41852, JENKINS-41730] - Update remoting to 3.5 Compare: https://github.com/jenkinsci/jenkins/compare/def0f0d11266...1763e6400f56
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Fixed in 2.47

            Show
            oleg_nenashev Oleg Nenashev added a comment - Fixed in 2.47
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/jenkins/08c5da35d3fafd5cf90143181e07f0d22f4f5d60
            Log:
            Update remoting to 3.5

            https://github.com/jenkinsci/remoting/edit/master/CHANGELOG.md

            Fixed issues:

            Improvements:

            (cherry picked from commit 815da8aa732baa699481828dda67dd5835ba4992)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/jenkins/08c5da35d3fafd5cf90143181e07f0d22f4f5d60 Log: Update remoting to 3.5 https://github.com/jenkinsci/remoting/edit/master/CHANGELOG.md Fixed issues: JENKINS-40710 ( https://issues.jenkins-ci.org/browse/JENKINS-40710 ) - Match headers case-insensitively in `JnlpAgentEndpointResolver` in order to be compliant with HTTP2 lower-case headers. ( PR #139 ( https://github.com/jenkinsci/remoting/pull/139 ), PR #140 ( https://github.com/jenkinsci/remoting/pull/140 )) JENKINS-41513 ( https://issues.jenkins-ci.org/browse/JENKINS-41513 ) - Prevent `NullPointerException` in `JnlpAgentEndpointResolver` when receiving a header with `null` name. ( PR #140 ( https://github.com/jenkinsci/remoting/pull/140 )) JENKINS-41852 ( https://issues.jenkins-ci.org/browse/JENKINS-41852 ) - Fix exported object pinning logic to prevent release due to the integer overflow. ( PR #148 ( https://github.com/jenkinsci/remoting/pull/148 )) Improvements: JENKINS-41730 ( https://issues.jenkins-ci.org/browse/JENKINS-41730 ) - Add the new `org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.ignoreJenkinsAgentProtocolsHeader` property, which allows specifying a custom list of supported protocols instead of the one returned by the Jenkins master. ( PR #146 ( https://github.com/jenkinsci/remoting/pull/146 )) Print the Filesystem Jar Cache directory location in the error message when this cache directory is not writable. ( PR #143 ( https://github.com/jenkinsci/remoting/pull/143 )) Replace `MimicException` with the older `ProxyException` when serializing non-serializable exceptions thrown by the remote code. ( PR #141 ( https://github.com/jenkinsci/remoting/pull/141 )) Use OID of the `ClassLoaderProxy` in error message when the proxy cannot be located in the export table. ( PR #147 ( https://github.com/jenkinsci/remoting/pull/147 )) (cherry picked from commit 815da8aa732baa699481828dda67dd5835ba4992)

              People

              • Assignee:
                csanchez Carlos Sanchez
                Reporter:
                csanchez Carlos Sanchez
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: