Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
oleg-nenashev opened this issue Nov 26, 2021 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@oleg-nenashev
Copy link
Member

oleg-nenashev commented Nov 26, 2021

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 oleg-nenashev added the bug Something isn't working label Nov 26, 2021
@oleg-nenashev oleg-nenashev self-assigned this Nov 26, 2021
@fabiang
Copy link

fabiang commented May 30, 2022

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?

@timja
Copy link
Member

timja commented May 30, 2022

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

@lifeofguenter
Copy link

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

@timja
Copy link
Member

timja commented Jul 22, 2022

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

@lifeofguenter
Copy link

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?

@timja
Copy link
Member

timja commented Jul 22, 2022

It should do but could do with testing / validation

@sudheerduba
Copy link

sudheerduba commented Nov 21, 2022

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

@YevheniiPokhvalii
Copy link

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

@prashant-kumar-exa
Copy link

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

@vttranlina
Copy link

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

@MarkEWaite MarkEWaite changed the title Plugin Installation Manager exits with Code 0 when failing to connect to to HTTPs Plugin Installation Manager exits with Code 0 when failing to connect to HTTPS Feb 16, 2024
@Aleks-Ya
Copy link

Aleks-Ya commented Mar 1, 2024

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

@yusuketake
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants