plugin-installation-manager-tool icon indicating copy to clipboard operation
plugin-installation-manager-tool copied to clipboard

Plugin Installation Manager exits with Code 0 when failing to connect to HTTPS

Open oleg-nenashev opened this issue 3 years ago • 12 comments

I am waiting for permission to share the execution log. There was a Jenkins Docker image build during the Kuberbetes cluster update yesterday, a standard community provided 2.303.3 Docker image is used as a base. The PIM execution returned org.apache.http.NoHttpResponseException with https://updates.jenkins.io:443: The target server failed to respond. Surprisingly, the Docker build continued without any issue then, so I suspect the Plugin Installation Manager tool exited with the 0 return code. Then the instance failed to start because of the missing plugin.

I suspect we have an error propagation bug somewhere in the tool

Build log

00:34:35   ---> Running in f36b5bda783b
00:35:21  [91mNov 25, 2021 11:35:21 PM org.apache.http.impl.execchain.RetryExec execute
00:35:21  INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://updates.jenkins.io:443: The target server failed to respond
00:35:21  [0m[91mNov 25, 2021 11:35:21 PM org.apache.http.impl.execchain.RetryExec execute
00:35:21  INFO: Retrying request to {s}->https://updates.jenkins.io:443
00:35:39  [0mDone

oleg-nenashev avatar Nov 26 '21 11:11 oleg-nenashev

Just noticed the same when building a Docker image based on the official image. Is this somehow related to the cli option --skip-failed-plugins?

fabiang avatar May 30 '22 11:05 fabiang

if you pass that option it would likely return 0, not a very safe flag though

timja avatar May 30 '22 13:05 timja

Is this not quite risky currently on automated builds? Not sure why but also have been seeing way more errors than with the old method:

[2022-07-21T09:16:04.943Z] Step 15/15 : RUN jenkins-plugin-cli -f /usr/share/jenkins/ref/plugins.txt
[2022-07-21T09:16:04.943Z]  ---> Running in 7b4e8fb12a2a
[2022-07-21T09:16:13.096Z] Jul 21, 2022 9:16:13 AM org.apache.http.impl.execchain.RetryExec execute
[2022-07-21T09:16:13.097Z] INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->[https://updates.jenkins.io:443](https://updates.jenkins.io/): The target server failed to respond
[2022-07-21T09:16:13.097Z] Jul 21, 2022 9:16:13 AM org.apache.http.impl.execchain.RetryExec execute
[2022-07-21T09:16:13.097Z] INFO: Retrying request to {s}->[https://updates.jenkins.io:443](https://updates.jenkins.io/)
[2022-07-21T09:16:13.667Z] Jul 21, 2022 9:16:13 AM org.apache.http.impl.execchain.RetryExec execute
[2022-07-21T09:16:13.667Z] INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->[https://updates.jenkins.io:443](https://updates.jenkins.io/): The target server failed to respond
[2022-07-21T09:16:13.667Z] Jul 21, 2022 9:16:13 AM org.apache.http.impl.execchain.RetryExec execute
[2022-07-21T09:16:13.667Z] INFO: Retrying request to {s}->[https://updates.jenkins.io:443](https://updates.jenkins.io/)
[2022-07-21T09:16:14.238Z] Jul 21, 2022 9:16:14 AM org.apache.http.impl.execchain.RetryExec execute
[2022-07-21T09:16:14.238Z] INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->[https://updates.jenkins.io:443](https://updates.jenkins.io/): The target server failed to respond
[2022-07-21T09:16:14.238Z] Jul 21, 2022 9:16:14 AM org.apache.http.impl.execchain.RetryExec execute
[2022-07-21T09:16:14.238Z] INFO: Retrying request to {s}->[https://updates.jenkins.io:443](https://updates.jenkins.io/)
[2022-07-21T09:16:22.375Z] Done
[2022-07-21T09:16:27.700Z] Removing intermediate container 7b4e8fb12a2a
[2022-07-21T09:16:27.700Z]  ---> 4c7b1028b12f
[2022-07-21T09:16:27.700Z] Successfully built 4c7b1028b12f

lifeofguenter avatar Jul 22 '22 14:07 lifeofguenter

What's risky? I see some retries there and it was successful in the end?

timja avatar Jul 22 '22 15:07 timja

Ah you are right. So without verbose it will basically not even display any info? So if a plugin install fails after retries it will exit with > 0?

lifeofguenter avatar Jul 22 '22 16:07 lifeofguenter

It should do but could do with testing / validation

timja avatar Jul 22 '22 16:07 timja

Similar issue with Image: jenkins/jenkins:lts-alpine to install custom plugins in Dockerfile

Dockerfile

FROM jenkins/jenkins:lts-alpine

ENV JAVA_OPTS="-Djenkins.install.runSetupWizard=false"

COPY user_creation.groovy /usr/share/jenkins/ref/init.groovy.d/user_creation.groovy

COPY plugins.txt /usr/share/jenkins/ref/plugins.txt RUN jenkins-plugin-cli -f /usr/share/jenkins/ref/plugins.txt

Image build output

Step 5/5 : RUN jenkins-plugin-cli -f /usr/share/jenkins/ref/plugins.txt ---> Running in 68387a226b2b Nov 21, 2022 10:38:59 AM org.apache.http.impl.execchain.RetryExec execute INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://updates.jenkins.io:443: The target server failed to respond Nov 21, 2022 10:38:59 AM org.apache.http.impl.execchain.RetryExec execute INFO: Retrying request to {s}->https://updates.jenkins.io:443 Nov 21, 2022 10:39:01 AM org.apache.http.impl.execchain.RetryExec execute INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://updates.jenkins.io:443: The target server failed to respond Nov 21, 2022 10:39:01 AM org.apache.http.impl.execchain.RetryExec execute INFO: Retrying request to {s}->https://updates.jenkins.io:443 Nov 21, 2022 10:39:34 AM org.apache.http.impl.execchain.RetryExec execute INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://updates.jenkins.io:443: The target server failed to respond Nov 21, 2022 10:39:34 AM org.apache.http.impl.execchain.RetryExec execute INFO: Retrying request to {s}->https://updates.jenkins.io:443 ... ...

plugins.txt

cloudbees-folder javax-activation-api javax-mail-api bouncycastle-api instance-identity mina-sshd-api-common mina-sshd-api-core sshd antisamy-markup-formatter structs token-macro build-timeout credentials trilead-api ssh-credentials workflow-step-api plain-credentials credentials-binding scm-api workflow-api commons-lang3-api timestamper caffeine-api script-security ionicons-api jaxb snakeyaml-api jackson2-api commons-text-api plugin-util-api font-awesome-api popper2-api bootstrap5-api jquery3-api echarts-api display-url-api workflow-support checks-api junit matrix-project resource-disposer ws-cleanup ant apache-httpcomponents-client-4-api jdk-tool command-launcher ace-editor workflow-scm-step workflow-cps durable-task workflow-durable-task-step workflow-job jakarta-activation-api jakarta-mail-api mailer workflow-basic-steps gradle pipeline-milestone-step pipeline-build-step variant pipeline-groovy-lib pipeline-model-api pipeline-stage-step pipeline-model-extensions branch-api workflow-multibranch pipeline-stage-tags-metadata jsch git-client pipeline-input-step pipeline-model-definition workflow-aggregator jjwt-api okhttp-api github-api git github github-branch-source pipeline-github-lib pipeline-graph-analysis pipeline-rest-api momentjs pipeline-stage-view ssh-slaves matrix-auth pam-auth ldap email-ext

sudheerduba avatar Nov 21 '22 10:11 sudheerduba

I also get this error from time to time. But if I wait, the plugin manages to retry and download the requested plugins.

YevheniiPokhvalii avatar Dec 05 '22 17:12 YevheniiPokhvalii

I get similar issue but it downloads and installs plugins in sometime.

=> => # INFO: Retrying request to {}->http://ftp-chi.osuosl.org:80 => => # Jan 18, 2023 11:37:31 AM org.apache.http.impl.execchain.RetryExec execute => => # INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {}->http://ftp-chi.osuosl.org:80: The target server failed to res => => # pond

prashant-kumar-exa avatar Jan 18 '23 11:01 prashant-kumar-exa

I had a similar issue, but finally, it was successful. But the red warning looks a bit worrying. I tried to access https://updates.jenkins.io:443 via Chrome browser, but it normal

 ---> Running in cb7e4ae9d2a8
Dec 12, 2023 3:39:00 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://updates.jenkins.io:443: The target server failed to respond
Dec 12, 2023 3:39:00 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://updates.jenkins.io:443
Dec 12, 2023 3:39:04 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://updates.jenkins.io:443: The target server failed to respond
Dec 12, 2023 3:39:04 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://updates.jenkins.io:443
Dec 12, 2023 3:39:05 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://updates.jenkins.io:443: The target server failed to respond
Dec 12, 2023 3:39:05 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://updates.jenkins.io:443
Dec 12, 2023 3:39:06 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://updates.jenkins.io:443: The target server failed to respond
Dec 12, 2023 3:39:06 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://updates.jenkins.io:443
Dec 12, 2023 3:39:11 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://updates.jenkins.io:443: The target server failed to respond
Dec 12, 2023 3:39:11 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://updates.jenkins.io:443
Done

vttranlina avatar Dec 12 '23 03:12 vttranlina

Have the same issue (jenkins-plugin-cli 2.12.15)

Aleks-Ya avatar Mar 01 '24 03:03 Aleks-Ya

I think docker is skipping RUN process if there weren't any stdout from the RUN command for a while. I used --verbose option with the command and then it worked.

It's not a permanent resolution but it works.

yusuketake avatar Mar 15 '24 09:03 yusuketake