Jenkins CLI empty response

Viewed 2494

Hi I am using the CLI to transfer jobs between two jenkins servers.

But I am unable to get the CLI working..

When I run: java -jar jenkins-cli.jar -s <myhost> -auth <myid>:<mysecret> help

I get a empty response, no errors, no exceptions, just an empty shell prompt

2 Answers

I get same problem. And I find myhost it's nginx address. I fix it by change myhost to jenkins server

If your Jenkins is on Linux and behind an NGINX reverse-proxy server, do the following:

1.Open the file /etc/nginx/nginx.conf and add the following entries:

proxy_http_version 1.1;
proxy_request_buffering off;
proxy_buffering off;

2.Restart Jenkins and NGINX services:

sudo systemctl restart jenkins
sudo systemctl restart nginx

For more details, see Jenkins behind an NGinX reverse proxy.

Related