Jenkins面临MalformedURLException

时间:2017-07-12 05:39:09

标签: java jenkins jenkins-pipeline http-status-code-401 malformedurlexception

当我尝试更新Jenkins服务器中的插件时,就发生了这种情况。出现以下消息,我不知道从哪里开始。

java.net.MalformedURLException: no protocol: at java.net.URL.(URL.java:593) at java.net.URL.(URL.java:490) at java.net.URL.(URL.java:439) at 
hudson.model.UpdateCenter$UpdateCenterConfiguration.toUpdateCenterCheckUrl(UpdateCenter.java:1067) at 
hudson.model.UpdateCenter$UpdateCenterConfiguration.checkUpdateCenter(UpdateCenter.java:1053) at 
hudson.model.UpdateCenter$ConnectionCheckJob.run(UpdateCenter.java:1488) at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at
java.util.concurrent.FutureTask.run(FutureTask.java:266) at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110) at java.lang.Thread.run(Thread.java:748)

以下是插件的详细信息

java.io.IOException: Server returned HTTP response code: 401 for URL: http://updates.jenkins-ci.org/download/plugins/pipeline-model-definition/1.1.8/pipeline-model-definition.hpi
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
    at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2982)
    at java.net.URLConnection.getHeaderFieldLong(URLConnection.java:629)
    at java.net.URLConnection.getContentLengthLong(URLConnection.java:501)
    at java.net.URLConnection.getContentLength(URLConnection.java:485)
    at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1126)
Caused: java.io.IOException: Server returned HTTP response code: 401 for URL: http://updates.jenkins-ci.org/download/plugins/pipeline-model-definition/1.1.8/pipeline-model-definition.hpi
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1926)
    at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1921)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1920)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1490)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
    at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1139)
Caused: java.io.IOException: Failed to load http://updates.jenkins-ci.org/download/plugins/pipeline-model-definition/1.1.8/pipeline-model-definition.hpi to /var/lib/jenkins/plugins/pipeline-model-definition.jpi.tmp
    at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1146)
Caused: hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/plugins/pipeline-model-definition/1.1.8/pipeline-model-definition.hpi
    at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1172)
    at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1677)
    at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1874)
    at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1651)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
    at java.lang.Thread.run(Thread.java:748)

因此,似乎MalformedURLException是由未经授权访问插件下载URL引起的。我该如何解决这个问题呢?

0 个答案:

没有答案