• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • swarm-plugin
    • None
    • Linux, Docker
      swarm-plugin 3.NN

      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

          [JENKINS-62951] swarm-plugin d'not work whith proxy

          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.

          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.

          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

          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

          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.

          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.

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

              Created:
              Updated: