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

Builds triggered using token with build-token-root plugin show remote host as '127.0.0.1'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • Jenkins 1.514, Oracle Linux, accessed via reverse Apache proxy (for SSL)

      Builds triggered using per-project token via the API provided by this plugin show their remote host as '127.0.0.1' rather than the real IP the build was started from. In my case, I ran curl(1) to trigger the build from another machine, and it still shows up as 127.0.0.1 (localhost), see attached screenshot.

      I am accessing this Jenkins instance via an Apache reverse proxy so that I can use SSL. But I believe my Apache virtual host is configured properly to set proxy headers like X-Forwarded-For, etc. (per http://httpd.apache.org/docs/trunk/mod/mod_proxy.html). My Apache config includes the following:

      ProxyRequests On
      ProxyPreserveHost On
      ProxyPass / http://localhost:8080/ retry=0
      ProxyPassReverse / http://localhost:8080/

      Is Jenkins not respecting the X-Forwarded-* HTTP headers when determining the remote IP? That may be the root cause here.

            Unassigned Unassigned
            stmontgomery Stuart Montgomery
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: