-
Bug
-
Resolution: Not A Defect
-
Major
-
centos7 openjdk-1.8.0
-
Powered by SuggestiMate
ping updates.jenkins-ci.org, return 52.202.51.185
- is related to
-
JENKINS-45623 Do not disable HTTP redirects globally
-
- Open
-
-
JENKINS-32796 Can't update plugins: incorrect checksum
-
- Resolved
-
[JENKINS-38185] Could not find JSON in http://updates.jenkins-ci.org/update-center.json?id=default&version=2.22
@danielbeck, I'm using a proxy. My jenkins runs behind a NGiNX reverse proxy, but it has directly internet access.
And it's happing a lot
And it's happing a lot
Then it should be really easy to wget/curl the same URL as in the error message from the Jenkins master machine to determine what's going on.
danielbeck, the `curl` are working well. When this error happens, I restart the jenkins' JVM to make it works again.
java.io.IOException: Could not find JSON in http://updates.jenkins.io/update-center.json?id=default&version=2.46.3 at hudson.model.DownloadService.loadJSON(DownloadService.java:179) at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:190) at hudson.PluginManager.doCheckUpdatesServer(PluginManager.java:1632) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343) at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:52) at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) at org.kohsuke.stapler.MetaClass$2.doDispatch(MetaClass.java:186) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135) at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:51) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:80) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:499) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748)
robsonpeixoto Post the output of the /systemInfo URL and the output when you run the following command in the script console at /script when this happens again:
ProxyConfiguration.getInputStream(new URL('http://updates.jenkins.io/update-center.json?id=default&version=2.46.3')).text
System Properties
Name ↓ | Value |
---|---|
awt.toolkit | sun.awt.X11.XToolkit |
BUILD_TIMESTAMP | 20170620200606 |
executable-war | /usr/share/jenkins/jenkins.war |
file.encoding | UTF-8 |
file.encoding.pkg | sun.io |
file.separator | / |
http.maxConnections | 20 |
java.awt.graphicsenv | sun.awt.X11GraphicsEnvironment |
java.awt.headless | true |
java.awt.printerjob | sun.print.PSPrinterJob |
java.class.path | /usr/share/jenkins/jenkins.war |
java.class.version | 52.0 |
java.endorsed.dirs | /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/endorsed |
java.ext.dirs | /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext:/usr/java/packages/lib/ext |
java.home | /usr/lib/jvm/java-8-openjdk-amd64/jre |
java.io.tmpdir | /tmp |
java.library.path | /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib |
java.runtime.name | OpenJDK Runtime Environment |
java.runtime.version | 1.8.0_131-8u131-b11-1~bpo8+1-b11 |
java.specification.name | Java Platform API Specification |
java.specification.vendor | Oracle Corporation |
java.specification.version | 1.8 |
java.vendor | Oracle Corporation |
java.vendor.url | http://java.oracle.com/ |
java.vendor.url.bug | http://bugreport.sun.com/bugreport/ |
java.version | 1.8.0_131 |
java.vm.info | mixed mode |
java.vm.name | OpenJDK 64-Bit Server VM |
java.vm.specification.name | Java Virtual Machine Specification |
java.vm.specification.vendor | Oracle Corporation |
java.vm.specification.version | 1.8 |
java.vm.vendor | Oracle Corporation |
java.vm.version | 25.131-b11 |
jna.loaded | true |
jna.platform.library.path | /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:/lib64:/usr/lib:/lib |
jnidispatch.path | /tmp/jna--1712433994/jna2706069806996212490.tmp |
line.separator | |
mail.smtp.sendpartial | true |
mail.smtps.sendpartial | true |
os.arch | amd64 |
os.name | Linux |
os.version | 4.4.35+ |
path.separator | : |
permissive-script-security.enabled | true |
sun.arch.data.model | 64 |
sun.boot.class.path | /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfr.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/classes |
sun.boot.library.path | /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64 |
sun.cpu.endian | little |
sun.cpu.isalist | |
sun.font.fontmanager | sun.awt.X11FontManager |
sun.io.unicode.encoding | UnicodeLittle |
sun.java.command | /usr/share/jenkins/jenkins.war --argumentsRealm.passwd.jenkins=MYPASS --argumentsRealm.roles.jenkins=admin |
sun.java.launcher | SUN_STANDARD |
sun.jnu.encoding | UTF-8 |
sun.management.compiler | HotSpot 64-Bit Tiered Compilers |
sun.os.patch.level | unknown |
user.dir | / |
user.home | /var/jenkins_home |
user.language | en |
user.name | jenkins |
user.timezone | America/Sao_Paulo |
Environment Variables
Name ↓ | Value |
---|---|
CA_CERTIFICATES_JAVA_VERSION | 20161107~bpo8+1 |
COPY_REFERENCE_FILE_LOG | /var/jenkins_home/copy_reference_file.log |
HOME | /var/jenkins_home |
HOSTNAME | jenkins-719734917-9bzr6 |
JAVA_DEBIAN_VERSION | 8u131-b11-1~bpo8+1 |
JAVA_HOME | /docker-java-home |
JAVA_OPTS | -Duser.timezone=America/Sao_Paulo -Dpermissive-script-security.enabled=true |
JAVA_VERSION | 8u131 |
JENKINS_HOME | /var/jenkins_home |
JENKINS_OPTS | - |
JENKINS_PORT | tcp://10.7.251.108:50000 |
JENKINS_PORT_50000_TCP | tcp://10.7.251.108:50000 |
JENKINS_PORT_50000_TCP_ADDR | 10.7.251.108 |
JENKINS_PORT_50000_TCP_PORT | 50000 |
JENKINS_PORT_50000_TCP_PROTO | tcp |
JENKINS_PORT_80_TCP | tcp://10.7.251.108:80 |
JENKINS_PORT_80_TCP_ADDR | 10.7.251.108 |
JENKINS_PORT_80_TCP_PORT | 80 |
JENKINS_PORT_80_TCP_PROTO | tcp |
JENKINS_SERVICE_HOST | 10.7.251.108 |
JENKINS_SERVICE_PORT | 50000 |
JENKINS_SERVICE_PORT_SLAVES | 50000 |
JENKINS_SERVICE_PORT_UI | 80 |
JENKINS_SLAVE_AGENT_PORT | 50000 |
JENKINS_UC | https://updates.jenkins.io |
JENKINS_VERSION | 2.46.3 |
KUBERNETES_PORT | tcp://10.7.240.1:443 |
KUBERNETES_PORT_443_TCP | tcp://10.7.240.1:443 |
KUBERNETES_PORT_443_TCP_ADDR | 10.7.240.1 |
KUBERNETES_PORT_443_TCP_PORT | 443 |
KUBERNETES_PORT_443_TCP_PROTO | tcp |
KUBERNETES_SERVICE_HOST | 10.7.240.1 |
KUBERNETES_SERVICE_PORT | 443 |
KUBERNETES_SERVICE_PORT_HTTPS | 443 |
LANG | C.UTF-8 |
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
PWD | / |
SHLVL | 0 |
TINI_SHA | 6c41ec7d33e857d4779f14d9c74924cab0c7973485d2972419a3b7c7620ff5fd |
TINI_VERSION | 0.14.0 |
Plugins
Name ↓ | Version | Enabled |
---|---|---|
ace-editor | 1.1 | true |
ansicolor | 0.5.0 | true |
ant | 1.5 | true |
antisamy-markup-formatter | 1.5 | true |
authentication-tokens | 1.3 | true |
blueocean | 1.1.2 | true |
blueocean-autofavorite | 1.0.0 | true |
blueocean-commons | 1.1.2 | true |
blueocean-config | 1.1.2 | true |
blueocean-dashboard | 1.1.2 | true |
blueocean-display-url | 2.0 | true |
blueocean-events | 1.1.2 | true |
blueocean-git-pipeline | 1.1.2 | true |
blueocean-github-pipeline | 1.1.2 | true |
blueocean-i18n | 1.1.2 | true |
blueocean-jwt | 1.1.2 | true |
blueocean-personalization | 1.1.2 | true |
blueocean-pipeline-api-impl | 1.1.2 | true |
blueocean-pipeline-editor | 0.2.0 | true |
blueocean-pipeline-scm-api | 1.1.2 | true |
blueocean-rest | 1.1.2 | true |
blueocean-rest-impl | 1.1.2 | true |
blueocean-web | 1.1.2 | true |
bouncycastle-api | 2.16.1 | true |
branch-api | 2.0.10 | true |
build-pipeline-plugin | 1.5.6 | true |
build-timeout | 1.18 | true |
build-timestamp | 1.0.1 | true |
chucknorris | 1.0 | true |
cloudbees-folder | 6.0.4 | true |
conditional-buildstep | 1.3.6 | true |
config-file-provider | 2.16.0 | true |
credentials | 2.1.14 | true |
credentials-binding | 1.12 | true |
display-url-api | 2.0 | true |
docker-commons | 1.7 | true |
docker-workflow | 1.12 | true |
durable-task | 1.14 | true |
external-monitor-job | 1.7 | true |
favorite | 2.3.0 | true |
git | 3.3.0 | true |
git-client | 2.4.6 | true |
git-server | 1.7 | true |
github | 1.27.0 | true |
github-api | 1.85.1 | true |
github-branch-source | 2.0.6 | true |
github-oauth | 0.27 | true |
github-pullrequest | 0.1.0-rc24 | true |
greenballs | 1.15 | true |
handlebars | 1.1.1 | true |
htmlpublisher | 1.13 | true |
icon-shim | 2.0.3 | true |
jackson2-api | 2.7.3 | true |
javadoc | 1.4 | true |
jclouds-jenkins | 2.14 | true |
job-dsl | 1.63 | true |
jquery | 1.11.2-0 | true |
jquery-detached | 1.2.1 | true |
junit | 1.20 | true |
kubernetes | 0.11 | true |
kubernetes-pipeline-aggregator | 1.3 | true |
kubernetes-pipeline-devops-steps | 1.3 | true |
kubernetes-pipeline-steps | 1.3 | true |
ldap | 1.15 | true |
mailer | 1.20 | true |
matrix-auth | 1.6 | true |
matrix-project | 1.11 | true |
maven-plugin | 2.16 | true |
metrics | 3.1.2.10 | true |
momentjs | 1.1.1 | true |
nexus-artifact-uploader | 2.9 | true |
nodejs | 1.2.2 | true |
pam-auth | 1.3 | true |
parameterized-trigger | 2.34 | true |
permissive-script-security | 0.1 | true |
pipeline-build-step | 2.5 | true |
pipeline-github-lib | 1.0 | true |
pipeline-graph-analysis | 1.4 | true |
pipeline-input-step | 2.7 | true |
pipeline-maven | 2.5.0 | true |
pipeline-milestone-step | 1.3.1 | true |
pipeline-model-api | 1.1.6 | true |
pipeline-model-declarative-agent | 1.1.1 | true |
pipeline-model-definition | 1.1.6 | true |
pipeline-model-extensions | 1.1.6 | true |
pipeline-multibranch-defaults | 1.1 | true |
pipeline-rest-api | 2.8 | true |
pipeline-stage-step | 2.2 | true |
pipeline-stage-tags-metadata | 1.1.6 | true |
pipeline-stage-view | 2.8 | true |
plain-credentials | 1.4 | true |
postbuild-task | 1.8 | true |
pubsub-light | 1.8 | true |
run-condition | 1.0 | true |
scm-api | 2.1.1 | true |
script-security | 1.29 | true |
slack | 2.2 | true |
sse-gateway | 1.15 | true |
ssh-credentials | 1.13 | true |
ssh-slaves | 1.20 | true |
structs | 1.8 | true |
token-macro | 2.1 | true |
variant | 1.1 | true |
windows-slaves | 1.3.1 | true |
workflow-aggregator | 2.5 | true |
workflow-api | 2.17 | true |
workflow-basic-steps | 2.5 | true |
workflow-cps | 2.36 | true |
workflow-cps-global-lib | 2.8 | true |
workflow-durable-task-step | 2.12 | true |
workflow-job | 2.11.1 | true |
workflow-multibranch | 2.16 | true |
workflow-scm-step | 2.5 | true |
workflow-step-api | 2.11 | true |
workflow-support | 2.14 | true |
xunit | 1.102 | true |
ProxyConfiguration.getInputStream(new URL('http://updates.jenkins.io/update-center.json?id=default&version=2.46.3')).text
Result: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1> <p>The document has moved <a href="http://updates.jenkins.io/stable-2.46/update-center.json">here</a>.</p> </body></html>
After repeat the download step in all redirects:
- http://updates.jenkins.io/stable-2.46/update-center.json
- http://mirrors.jenkins-ci.org/updates/stable-2.46/update-center.json
- http://ftp-nyc.osuosl.org/pub/jenkins/updates/stable-2.46/update-center.json
got the result: https://gist.github.com/robsonpeixoto/7eafc6870dbcc4f2728e028e11020181
robsonpeixoto This is an issue in kubernetes-pipeline-plugin, they globally disable following redirects (otherwise the first call would already return the JSON).
In progress PR here: https://github.com/jenkinsci/kubernetes-pipeline-plugin/pull/31
JENKINS-42474 tracks the core issue that it should be more robust.
Code changed in jenkins
User: Daniel Beck
Path:
core/src/main/java/hudson/model/DownloadService.java
http://jenkins-ci.org/commit/jenkins/8d7f9b5ee0c1875d8664c34b1a23adb0fd91894e
Log:
JENKINS-38185 Always follow redirects for DownloadService
Code changed in jenkins
User: Oleg Nenashev
Path:
core/src/main/java/hudson/model/DownloadService.java
http://jenkins-ci.org/commit/jenkins/4df5895b7eb244a997b9618bfd620e0c4772aec6
Log:
Merge pull request #2951 from daniel-beck/JENKINS-38185
JENKINS-38185 Always follow redirects for DownloadService
Compare: https://github.com/jenkinsci/jenkins/compare/9dc2cdbb4892...4df5895b7eb2
robsonpeixoto Either you got a bad mirror (but they all look good – http://mirrors.jenkins-ci.org/status.html ) or you're using a proxy and it's terrible, returning error pages without HTTP error code status.