During connection to a Jenkins using its CLI – it finished with an error.
Exactly in a console, there was nothing in the output, but after issuing echo $?
to display last command’s execution return code – there was the 255 response as I remember – didn’t save it to this post’s draft.
The connection was next:
[simterm]
$ java -jar jenkins-cli.jar -auth admin:pass -s https://ci.example.com/ version
[/simterm]
And then in the Jenkin’s logs – errors appears:
Mar 13 13:36:00 jenkins-production docker-compose[31411]: jenkins_1 | Mar 13, 2019 1:36:00 PM hudson.init.impl.InstallUncaughtExceptionHandler lambda$init$0
Mar 13 13:36:00 jenkins-production docker-compose[31411]: jenkins_1 | WARNING: null
Mar 13 13:36:00 jenkins-production docker-compose[31411]: jenkins_1 | java.io.IOException: HTTP full-duplex channel timeout: 1686b472-6d0b-467b-b26b-ca990999c4c5
The solution was googled here>>> – disabling the proxy_request_buffering
andproxy_buffering
has helped:
... location / { proxy_http_version 1.1; proxy_request_buffering off; proxy_buffering off; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://jenkins$request_uri; } ...
And run the connection again:
[simterm]
$ java -jar jenkins-cli.jar -auth admin:pass -s https://ci.example.com/ version 2.150.3
[/simterm]
Done.