-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
Follow-up to https://issues.jenkins.io/browse/JENKINS-70850 that seems to be closed early.
Behind corporate firewalls there's no access to the internet, for plugins or jenkins updates. Support configuring as such. Setting the update site as empty currently throws:
hudson.model.UpdateCenter updateDefaultSite Upgrading Jenkins. Cannot retrieve the default Update Site 'default'. Plugin installation may fail.
notmyfault thanks for the hint, even when I set:
-Dhudson.model.UpdateCenter.never=true \ -Dhudson.model.DownloadService.never=true \ -Dhudson.PluginManager.CHECK_UPDATE_ATTEMPTS=0 \
I still get on start:
2023-03-24T07:21:01.293-0700 WARNING hudson.model.UpdateCenter updateDefaultSite Upgrading Jenkins. Failed to update the default Update Site 'default'. Plugin upgrades may fail. java.net.UnknownHostException: disable-connection-to-upstream at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:567) 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:531) at java.base/sun.net.www.http.HttpClient$1.run(HttpClient.java:590) at java.base/sun.net.www.http.HttpClient$1.run(HttpClient.java:588) at java.base/java.security.AccessController.doPrivileged(AccessController.java:569) at java.base/sun.net.www.http.HttpClient.privilegedOpenServer(HttpClient.java:587) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:631) at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:266) at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:380) at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:193) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1287) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1128) at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:179) 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 java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224) 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)
Am I missing something here?
Also note the property you linked https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/UpdateCenter.java#L2679-L2684 is deprecated, and not used. https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/UpdateSite.java#L309 is the replacement, but that's only works to check on periodic update, not on startup. There's also https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/DownloadService.java#L500C11-L502, but that's not used anywhere.
There's also https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/PluginManager.java#LL227C37-L227C63, but that cannot be set to zero, as if that's the case defaults to 1.