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

SSH failing when HTTP proxy is in use

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • ec2-plugin
    • None

      When using Jenkins behind an HTTP proxy, the EC2 launcher also tries to route traffic through the proxy.

      To reproduce

      Configure an HTTP proxy in Manage Jenkins > Manage Plugins > Advanced
      Set a Server and Port for an HTTP Proxy.
      Then configure the EC2 plugin and try to launch a slave.

      What I expect

      The HTTP proxy, which is there for jobs that need to connect by HTTP to the Internet ref, should be ignored, because the EC2 plugin is not trying to open an HTTP connection, nor is it normally trying to send traffic to the Internet.

      What actually happens

      An error message might be seen in the slave instance launch log like:

      INFO: Failed to connect via ssh: HTTP Proxy Error (403 Forbidden)
      

      Eventually, the slave will fail to launch.

      More info

      It looks like this issue was introduced in JENKINS-18855 in this commit. Commit message notes, "It uses HTTP proxy defined in Plugin configuration. SOCKS proxy is not supported".

      This issue was reported again e.g. in JENKINS-30041 and a workaround was proposed, namely adding no_proxy=10.x.x.x. This issue was then closed, however, and the workaround there might work sometimes but not always.

      A better solution would be to add a SOCKS proxy feature for the EC2 plugin rather than inheriting proxy settings from Jenkins.

            thoulen FABRIZIO MANFREDI
            alexharv074 Alex Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: