Jenkins CLI with http protocol does not respond in 2.81

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Jenkins CLI with http protocol does not respond in 2.81

Riccardo
Hi all,

after an upgrade of Jenkins 1.638 to 2.81 CLI I need to switch to http
protocol but it doesn't work (SSH protocol seems to work after the
upgrade).

No matter which CLI command I use, after a few seconds the call returns
but shows no result. E.g.

java -jar jenkins-cli.jar -s http://10.0.3.108 -logger FINE help

called from a Windows command line returns nothing. No errors are
reported. On console I see only the following output:

Okt 04, 2017 1:11:33 PM hudson.cli.CLI _main
FINE: using connection mode HTTP
Okt 04, 2017 1:11:33 PM hudson.cli.CLI plainHttpConnection
FINE: Trying to connect to http://10.0.3.108:8080/ via plain protocol
over HTTP
Okt 04, 2017 1:11:34 PM hudson.cli.FullDuplexHttpStream <init>
FINE: establishing download side
Okt 04, 2017 1:11:39 PM hudson.cli.FullDuplexHttpStream <init>
FINE: established download side
Okt 04, 2017 1:11:39 PM hudson.cli.FullDuplexHttpStream <init>
FINE: establishing upload side
Okt 04, 2017 1:11:39 PM hudson.cli.FullDuplexHttpStream <init>
FINE: established upload side


On Jenkins server (running on Debian) I enabled HTTP access log and I
see the following lines there:

10.0.1.66 - - [04/Okt/2017:13:41:50 +0200] "GET / HTTP/1.1" 200 295675
"-" "Java/1.8.0_141"
10.0.1.66 - - [04/Okt/2017:13:41:58 +0200] "POST /cli HTTP/1.1" 200 6458
"-" "Java/1.8.0_141"
10.0.1.66 - - [04/Okt/2017:13:41:58 +0200] "POST /cli HTTP/1.1" 200 0
"-" "Java/1.8.0_141"

I also tried this with other CLI commands like version or who-am-i and
providing an additional -auth parameter with the right API-Token to the
command line like

java -jar jenkins-cli.jar -s http://10.0.3.108 -auth foschia:
02a781f2a2fe96e8d38dc548ab07912e -logger FINE version

but the result on the command line and the log outputs on client and
server side remain the same.

After reading all available Jenkins documentation and googling around I
really do not know, what to do next.

I would really appreciate any hints.

Thanks in advance,
Riccardo

--

META-LEVEL Software AG
Lyonerring 1
66121 Saarbrücken
Deutschland
Tel: +49 - 681 / 99687-0
Fax: +49 - 681 / 99687-99
Mail: [hidden email]
Web: www.meta-level.de

Rechtsform: Aktiengesellschaft
Sitz: Saarbrücken
HR B Nr. 13 380 Amtsgericht Saarbrücken
USt-IdNr. DE 1 38 166667
Vorstände: Dipl.-Inform. Peter Badt und Dipl.-Inform. Peter Raber
Vorsitzender des Aufsichtsrats:  Reinhard Kuhn

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/47734b97-86aa-3555-e7b0-4fac1cbd26c7%40meta-level.de.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins CLI with http protocol does not respond in 2.81

Daniel Beck

> On 4. Oct 2017, at 13:50, Riccardo Foschia <[hidden email]> wrote:
>
> after an upgrade of Jenkins 1.638 to 2.81 CLI I need to switch to http protocol but it doesn't work (SSH protocol seems to work after the upgrade).
>
> No matter which CLI command I use, after a few seconds the call returns but shows no result. E.g.
>

If Jenkins is running behind a reverse proxy, make sure the settings are correct.

For example for nginx,

        proxy_http_version 1.1;
        proxy_request_buffering off;

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/B66E38CE-AE32-4D37-AB2F-9F765C7D8485%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins CLI with http protocol does not respond in 2.81

Riccardo

Am 04.10.2017 um 14:00 schrieb Daniel Beck:

>
>> On 4. Oct 2017, at 13:50, Riccardo Foschia <[hidden email]> wrote:
>>
>> after an upgrade of Jenkins 1.638 to 2.81 CLI I need to switch to http protocol but it doesn't work (SSH protocol seems to work after the upgrade).
>>
>> No matter which CLI command I use, after a few seconds the call returns but shows no result. E.g.
>>
>
> If Jenkins is running behind a reverse proxy, make sure the settings are correct.
>
> For example for nginx,
>
> proxy_http_version 1.1;
> proxy_request_buffering off;
>

Thanks for your answer, but there is no proxy running.


--

META-LEVEL Software AG
Lyonerring 1
66121 Saarbrücken
Deutschland
Tel: +49 - 681 / 99687-0
Fax: +49 - 681 / 99687-99
Mail: [hidden email]
Web: www.meta-level.de

Rechtsform: Aktiengesellschaft
Sitz: Saarbrücken
HR B Nr. 13 380 Amtsgericht Saarbrücken
USt-IdNr. DE 1 38 166667
Vorstände: Dipl.-Inform. Peter Badt und Dipl.-Inform. Peter Raber
Vorsitzender des Aufsichtsrats:  Reinhard Kuhn

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/73022ea1-67f2-4979-852b-ff318b9a29b6%40meta-level.de.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins CLI with http protocol does not respond in 2.81

Daniel Beck

> On 4. Oct 2017, at 14:29, Riccardo Foschia <[hidden email]> wrote:
>
> Thanks for your answer, but there is no proxy running.

What security realm are you using?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/571B5B4F-3D19-4166-8E1E-CAEF815B18CC%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins CLI with http protocol does not respond in 2.81

Riccardo


Am 04.10.2017 um 14:53 schrieb Daniel Beck:
>
>> On 4. Oct 2017, at 14:29, Riccardo Foschia <[hidden email]> wrote:
>>
>> Thanks for your answer, but there is no proxy running.
>
> What security realm are you using?
>

We are using LDAP and project based matrix authorization (like before
upgrading).

In the old Jenkins version we used before upgrading to 2.81 we needed to
authorize user anonymous with common read and connect permissions. These
user still exists after upgrading to 2.81, see attached screen shot.

--

META-LEVEL Software AG
Lyonerring 1
66121 Saarbrücken
Deutschland
Tel: +49 - 681 / 99687-0
Fax: +49 - 681 / 99687-99
Mail: [hidden email]
Web: www.meta-level.de

Rechtsform: Aktiengesellschaft
Sitz: Saarbrücken
HR B Nr. 13 380 Amtsgericht Saarbrücken
USt-IdNr. DE 1 38 166667
Vorstände: Dipl.-Inform. Peter Badt und Dipl.-Inform. Peter Raber
Vorsitzender des Aufsichtsrats:  Reinhard Kuhn

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/eccad6a1-fcd0-10b6-dae3-674dfa03ea46%40meta-level.de.
For more options, visit https://groups.google.com/d/optout.

jenkins_authorization.JPG (92K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins CLI with http protocol does not respond in 2.81

Devin Nusbaum
In reply to this post by Riccardo
Do you see any errors in the logs on the Jenkins server, and is the jenkins-cli.jar you are using from your 2.81 instance? You can download a fresh jar from http://YOUR_HOST/jenkins/jnlpJars/jenkins-cli.jar. (If you aren’t using the /jenkins context path just http://YOUR_HOST/jnlpJars/jenkins-cli.jar).

> On Oct 4, 2017, at 7:50 AM, Riccardo Foschia <[hidden email]> wrote:
>
> Hi all,
>
> after an upgrade of Jenkins 1.638 to 2.81 CLI I need to switch to http protocol but it doesn't work (SSH protocol seems to work after the upgrade).
>
> No matter which CLI command I use, after a few seconds the call returns but shows no result. E.g.
>
> java -jar jenkins-cli.jar -s http://10.0.3.108 -logger FINE help
>
> called from a Windows command line returns nothing. No errors are reported. On console I see only the following output:
>
> Okt 04, 2017 1:11:33 PM hudson.cli.CLI _main
> FINE: using connection mode HTTP
> Okt 04, 2017 1:11:33 PM hudson.cli.CLI plainHttpConnection
> FINE: Trying to connect to http://10.0.3.108:8080/ via plain protocol over HTTP
> Okt 04, 2017 1:11:34 PM hudson.cli.FullDuplexHttpStream <init>
> FINE: establishing download side
> Okt 04, 2017 1:11:39 PM hudson.cli.FullDuplexHttpStream <init>
> FINE: established download side
> Okt 04, 2017 1:11:39 PM hudson.cli.FullDuplexHttpStream <init>
> FINE: establishing upload side
> Okt 04, 2017 1:11:39 PM hudson.cli.FullDuplexHttpStream <init>
> FINE: established upload side
>
>
> On Jenkins server (running on Debian) I enabled HTTP access log and I see the following lines there:
>
> 10.0.1.66 - - [04/Okt/2017:13:41:50 +0200] "GET / HTTP/1.1" 200 295675 "-" "Java/1.8.0_141"
> 10.0.1.66 - - [04/Okt/2017:13:41:58 +0200] "POST /cli HTTP/1.1" 200 6458 "-" "Java/1.8.0_141"
> 10.0.1.66 - - [04/Okt/2017:13:41:58 +0200] "POST /cli HTTP/1.1" 200 0 "-" "Java/1.8.0_141"
>
> I also tried this with other CLI commands like version or who-am-i and providing an additional -auth parameter with the right API-Token to the command line like
>
> java -jar jenkins-cli.jar -s http://10.0.3.108 -auth foschia:
> 02a781f2a2fe96e8d38dc548ab07912e -logger FINE version
>
> but the result on the command line and the log outputs on client and server side remain the same.
>
> After reading all available Jenkins documentation and googling around I really do not know, what to do next.
>
> I would really appreciate any hints.
>
> Thanks in advance,
> Riccardo
>
> --
>
> META-LEVEL Software AG
> Lyonerring 1
> 66121 Saarbrücken
> Deutschland
> Tel: +49 - 681 / 99687-0
> Fax: +49 - 681 / 99687-99
> Mail: [hidden email]
> Web: www.meta-level.de
>
> Rechtsform: Aktiengesellschaft
> Sitz: Saarbrücken
> HR B Nr. 13 380 Amtsgericht Saarbrücken
> USt-IdNr. DE 1 38 166667
> Vorstände: Dipl.-Inform. Peter Badt und Dipl.-Inform. Peter Raber
> Vorsitzender des Aufsichtsrats:  Reinhard Kuhn
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/47734b97-86aa-3555-e7b0-4fac1cbd26c7%40meta-level.de.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/E3325FB9-7F79-4FD8-B92D-1C302A89F9D4%40cloudbees.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins CLI with http protocol does not respond in 2.81

Riccardo

Am 04.10.2017 um 15:51 schrieb Devin Nusbaum:
> Do you see any errors in the logs on the Jenkins server, and is the jenkins-cli.jar you are using from your 2.81 instance? You can download a fresh jar from http://YOUR_HOST/jenkins/jnlpJars/jenkins-cli.jar. (If you aren’t using the /jenkins context path just http://YOUR_HOST/jnlpJars/jenkins-cli.jar).
>

The jenkins-cli.jar is the one from the 2.81 server instance. I
downloaded it from the link you mentioned. The MANIFEST.MF of this jar
says, it's Jenkins-CLI 2.81.

And I do not see exceptions in /var/lib/jenkins/jenkins.log around the
times I launch the CLI commands.



>> On Oct 4, 2017, at 7:50 AM, Riccardo Foschia <[hidden email]> wrote:
>>
>> Hi all,
>>
>> after an upgrade of Jenkins 1.638 to 2.81 CLI I need to switch to http protocol but it doesn't work (SSH protocol seems to work after the upgrade).
>>
>> No matter which CLI command I use, after a few seconds the call returns but shows no result. E.g.
>>
>> java -jar jenkins-cli.jar -s http://10.0.3.108 -logger FINE help
>>
>> called from a Windows command line returns nothing. No errors are reported. On console I see only the following output:
>>
>> Okt 04, 2017 1:11:33 PM hudson.cli.CLI _main
>> FINE: using connection mode HTTP
>> Okt 04, 2017 1:11:33 PM hudson.cli.CLI plainHttpConnection
>> FINE: Trying to connect to http://10.0.3.108:8080/ via plain protocol over HTTP
>> Okt 04, 2017 1:11:34 PM hudson.cli.FullDuplexHttpStream <init>
>> FINE: establishing download side
>> Okt 04, 2017 1:11:39 PM hudson.cli.FullDuplexHttpStream <init>
>> FINE: established download side
>> Okt 04, 2017 1:11:39 PM hudson.cli.FullDuplexHttpStream <init>
>> FINE: establishing upload side
>> Okt 04, 2017 1:11:39 PM hudson.cli.FullDuplexHttpStream <init>
>> FINE: established upload side
>>
>>
>> On Jenkins server (running on Debian) I enabled HTTP access log and I see the following lines there:
>>
>> 10.0.1.66 - - [04/Okt/2017:13:41:50 +0200] "GET / HTTP/1.1" 200 295675 "-" "Java/1.8.0_141"
>> 10.0.1.66 - - [04/Okt/2017:13:41:58 +0200] "POST /cli HTTP/1.1" 200 6458 "-" "Java/1.8.0_141"
>> 10.0.1.66 - - [04/Okt/2017:13:41:58 +0200] "POST /cli HTTP/1.1" 200 0 "-" "Java/1.8.0_141"
>>
>> I also tried this with other CLI commands like version or who-am-i and providing an additional -auth parameter with the right API-Token to the command line like
>>
>> java -jar jenkins-cli.jar -s http://10.0.3.108 -auth foschia:
>> 02a781f2a2fe96e8d38dc548ab07912e -logger FINE version
>>
>> but the result on the command line and the log outputs on client and server side remain the same.
>>
>> After reading all available Jenkins documentation and googling around I really do not know, what to do next.
>>
>> I would really appreciate any hints.
>>
>> Thanks in advance,
>> Riccardo
>>
>> --
>>
>> META-LEVEL Software AG
>> Lyonerring 1
>> 66121 Saarbrücken
>> Deutschland
>> Tel: +49 - 681 / 99687-0
>> Fax: +49 - 681 / 99687-99
>> Mail: [hidden email]
>> Web: www.meta-level.de
>>
>> Rechtsform: Aktiengesellschaft
>> Sitz: Saarbrücken
>> HR B Nr. 13 380 Amtsgericht Saarbrücken
>> USt-IdNr. DE 1 38 166667
>> Vorstände: Dipl.-Inform. Peter Badt und Dipl.-Inform. Peter Raber
>> Vorsitzender des Aufsichtsrats:  Reinhard Kuhn
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/47734b97-86aa-3555-e7b0-4fac1cbd26c7%40meta-level.de.
>> For more options, visit https://groups.google.com/d/optout.
>

--

META-LEVEL Software AG
Lyonerring 1
66121 Saarbrücken
Deutschland
Tel: +49 - 681 / 99687-0
Fax: +49 - 681 / 99687-99
Mail: [hidden email]
Web: www.meta-level.de

Rechtsform: Aktiengesellschaft
Sitz: Saarbrücken
HR B Nr. 13 380 Amtsgericht Saarbrücken
USt-IdNr. DE 1 38 166667
Vorstände: Dipl.-Inform. Peter Badt und Dipl.-Inform. Peter Raber
Vorsitzender des Aufsichtsrats:  Reinhard Kuhn

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8589e9fd-ca8d-7bdb-aebf-bc11c8bf08c7%40meta-level.de.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins CLI with http protocol does not respond in 2.81

Riccardo
In reply to this post by Riccardo
After some research we found the problem: it was the anti-virus software
because it damaged the HTTP responses.  After disabling the HTTP
scanning feature everything worked fine.

Thanks to all for their help!

Am 04.10.2017 um 13:50 schrieb Riccardo Foschia:

> Hi all,
>
> after an upgrade of Jenkins 1.638 to 2.81 CLI I need to switch to http
> protocol but it doesn't work (SSH protocol seems to work after the
> upgrade).
>
> No matter which CLI command I use, after a few seconds the call returns
> but shows no result. E.g.
>
> java -jar jenkins-cli.jar -s http://10.0.3.108 -logger FINE help
>
> called from a Windows command line returns nothing. No errors are
> reported. On console I see only the following output:
>
> Okt 04, 2017 1:11:33 PM hudson.cli.CLI _main
> FINE: using connection mode HTTP
> Okt 04, 2017 1:11:33 PM hudson.cli.CLI plainHttpConnection
> FINE: Trying to connect to http://10.0.3.108:8080/ via plain protocol
> over HTTP
> Okt 04, 2017 1:11:34 PM hudson.cli.FullDuplexHttpStream <init>
> FINE: establishing download side
> Okt 04, 2017 1:11:39 PM hudson.cli.FullDuplexHttpStream <init>
> FINE: established download side
> Okt 04, 2017 1:11:39 PM hudson.cli.FullDuplexHttpStream <init>
> FINE: establishing upload side
> Okt 04, 2017 1:11:39 PM hudson.cli.FullDuplexHttpStream <init>
> FINE: established upload side
>
>
> On Jenkins server (running on Debian) I enabled HTTP access log and I
> see the following lines there:
>
> 10.0.1.66 - - [04/Okt/2017:13:41:50 +0200] "GET / HTTP/1.1" 200 295675
> "-" "Java/1.8.0_141"
> 10.0.1.66 - - [04/Okt/2017:13:41:58 +0200] "POST /cli HTTP/1.1" 200 6458
> "-" "Java/1.8.0_141"
> 10.0.1.66 - - [04/Okt/2017:13:41:58 +0200] "POST /cli HTTP/1.1" 200 0
> "-" "Java/1.8.0_141"
>
> I also tried this with other CLI commands like version or who-am-i and
> providing an additional -auth parameter with the right API-Token to the
> command line like
>
> java -jar jenkins-cli.jar -s http://10.0.3.108 -auth foschia:
> 02a781f2a2fe96e8d38dc548ab07912e -logger FINE version
>
> but the result on the command line and the log outputs on client and
> server side remain the same.
>
> After reading all available Jenkins documentation and googling around I
> really do not know, what to do next.
>
> I would really appreciate any hints.
>
> Thanks in advance,
> Riccardo
>

--

META-LEVEL Software AG
Lyonerring 1
66121 Saarbrücken
Deutschland
Tel: +49 - 681 / 99687-0
Fax: +49 - 681 / 99687-99
Mail: [hidden email]
Web: www.meta-level.de

Rechtsform: Aktiengesellschaft
Sitz: Saarbrücken
HR B Nr. 13 380 Amtsgericht Saarbrücken
USt-IdNr. DE 1 38 166667
Vorstände: Dipl.-Inform. Peter Badt und Dipl.-Inform. Peter Raber
Vorsitzender des Aufsichtsrats:  Reinhard Kuhn

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5fa5831a-e837-5b04-ca04-6be94f2b69e5%40meta-level.de.
For more options, visit https://groups.google.com/d/optout.