Jenkins setup:
- Jenkins 2.387.3
- Alpine Linux v3.18
- Java:
openjdk 17.0.8 2023-07-18
OpenJDK Runtime Environment (build 17.0.8+7-alpine-r0)
OpenJDK 64-Bit Server VM (build 17.0.8+7-alpine-r0, mixed mode, sharing)
I get the following error when I first access the service:
WARNING hudson.model.UpdateCenter#updateDefaultSite: Upgrading Jenkins. Failed to update the default Update Site 'default'. Plugin upgrades may fail.
java.net.SocketException: Network unreachable
at java.base/sun.nio.ch.Net.connect0(Native Method)
at java.base/sun.nio.ch.Net.connect(Net.java:579)
at java.base/sun.nio.ch.Net.connect(Net.java:568)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:593)
at java.base/java.net.Socket.connect(Socket.java:633)
at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:178)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:533)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:638)
at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:281)
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:386)
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:408)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1309)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1242)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1128)
at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1057)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1665)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589)
at hudson.model.DownloadService.loadJSON(DownloadService.java:122)
at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:218)
at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:213)
at hudson.model.UpdateCenter.updateDefaultSite(UpdateCenter.java:2650)
at jenkins.install.SetupWizard.init(SetupWizard.java:209)
at jenkins.install.InstallState$InitialSecuritySetup.initializeState(InstallState.java:182)
at jenkins.model.Jenkins.setInstallState(Jenkins.java:1137)
at jenkins.install.InstallUtil.proceedToNextStateFrom(InstallUtil.java:99)
at jenkins.install.InstallState$Unknown.initializeState(InstallState.java:88)
at jenkins.model.Jenkins$15.run(Jenkins.java:3519)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:177)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
at jenkins.model.Jenkins$5.runTask(Jenkins.java:1164)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:221)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
I came across the following stackoverflow page (Why does Jenkins say "This Jenkins instance appears to be offline" - Stack Overflow) suggesting that I update the HTTP protocol in /var/lib/jenkins/hudson.model.UpdateCenter.xml
from https
to http
, and restart the service. I tried this, but it did not work
Has anyone found a solution for this issue that doesn’t involve setting up an http proxy?