OpenNTF / openliberty-domino

Open Liberty server embedded in Domino
Apache License 2.0
7 stars 3 forks source link

Improve behavior when GitHub API is down #80

Open jesse-gallagher opened 3 years ago

jesse-gallagher commented 3 years ago

When GitHub's API is unavailable, automatic JVM download will fail. That's not terribly unexpected, but the exception bubbles all the way to to top and stops subsequent servers from starting. It'd be better to catch most exceptions when sending commands to init servers and continue on to the rest.

SEVERE Encountered unexpected exception 
java.io.UncheckedIOException: java.io.IOException: Received unexpected response code 503 from URL https://api.github.com/repos/AdoptOpenJDK/openjdk11-binaries/releases?per_page=100 
 at org.openntf.openliberty.domino.jvm.AbstractDownloadingJavaRuntimeProvider.fetchGitHubReleasesList(AbstractDownloadingJavaRuntimeProvider.java:65) 
 at org.openntf.openliberty.domino.jvm.AdoptOpenJDKJavaRuntimeProvider.getJavaHome(AdoptOpenJDKJavaRuntimeProvider.java:90) 
 at org.openntf.openliberty.domino.server.AbstractJavaServerInstance.lambda$getJavaHome$2(AbstractJavaServerInstance.java:45) 
 at org.openntf.openliberty.domino.server.AbstractJavaServerInstance$$Lambda$28/0x0000000044069d00.apply(Unknown Source) 
 at java.util.HashMap.computeIfAbsent(HashMap.java:1127) 
 at java.util.Collections$SynchronizedMap.computeIfAbsent(Collections.java:2674) 
 at org.openntf.openliberty.domino.server.AbstractJavaServerInstance.getJavaHome(AbstractJavaServerInstance.java:39) 
 at org.openntf.openliberty.domino.server.LibertyServerInstance.deploy(LibertyServerInstance.java:126) 
 at org.openntf.openliberty.domino.runtime.OpenLibertyRuntime.run(OpenLibertyRuntime.java:109) 
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
 at lotus.domino.NotesThread.run(Unknown Source) 
Caused by: java.io.IOException: Received unexpected response code 503 from URL https://api.github.com/repos/AdoptOpenJDK/openjdk11-binaries/releases?per_page=100 
 at org.openntf.openliberty.domino.util.OpenLibertyUtil.download(OpenLibertyUtil.java:100) 
 at org.openntf.openliberty.domino.jvm.AbstractDownloadingJavaRuntimeProvider.fetchGitHubReleasesList(AbstractDownloadingJavaRuntimeProvider.java:57) 
 ... 13 more 
INFO Shutting down server mainServer 
SEVERE Exception while terminating server mainServer 
INFO Shutdown