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

Allow user to adjust socket timeout

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Follow-up to https://github.com/jenkinsci/remoting/pull/68

      > we encounter slave offline issue when executing commands like "sleep 40m"
      on jnlp agent, the socket read timeout is hard coded to 30 minutes and caused the issue

        Attachments

          Issue Links

            Activity

            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/409438f36dc80f20964fb16f8d88041e11ba4ed4
            Log:
            [JENKINS-19445, JENKINS-34213, JENKINS-34808, JENKINS-34121] Bump remoting to 2.59. (#2344)

            • [JENKINS-19445, JENKINS-34213, JENKINS-34808] Bump remoting to 2.58.

            Changes:

            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/409438f36dc80f20964fb16f8d88041e11ba4ed4 Log: [JENKINS-19445, JENKINS-34213, JENKINS-34808, JENKINS-34121] Bump remoting to 2.59. (#2344) [JENKINS-19445, JENKINS-34213, JENKINS-34808] Bump remoting to 2.58. Changes: JENKINS-34213 ( https://issues.jenkins-ci.org/browse/JENKINS-34213 ) - Ensure that the unexporter cleans up whatever it can each sweep ( https://github.com/jenkinsci/remoting/pull/81 ) JENKINS-19445 ( https://issues.jenkins-ci.org/browse/JENKINS-19445 ) Force class load on UserRequest in order to prevent deadlock on windows nodes when using JNA and Subversion ( https://github.com/jenkinsci/remoting/pull/81 ) JENKINS-34808 ( https://issues.jenkins-ci.org/browse/JENKINS-34808 ) - Allow user to adjust socket timeout ( https://github.com/jenkinsci/remoting/pull/68 ) JENKINS-34121 - Upgrade remoting to 2.59
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            released in remoting 2.58 and jenkins-2.4

            Show
            oleg_nenashev Oleg Nenashev added a comment - released in remoting 2.58 and jenkins-2.4
            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/12e79963cca5122351943ee107f65c3ad91a2e25
            Log:
            [JENKINS-19445, JENKINS-34213, JENKINS-34808, JENKINS-34121] Bump remoting to 2.59. (#2344)

            • [JENKINS-19445, JENKINS-34213, JENKINS-34808] Bump remoting to 2.58.

            Changes:

            (cherry picked from commit 409438f36dc80f20964fb16f8d88041e11ba4ed4)

            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/12e79963cca5122351943ee107f65c3ad91a2e25 Log: [JENKINS-19445, JENKINS-34213, JENKINS-34808, JENKINS-34121] Bump remoting to 2.59. (#2344) [JENKINS-19445, JENKINS-34213, JENKINS-34808] Bump remoting to 2.58. Changes: JENKINS-34213 ( https://issues.jenkins-ci.org/browse/JENKINS-34213 ) - Ensure that the unexporter cleans up whatever it can each sweep ( https://github.com/jenkinsci/remoting/pull/81 ) JENKINS-19445 ( https://issues.jenkins-ci.org/browse/JENKINS-19445 ) Force class load on UserRequest in order to prevent deadlock on windows nodes when using JNA and Subversion ( https://github.com/jenkinsci/remoting/pull/81 ) JENKINS-34808 ( https://issues.jenkins-ci.org/browse/JENKINS-34808 ) - Allow user to adjust socket timeout ( https://github.com/jenkinsci/remoting/pull/68 ) JENKINS-34121 - Upgrade remoting to 2.59 (cherry picked from commit 409438f36dc80f20964fb16f8d88041e11ba4ed4)
            Hide
            teilo James Nord added a comment -

            I beleive this was the wrong fix.

            A SocketTimeoutException is a non fatal exception.

            As per the javacoc

            Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. With this option set to a non-zero timeout, a read() call on the InputStream associated with this Socket will block for only this amount of time. If the timeout expires, a java.net.SocketTimeoutException is raised, though the Socket is still valid. The option must be enabled prior to entering the blocking operation to have effect. The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout.

            the code should be handling SocketTimeoutException and retrying. blindly changing the timeout is just going to punt the issue until someone does nothing for longer still. The only thing that timeouts out that should cause a connection close is a Ping timeout.

            Show
            teilo James Nord added a comment - I beleive this was the wrong fix. A SocketTimeoutException is a non fatal exception. As per the javacoc Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. With this option set to a non-zero timeout, a read() call on the InputStream associated with this Socket will block for only this amount of time. If the timeout expires, a java.net.SocketTimeoutException is raised, though the Socket is still valid . The option must be enabled prior to entering the blocking operation to have effect. The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout. the code should be handling SocketTimeoutException and retrying. blindly changing the timeout is just going to punt the issue until someone does nothing for longer still. The only thing that timeouts out that should cause a connection close is a Ping timeout.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            James Nord This PR fixed what has been requested. So it's perfectly valid.
            But I agree that Channel reader thread should not fail on SocketTimeoutException. I am working on a fix for it

            Show
            oleg_nenashev Oleg Nenashev added a comment - James Nord This PR fixed what has been requested. So it's perfectly valid. But I agree that Channel reader thread should not fail on SocketTimeoutException. I am working on a fix for it
            Hide
            teilo James Nord added a comment -

            Oleg Nenashev well it fixes the symptom not the underlying cause - so it's valid - but not perfectly valid

            Do you want me to create a new "Channel reader thread should not fail on SocketTimeoutException" ticket?

            Show
            teilo James Nord added a comment - Oleg Nenashev well it fixes the symptom not the underlying cause - so it's valid - but not perfectly valid Do you want me to create a new "Channel reader thread should not fail on SocketTimeoutException" ticket?
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            I have a template for it, but I still have to fill in all fields

            Show
            oleg_nenashev Oleg Nenashev added a comment - I have a template for it, but I still have to fill in all fields
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            James Nord I'm fixing the Socket timeout exception as a part of JENKINS-22722

            Show
            oleg_nenashev Oleg Nenashev added a comment - James Nord I'm fixing the Socket timeout exception as a part of JENKINS-22722

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: