Drone and Gitlab

Hi All,
Running drone 1.0.0 trying to connect to gitlab repos. Do have permissions to repo, and pointing to gitlab’s https address, can confirm no redirects or such. Drone is giving me:
"msg":"api: cannot create or update hook"

Gitlab is giving me :

==> production.log <== 
Started GET "/api/v4/projects/codyja%2Ftest-project/hooks?per_page=100" for 127.0.0.1 at 2019-03-24 08:32:43 -0500 
Started POST "/api/v4/projects/codyja%2Ftest-project/hooks?merge_requests_events=true&push_events=true&tag_push_events=true&token=[FILTERED]&url=https%3A%2F%2Fdrone.domain.local%2Fhook" for 127.0.0.1 at 2019-03-24 08:32:43 -0500

In the API call to gitlab it has two IPs: "ip":"10.0.4.75, 127.0.0.1", how can I get rid of that 127.0.0.1 in that call from drone? I have DRONE_SERVER_HOST set to my host’s fqdn

Drone is using the value of DRONE_SERVER_HOST in the request:

“/api/v4/projects/codyja%2Ftest-project/hooks?merge_requests_events=true&push_events=true&tag_push_events=true&token=[FILTERED]&url=https%3A%2F%2Fdrone.domain.local%2Fhook

The for 127.0.0.1 likely refers to the source IP address that sent the http Request to GitLab. If you install Drone and GitLab on the same machine, or you have a reverse proxy in front of GitLab, this would be expected.

They’re two separate machines. In that call to gitlab theres two IPs listed for some reason.

Here’s an example of the gitlab api_json.log (note the two IPs listed in the “IP” field):

==> api_json.log <==
{"time":"2019-03-24T15:38:02.427Z","severity":"INFO","duration":17.79,"db":3.8,"view":13.989999999999998,"status":200,"method":"GET","path":"/api/v4/projects/codyja%2Ftest-project/hooks","params":[{"key":"per_page","value":"100"}],"host":"buildserver.domain.local","ip":"10.0.4.74, 127.0.0.1","ua":"Go-http-client/1.1","route":"/api/:version/projects/:id/hooks","user_id":2,"username":"codyja","queue_duration":13.53,"gitaly_calls":0,"correlation_id":"PW6bP12GSZ"}
{"time":"2019-03-24T15:38:02.573Z","severity":"INFO","duration":114.34,"db":6.61,"view":107.73,"status":422,"method":"POST","path":"/api/v4/projects/codyja%2Ftest-project/hooks","params":[{"key":"merge_requests_events","value":"true"},{"key":"push_events","value":"true"},{"key":"tag_push_events","value":"true"},{"key":"token","value":"[FILTERED]"},{"key":"url","value":"https://drone.domain.local/hook"}],"host":"buildserver.domain.local","ip":"10.0.4.74, 127.0.0.1","ua":"Go-http-client/1.1","route":"/api/:version/projects/:id/hooks","user_id":2,"username":"codyja","queue_duration":28.63,"gitaly_calls":0,"correlation_id":"sytXHDB9fv"}

I recommend contacting GitLab support. The IP address field is not something populated by Drone. GitLab is logging metadata from the http request and underlying tcp connection. Also, I do not see any correlation between the IP address and the request failing. Can you share why you think this is the root cause?