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

swarm-plugin d'not work whith proxy

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: swarm-plugin
    • Labels:
      None
    • Environment:
      Linux, Docker
      swarm-plugin 3.NN
    • Similar Issues:

      Description

      https://github.com/jenkinsci/swarm-plugin/blob/master/docs/proxy.md

      {{java }}
      {{  -Dhttp.proxyHost=127.0.0.1 }}
      {{  -Dhttp.proxyPort=3128 }}
         -jar swarm-client.jar
      It always doesn't work

        Attachments

          Activity

          Hide
          basil Basil Crow added a comment -

          It always doesn't work

          No. It sometimes doesn't work. It does work in my local testing. I created a Squid proxy with docker run --name squid -d --publish 3128:3128 sameersbn/squid:3.5.27-2. Then I configured it as follows:

          # sed -i 's/http_access deny all/http_access allow all/g' /etc/squid/squid.conf # Allow connections from outside the Docker container
          # sed -i '/http_access deny CONNECT/d' /etc/squid/squid.conf # Allow CONNECT on non- needed when connecting to the Jenkins JNLP endpoint through the proxy
          # kill -s HUP `pgrep squid`
          

          I then was able to successfully connect to Jenkins through the proxy by running java -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=3128 -jar swarm-client.jar -master <my-url> -username <my-username> -password <my-password>.

          You probably have not configured your proxy server correctly. I suggest reading the logs of your proxy server to ensure it is not denying any requests from the Swarm client.

          Show
          basil Basil Crow added a comment - It always doesn't work No. It sometimes doesn't work. It does work in my local testing. I created a Squid proxy with docker run --name squid -d --publish 3128:3128 sameersbn/squid:3.5.27-2 . Then I configured it as follows: # sed -i 's/http_access deny all/http_access allow all/g' /etc/squid/squid.conf # Allow connections from outside the Docker container # sed -i '/http_access deny CONNECT/d' /etc/squid/squid.conf # Allow CONNECT on non- needed when connecting to the Jenkins JNLP endpoint through the proxy # kill -s HUP `pgrep squid` I then was able to successfully connect to Jenkins through the proxy by running java -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=3128 -jar swarm-client.jar -master <my-url> -username <my-username> -password <my-password> . You probably have not configured your proxy server correctly. I suggest reading the logs of your proxy server to ensure it is not denying any requests from the Swarm client.
          Hide
          serg_zhem Sergey Zhemoitel added a comment -

          No. My proxy is configured correctly because, apart from the swarm agent, all other programs have successful connections

          all_proxy=http://127.0.0.1:3128 curl [https://myjenkinssite.com

          https://myjenkinssite/]all success
          Show
          serg_zhem Sergey Zhemoitel added a comment - No. My proxy is configured correctly because, apart from the swarm agent, all other programs have successful connections all_proxy= http://127.0.0.1:3128  curl [https://myjenkinssite.com https://myjenkinssite/]all success
          Hide
          basil Basil Crow added a comment -

          My proxy is configured correctly because, apart from the swarm agent, all other programs have successful connections

          No. All other programs having successful connections does not guarantee that your proxy server is configured correctly. For example, Jenkins Remoting (and therefore Swarm) requires the ability to issue a CONNECT to a non-standard port, but some proxy servers (including Squid) deny CONNECT to ports other than port 443 by default. The point is, as I explained in my previous comment, that you need to check your proxy server logs for access denied messages, then configure your proxy server appropriately.

          Show
          basil Basil Crow added a comment - My proxy is configured correctly because, apart from the swarm agent, all other programs have successful connections No. All other programs having successful connections does not guarantee that your proxy server is configured correctly. For example, Jenkins Remoting (and therefore Swarm) requires the ability to issue a CONNECT to a non-standard port, but some proxy servers (including Squid) deny CONNECT to ports other than port 443 by default. The point is, as I explained in my previous comment, that you need to check your proxy server logs for access denied messages, then configure your proxy server appropriately.

            People

            • Assignee:
              Unassigned
              Reporter:
              serg_zhem Sergey Zhemoitel
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: