Jenkins Build image with Plugin

I am building a Jenkins image with recommended plugins. The build flow is like, download the latest lts-jdk21 image, update our own certs, download and install plugins. The download + certs install works fine. But while downloading, the URL is not working.

STEP 14/14: RUN jenkins-plugin-cli -f /usr/share/jenkins/ref/plugins.txt   && mkdir -p $JENKINS_HOME && chown -R jenkins:jenkins $JENKINS_HOME
Jun 30, 2025 3:07:06 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://eastamerica.cloudflare.jenkins.io:443: The target server failed to respond
Jun 30, 2025 3:07:06 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://eastamerica.cloudflare.jenkins.io:443
Jun 30, 2025 3:07:06 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://eastamerica.cloudflare.jenkins.io:443: The target server failed to respond
Jun 30, 2025 3:07:06 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://eastamerica.cloudflare.jenkins.io:443
Jun 30, 2025 3:07:06 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://eastamerica.cloudflare.jenkins.io:443: The target server failed to respond
Jun 30, 2025 3:07:06 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://eastamerica.cloudflare.jenkins.io:443
Unable to retrieve JSON from https://updates.jenkins.io/update-center.json?version=2.504.3: eastamerica.cloudflare.jenkins.io:443 failed to respond
Tried downloading update-center-2.504.3 from https://eastamerica.cloudflare.jenkins.io/dynamic-stable-2.504.2/update-center.json (attempt 1 of 3)
Jun 30, 2025 3:07:07 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://eastamerica.cloudflare.jenkins.io:443: The target server failed to respond
Jun 30, 2025 3:07:07 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://eastamerica.cloudflare.jenkins.io:443
Jun 30, 2025 3:07:07 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://eastamerica.cloudflare.jenkins.io:443: The target server failed to respond
Jun 30, 2025 3:07:07 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://eastamerica.cloudflare.jenkins.io:443
Jun 30, 2025 3:07:07 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://eastamerica.cloudflare.jenkins.io:443: The target server failed to respond
Jun 30, 2025 3:07:07 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://eastamerica.cloudflare.jenkins.io:443
Unable to retrieve JSON from https://updates.jenkins.io/update-center.json?version=2.504.3: eastamerica.cloudflare.jenkins.io:443 failed to respond
Tried downloading update-center-2.504.3 from https://eastamerica.cloudflare.jenkins.io/dynamic-stable-2.504.2/update-center.json (attempt 2 of 3)
Jun 30, 2025 3:07:08 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://eastamerica.cloudflare.jenkins.io:443: The target server failed to respond
Jun 30, 2025 3:07:08 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://eastamerica.cloudflare.jenkins.io:443
Jun 30, 2025 3:07:08 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://eastamerica.cloudflare.jenkins.io:443: The target server failed to respond
Jun 30, 2025 3:07:08 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://eastamerica.cloudflare.jenkins.io:443
Jun 30, 2025 3:07:08 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://eastamerica.cloudflare.jenkins.io:443: The target server failed to respond
Jun 30, 2025 3:07:08 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://eastamerica.cloudflare.jenkins.io:443
Tried downloading update-center-2.504.3 from https://eastamerica.cloudflare.jenkins.io/dynamic-stable-2.504.2/update-center.json (attempt 3 of 3)
Error getting update center json
Error: building at STEP "RUN jenkins-plugin-cli -f /usr/share/jenkins/ref/plugins.txt   && mkdir -p $JENKINS_HOME && chown -R jenkins:jenkins $JENKINS_HOME": while running runtime: exit status 1

To recover from this error, I download all those plugin hpi file manually depending upon the list which i got from 2.504.2 then uploaded that the docker image

COPY --chown=jenkins:jenkins plugins/ /usr/share/jenkins/ref/plugins/

now I started this Jenkins as container but When I did I am getting plugin mismatch conflict.

Timestamper (1.30)
    Plugin is missing: antisamy-markup-formatter (173.v680e3a_b_69ff3)

Prism API Plugin (1.30.0-1)
    Plugin is missing: antisamy-markup-formatter (162.v0e6ec0fcfcf6)

Some of the above failures also result in additional indirectly dependent plugins not being able to load.

Indirectly dependent plugins:

Coverage Plugin (2.7.1)
    Failed to load: Prism API Plugin (prism-api 1.30.0-1)
Cobertura Plugin (1.17)
    Failed to load: Code Coverage Plugin (code-coverage-api 4.99.0)
Configuration as Code Plugin (1971.vf9280461ea_89)
    Failed to load: Prism API Plugin (prism-api 1.30.0-1)
Code Coverage Plugin (4.99.0)
    Failed to load: Coverage Plugin (coverage 2.7.1)
Warnings Plugin (12.7.0)
    Failed to load: Prism API Plugin (prism-api 1.30.0-1)

Jenkins version: 2.504.2 and latest one

I am running the Jenkins process as a container in the VM. It’s an air-gapped environment, so I can’t download and install the plugin; the only way is to create the Docker image.

Any help will be much appreciated.
Thanks
Senthil

Jenkins setup:

Jenkins: 2.504.2
OS: Linux - 5.15.0-302.167.6.el9uek.x86_64
Java: 21.0.7 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
---
PrioritySorter:863.v4a_b_974a_5d042
active-directory:2.40
analysis-model-api:13.5.0
ansicolor:1.0.6
ant:513.vde9e7b_a_0da_0f
apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83
apache-httpcomponents-client-5-api:5.5-150.veb_76e719855b_
asm-api:9.8-135.vb_2239d08ee90
authentication-tokens:1.131.v7199556c3004
bitbucket:273.v7b_535e8f11c2
blueocean-commons:1.27.21
blueocean-core-js:1.27.21
blueocean-rest:1.27.21
blueocean-web:1.27.21
bootstrap5-api:5.3.7-1
bouncycastle-api:2.30.1.80-261.v00c0e2618ec3
branch-api:2.1226.ve1e7e0b_4b_95f
build-failure-analyzer:2.5.5
build-name-setter:2.5.0
build-timeout:1.38
buildtriggerbadge:251.vdf6ef853f3f5
caffeine-api:3.2.0-166.v72a_6d74b_870f
checks-api:373.vfe7645102093
claim:599.v95c2f92e1c88
cloud-stats:377.vd8a_6c953e98e
cloudbees-bitbucket-branch-source:936.4.1
cloudbees-folder:6.1026.ve06dfa_cf31c3
command-launcher:123.v37cfdc92ef67
commons-compress-api:1.27.1-3
commons-lang3-api:3.17.0-87.v5cf526e63b_8b_
commons-text-api:1.13.1-176.v74d88f22034b_
conditional-buildstep:1.5.0
config-file-provider:988.v0461fcc2b_9d1
configurationslicing:664.vdda_74145b_b_d0
copyartifact:770.va_6c69e063442
credentials:1415.v831096eb_5534
credentials-binding:687.v619cb_15e923f
dashboard-view:2.528.v3470c02b_d7c9
data-tables-api:2.3.2-2
display-url-api:2.209.v582ed814ff2f
docker-commons:457.v0f62a_94f11a_3
docker-java-api:3.5.2-119.v54c784c71fa_3
docker-plugin:1274.vc0203fdf2e74
docker-workflow:621.va_73f881d9232
downstream-build-cache:1.7
dtkit-api:3.0.3
durable-task:587.v84b_877235b_45
echarts-api:5.6.0-5
eddsa-api:0.3.0.1-19.vc432d923e5ee
email-ext:1911.v19b_8e86f9815
emailext-template:233.v1eb_88fc160b_5
embeddable-build-status:548.v5653c6e28c41
folder-properties:62.v1636b_4a_84608
font-awesome-api:6.7.2-1
forensics-api:3.1.0
gerrit-trigger:2.42.0
git:5.7.0
git-client:6.2.0
git-parameter:439.vb_0e46ca_14534
github:1.43.0
github-api:1.321-488.v9b_c0da_9533f8
github-branch-source:1824.v046257273408
gitlab-plugin:1.9.8
gradle:2.15
groovy:497.v7b_061a_a_de65d
gson-api:2.13.1-139.v4569c2ef303f
handy-uri-templates-2-api:2.1.8-36.v85e4cb_234a_13
htmlpublisher:425
instance-identity:203.v15e81a_1b_7a_38
ionicons-api:88.va_4187cb_eddf1
jackson2-api:2.19.0-404.vb_b_0fd2fea_e10
jakarta-activation-api:2.1.3-2
jakarta-mail-api:2.1.3-2
javadoc:327.vdfe586651ee0
javax-activation-api:1.2.0-8
javax-mail-api:1.6.2-11
jaxb:2.3.9-133.vb_ec76a_73f706
jdk-tool:83.v417146707a_3d
jenkins-design-language:1.27.21
jersey2-api:2.47-165.ve7809a_3e87e0
jjwt-api:0.11.5-120.v0268cf544b_89
job-dsl:1.93
job-restrictions:216.v0732cc7fb_076
joda-time-api:2.14.0-127.v7d9da_295a_d51
jquery3-api:3.7.1-3
jsch:0.2.16-95.v3eecb_55fa_b_78
json-api:20250517-153.vc8a_a_d87c0ce3
json-path-api:2.9.0-148.v22a_7ffe323ce
jsoup:1.21.1-52.v96e4041b_60fd
junit:1335.v6b_a_a_e18534e1
jython:1.9
ldap:780.vcb_33c9a_e4332
locale:587.v7b_843928a_719
localization-support:1.3
localization-zh-cn:371.v23851f835d6b_
logfilesizechecker:1.5
logstash:2.5.0218.v0a_ff8fefc12b_
mailer:509.vc54d23fc427e
mapdb-api:1.0.9-44.va_1e1310c9118
mask-passwords:199.va_0218b_a_59186
matrix-auth:3.2.6
matrix-project:849.v0cd64ed7e531
maven-plugin:3.26
mercurial:1309.v6802b_f0efb_b_9
metrics:4.2.32-476.v5042e1c1edd7
mina-sshd-api-common:2.15.0-161.vb_200831a_c15b_
mina-sshd-api-core:2.15.0-161.vb_200831a_c15b_
mq-notifier:1.4.2
msbuild:1.36
multiple-scms:0.8
muuri-api:0.9.5-3
naginator:1.504.vfc3736332f16
node-iterator-api:72.vc90e81737df1
nodejs:1.6.5
okhttp-api:4.11.0-189.v976fa_d3379d6
oss-symbols-api:356.v2da_d59a_3742b_
p4:1.17.2
pam-auth:1.12
parameterized-trigger:859.vb_e3907a_07a_16
pipeline-build-step:571.v08a_fffd4b_0ce
pipeline-github-lib:65.v203688e7727e
pipeline-graph-analysis:241.vc3d48fb_b_2582
pipeline-graph-view:590.v06d574696250
pipeline-groovy-lib:752.vdddedf804e72
pipeline-input-step:527.vd61b_1d3c5078
pipeline-milestone-step:138.v78ca_76831a_43
pipeline-model-api:2.2255.v56a_15e805f12
pipeline-model-definition:2.2255.v56a_15e805f12
pipeline-model-extensions:2.2255.v56a_15e805f12
pipeline-rest-api:2.38
pipeline-stage-step:322.vecffa_99f371c
pipeline-stage-tags-metadata:2.2255.v56a_15e805f12
pipeline-stage-view:2.38
pipeline-utility-steps:2.19.0
plain-credentials:199.v9f8e1f741799
plugin-util-api:6.1.0
promoted-builds:992.va_00888f21b_74
pull-request-monitoring:335.v525cd64ec76b_
python:1.3
rabbitmq-consumer:2.8
rebuild:338.va_0a_b_50e29397
repo:1.16.0
resource-disposer:0.25
role-strategy:785.v8d262df0f607
run-condition:243.v3c3f94e46a_8b_
scm-api:704.v3ce5c542825a_
script-security:1373.vb_b_4a_a_c26fa_00
select2-api:4.0.13-8
slack:761.v2a_8770f0d169
snakeyaml-api:2.3-125.v4d77857a_b_402
ssh-agent:386.v36cc0c7582f0
ssh-credentials:359.v2191c4cf635f
ssh-slaves:3.1031.v72c6b_883b_869
sshd:3.372.v5d04a_e92d8cf
structs:350.v3b_30f09f2363
subversion:1287.vd2d507146906
support-core:1739.v0d10c0a_57cb_e
theme-manager:310.v234c7de84f9c
throttle-concurrents:2.16
token-macro:444.v52de7e9c573d
trilead-api:2.209.v0e69b_c43c245
variant:70.va_d9f17f859e0
vsphere-cloud:2.27
workflow-aggregator:608.v67378e9d3db_1
workflow-api:1373.v7b_813f10efa_b_
workflow-basic-steps:1079.vce64b_a_929c5a_
workflow-cps:4150.ve20ca_b_a_a_2815
workflow-durable-task-step:1434.v1b_595c29ddd7
workflow-job:1540.v295eccc9778f
workflow-multibranch:806.vb_b_688f609ee9
workflow-scm-step:437.v05a_f66b_e5ef8
workflow-step-api:700.v6e45cb_a_5a_a_21
workflow-support:968.v8f17397e87b_8
ws-cleanup:0.48

Did you just manually download the plugins from /usr/share/jenkins/ref/plugins.txt? That is not sufficient as you will miss to download transitive plugin dependencies.

No, I generated a plugin list from curl -s https://raw.githubusercontent.com/jenkinsci/jenkins/6ca9b5ee5f601f72fcd094f8d159272c6b504b2f/core/src/main/resources/jenkins/install/platform-plugins.json | jq -r '.[] | .plugins[] | .name' | sort > plugins.txt then downloaded all those plugins, expanded each manifest in local, then searched for dependencies and downloaded them too.

For example

cat plugins_complete_missing_list.txt
active-directory | caffeine-api,ionicons-api,configuration-as-code,mailer
ant | structs

But the issue is with only those two plugins.

You obviously haven’t downloaded the antisamy-markup-formatter plugin for some reason. It’s definitely missing otherwise the error would be different telling that the version is too old. You should check if the jpi file is available in your JENKINS_HOME/plugins folder.

PS: unconditionally downloading all recommended plugins doesn’t make sense. In the json there is also the attribute suggested
You have now downloaded active-directory, ldap and pam-auth you only need one of them.
Same for matrix-auth and role-strategy
Also do you really need cvs, subversion, p4 or clearcase as scm? Also plugins like ant and gradle are things I would see as not really needed in most cases nowadays.

Thanks again, @mawinter69
I should not have opted for this route if the plugin downloaded automatically. But that always fails (refer my initial error)

Tried downloading update-center-2.504.3 from https://eastamerica.cloudflare.jenkins.io/dynamic-stable-2.504.2/update-center.json (attempt 1 of 3)

That time I tried downloading plugin using

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

Back to the current issue. I can remove the unwanted plugins as you suggested, like below and download only 19 plugins. Will remove the ant and gradle too

curl -s https://raw.githubusercontent.com/jenkinsci/jenkins/6ca9b5ee5f601f72fcd094f8d159272c6b504b2f/core/src/main/resources/jenkins/install/platform-plugins.json \
  | jq -r '.[] | .plugins[] | select(.suggested == true) | .name' \
  | sort 
ant
antisamy-markup-formatter
build-timeout
cloudbees-folder
credentials-binding
email-ext
git
github-branch-source
gradle
ldap
mailer
matrix-auth
pam-auth
pipeline-github-lib
pipeline-stage-view
ssh-slaves
timestamper
workflow-aggregator
ws-cleanup

But I do see the antisamy-markup-formatter in the plugins folder.

The way I deployed it, is the jenkins_home is mounted to the local directory on the VM.

# cat docker-compose.yml
services:
  jenkins:
    container_name: jenkins-production
    image: <MY_CUSTOME_REPO>/jenkins:lts-jdk21
    user: 1000:1000
    ports:
      - "8080:8080"
      - "50000:50000"
    volumes:
      - /apps/jenkins/jenkinsHome:/var/jenkins_home
    restart: unless-stopped

When I see the file there in the plugins directory

# ls -lrt jenkinsHome/plugins/antisamy-markup-formatter*
-rw-r--r--. 1 svcansible svcansible 243960 Feb 24 10:45 jenkinsHome/plugins/antisamy-markup-formatter.hpi

jenkinsHome/plugins/antisamy-markup-formatter:
total 8
drwxr-xr-x. 3 svcansible svcansible 4096 Jul  7 11:15 WEB-INF
drwxr-xr-x. 3 svcansible svcansible 4096 Jul  7 11:15 META-INF
# cat jenkinsHome/plugins/antisamy-markup-formatter/META-INF/MANIFEST.MF
Manifest-Version: 1.0
Created-By: Maven Archiver 3.6.0
Build-Jdk-Spec: 17
Specification-Title: OWASP Markup Formatter Plugin
Specification-Version: 0.0
Implementation-Title: OWASP Markup Formatter Plugin
Implementation-Version: 173.v680e3a_b_69ff3
Group-Id: org.jenkins-ci.plugins
Artifact-Id: antisamy-markup-formatter
Short-Name: antisamy-markup-formatter
Long-Name: OWASP Markup Formatter Plugin
Url: https://github.com/jenkinsci/antisamy-markup-formatter-plugin
Compatible-Since-Version: 2.0
Plugin-Version: 173.v680e3a_b_69ff3
Hudson-Version: 2.479.1
Jenkins-Version: 2.479.1
Plugin-Developers:
Plugin-License-Name: MIT
Plugin-License-Url: https://opensource.org/licenses/MIT
Plugin-ScmConnection: scm:git:https://github.com/jenkinsci/antisamy-mark
 up-formatter-plugin.git
Plugin-ScmTag: 680e3ab69ff3d7069b328fb6322a906a509f9a53
Plugin-ScmUrl: https://github.com/jenkinsci/antisamy-markup-formatter-pl
 ugin
Implementation-Build: 680e3ab69ff3d7069b328fb6322a906a509f9a53

hmm the url https://eastamerica.cloudflare.jenkins.io/dynamic-stable-2.504.2/update-center.json works for me without problems. Maybe a firewall issue on your machine or network?

I wonder if there is any other error in the logs that prevent the antisamy-markup-formatter plugin from loading. Though as the plugin has no dependencies I would not see why that should happen. You should the complete log for errors with that plugin

Yes, I am able to open the mirror URL fine when I open it through a browser or through curl in the terminal on my laptop. But When I tried to use the RUN jenkins-plugin-cli -f /usr/share/jenkins/ref/plugins.txt while building docker image that it fails.

As you mentioned i should have checked the docker-compose logs. I am able to see below error.

jenkins-production  | 2025-07-07 15:15:15.104+0000 [id=50]	WARNING	hudson.ClassicPluginStrategy#createPluginWrapper: encountered /var/jenkins_home/plugins/ansicolor.hpi under a nonstandard name; expected ansicolor.jpi
jenkins-production  | 2025-07-07 15:15:15.110+0000 [id=50]	WARNING	hudson.ClassicPluginStrategy#createPluginWrapper: encountered /var/jenkins_home/plugins/ant.hpi under a nonstandard name; expected ant.jpi
jenkins-production  | 2025-07-07 15:15:15.120+0000 [id=53]	SEVERE	jenkins.InitReactorRunner$1#onTaskFailed: Failed Inspecting plugin /var/jenkins_home/plugins/antisamy-markup-formatter.hpi
jenkins-production  | java.util.zip.ZipException: invalid stored block lengths
jenkins-production  | 	at java.base/java.util.zip.InflaterInputStream.read(Unknown Source)
jenkins-production  | 	at java.base/java.io.FilterInputStream.read(Unknown Source)
jenkins-production  | 	at org.apache.tools.ant.taskdefs.Expand.extractFile(Expand.java:363)
jenkins-production  | 	at org.apache.tools.ant.taskdefs.Expand.expandFile(Expand.java:199)
jenkins-production  | Caused: Error while expanding /var/jenkins_home/plugins/antisamy-markup-formatter.hpi
jenkins-production  | java.util.zip.ZipException: invalid stored block lengths
jenkins-production  | 	at org.apache.tools.ant.taskdefs.Expand.expandFile(Expand.java:214)
jenkins-production  | 	at org.apache.tools.ant.taskdefs.Expand.execute(Expand.java:157)
jenkins-production  | 	at hudson.ClassicPluginStrategy.unzipExceptClasses(ClassicPluginStrategy.java:556)
jenkins-production  | 	at hudson.ClassicPluginStrategy.explode(ClassicPluginStrategy.java:480)
jenkins-production  | Caused: java.io.IOException: Failed to expand /var/jenkins_home/plugins/antisamy-markup-formatter.hpi
jenkins-production  | 	at hudson.ClassicPluginStrategy.explode(ClassicPluginStrategy.java:483)
jenkins-production  | 	at hudson.ClassicPluginStrategy.createPluginWrapper(ClassicPluginStrategy.java:164)
jenkins-production  | 	at hudson.PluginManager$1$3$1.run(PluginManager.java:472)
jenkins-production  | 	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:175)
jenkins-production  | 	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:304)
jenkins-production  | 	at jenkins.model.Jenkins$5.runTask(Jenkins.java:1149)
jenkins-production  | 	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:221)
jenkins-production  | 	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
jenkins-production  | 	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
jenkins-production  | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
jenkins-production  | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
jenkins-production  | 	at java.base/java.lang.Thread.run(Unknown Source)

When I manually downloaded plugin file again and placed in the plugins directory, restarted docker-compose the error is gone. I work on the plugin list and remove unwanted plugins.

# unzip antisamy-markup-formatter.hpi
Archive:  antisamy-markup-formatter.hpi
   creating: META-INF/
  inflating: META-INF/MANIFEST.MF
   creating: WEB-INF/
   creating: WEB-INF/lib/
   creating: META-INF/maven/
   creating: META-INF/maven/org.jenkins-ci.plugins/
   creating: META-INF/maven/org.jenkins-ci.plugins/antisamy-markup-formatter/
  inflating: WEB-INF/lib/antisamy-markup-formatter.jar
  inflating: WEB-INF/lib/owasp-java-html-sanitizer-20220608.1.jar
  error:  invalid compressed data to inflate
 bad CRC 00000000  (should be c645ccb6)
  inflating: WEB-INF/licenses.xml
  inflating: META-INF/maven/org.jenkins-ci.plugins/antisamy-markup-formatter/pom.xml
  inflating: META-INF/maven/org.jenkins-ci.plugins/antisamy-markup-formatter/pom.properties

Further, when I researched, I was able to see that the antisamy plugin file download fails intermittently.

Failed

Download URL           : https://eastamerica.cloudflare.jenkins.io/dynamic-stable-2.504.2/update-center.json
Found plugin ant: 513.vde9e7b_a_0da_0f
Downloading ant version 513.vde9e7b_a_0da_0f from https://updates.jenkins.io/download/plugins/ant/513.vde9e7b_a_0da_0f/ant.hpi
Found plugin antisamy-markup-formatter: 173.v680e3a_b_69ff3
Downloading antisamy-markup-formatter version 173.v680e3a_b_69ff3 from https://updates.jenkins.io/download/plugins/antisamy-markup-formatter/173.v680e3a_b_69ff3/antisamy-markup-formatter.hpi
ERROR: Downloaded antisamy-markup-formatter is corrupt
Archive:  plugins/antisamy-markup-formatter.hpi
    testing: META-INF/                OK
    testing: META-INF/MANIFEST.MF     OK
    testing: WEB-INF/                 OK
    testing: WEB-INF/lib/             OK
    testing: META-INF/maven/          OK
    testing: META-INF/maven/org.jenkins-ci.plugins/   OK
    testing: META-INF/maven/org.jenkins-ci.plugins/antisamy-markup-formatter/   OK
    testing: WEB-INF/lib/antisamy-markup-formatter.jar   OK
    testing: WEB-INF/lib/owasp-java-html-sanitizer-20220608.1.jar
  error:  invalid compressed data to inflate
    testing: WEB-INF/licenses.xml     OK
    testing: META-INF/maven/org.jenkins-ci.plugins/antisamy-markup-formatter/pom.xml   OK
    testing: META-INF/maven/org.jenkins-ci.plugins/antisamy-markup-formatter/pom.properties   OK

Success

Download URL           : https://eastamerica.cloudflare.jenkins.io/dynamic-stable-2.504.2/update-center.json
Found plugin ant: 513.vde9e7b_a_0da_0f
Downloading ant version 513.vde9e7b_a_0da_0f from https://updates.jenkins.io/download/plugins/ant/513.vde9e7b_a_0da_0f/ant.hpi
Found plugin antisamy-markup-formatter: 173.v680e3a_b_69ff3
Downloading antisamy-markup-formatter version 173.v680e3a_b_69ff3 from https://updates.jenkins.io/download/plugins/antisamy-markup-formatter/173.v680e3a_b_69ff3/antisamy-markup-formatter.hpi
Found plugin build-timeout: 1.38
Downloading build-timeout version 1.38 from https://updates.jenkins.io/download/plugins/build-timeout/1.38/build-timeout.hpi
Found plugin cloudbees-folder: 6.1026.ve06dfa_cf31c3
Downloading cloudbees-folder version 6.1026.ve06dfa_cf31c3 from https://updates.jenkins.io/download/plugins/cloudbees-folder/6.1026.ve06dfa_cf31c3/cloudbees-folder.hpi
Found plugin credentials-binding: 687.v619cb_15e923f

My minimum plugin list will be

antisamy-markup-formatter
build-timeout
cloudbees-folder
credentials-binding
email-ext
git
github-branch-source
ldap
mailer
matrix-auth
pam-auth
pipeline-github-lib
pipeline-stage-view
ssh-slaves
timestamper
workflow-aggregator
ws-cleanup

Only pending now is the direct download failure, which I am not sure yet why the URL connectivity fails.

Thanks
Senthil