seqeralabs / wave-cli

Command line tool for Wave containers provisioning service
https://seqera.io/wave
Apache License 2.0
13 stars 3 forks source link

Improve error reporting for missing connection #55

Closed pditommaso closed 9 months ago

pditommaso commented 9 months ago

Improve error reporting the connection is failing

» wave --conda-package samtools
dev.failsafe.FailsafeException: java.net.ConnectException
    at dev.failsafe.FailsafeExecutor.call(FailsafeExecutor.java:444)
    at dev.failsafe.FailsafeExecutor.get(FailsafeExecutor.java:115)
    at io.seqera.wave.cli.Client.safeApply(Client.java:137)
    at io.seqera.wave.cli.Client.httpSend(Client.java:141)
    at io.seqera.wave.cli.Client.submit(Client.java:95)
    at io.seqera.wave.cli.App.run(App.java:408)
    at io.seqera.wave.cli.App.main(App.java:217)
    at java.base@21.0.1/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: java.net.ConnectException
    at java.net.http@21.0.1/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:951)
    at java.net.http@21.0.1/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:133)
    at io.seqera.wave.cli.Client.lambda$httpSend$1(Client.java:142)
    at dev.failsafe.Functions.lambda$toCtxSupplier$11(Functions.java:236)
    at dev.failsafe.Functions.lambda$get$0(Functions.java:46)
    at dev.failsafe.internal.RetryPolicyExecutor.lambda$apply$0(RetryPolicyExecutor.java:75)
    at dev.failsafe.SyncExecutionImpl.executeSync(SyncExecutionImpl.java:176)
    at dev.failsafe.FailsafeExecutor.call(FailsafeExecutor.java:437)
    ... 7 more
Caused by: java.net.ConnectException
    at java.net.http@21.0.1/jdk.internal.net.http.common.Utils.toConnectException(Utils.java:1028)
    at java.net.http@21.0.1/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:227)
    at java.net.http@21.0.1/jdk.internal.net.http.AsyncSSLConnection.connectAsync(AsyncSSLConnection.java:56)
    at java.net.http@21.0.1/jdk.internal.net.http.Http1Exchange.sendHeadersAsync(Http1Exchange.java:312)
    at java.net.http@21.0.1/jdk.internal.net.http.Exchange.lambda$responseAsyncImpl0$8(Exchange.java:567)
    at java.net.http@21.0.1/jdk.internal.net.http.Exchange.checkFor407(Exchange.java:447)
    at java.net.http@21.0.1/jdk.internal.net.http.Exchange.lambda$responseAsyncImpl0$9(Exchange.java:571)
    at java.base@21.0.1/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
    at java.base@21.0.1/java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:950)
    at java.base@21.0.1/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2372)
    at java.net.http@21.0.1/jdk.internal.net.http.Exchange.responseAsyncImpl0(Exchange.java:571)
    at java.net.http@21.0.1/jdk.internal.net.http.Exchange.responseAsyncImpl(Exchange.java:423)
    at java.net.http@21.0.1/jdk.internal.net.http.Exchange.responseAsync(Exchange.java:415)
    at java.net.http@21.0.1/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:413)
    at java.net.http@21.0.1/jdk.internal.net.http.MultiExchange.lambda$responseAsyncImpl$7(MultiExchange.java:454)
    at java.base@21.0.1/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
    at java.base@21.0.1/java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:950)
    at java.base@21.0.1/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2372)
    at java.net.http@21.0.1/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:444)
    at java.net.http@21.0.1/jdk.internal.net.http.MultiExchange.lambda$responseAsync0$2(MultiExchange.java:346)
    at java.base@21.0.1/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
    at java.base@21.0.1/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
    at java.base@21.0.1/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
    at java.net.http@21.0.1/jdk.internal.net.http.HttpClientImpl$DelegatingExecutor.execute(HttpClientImpl.java:177)
    at java.base@21.0.1/java.util.concurrent.CompletableFuture.completeAsync(CompletableFuture.java:2719)
    at java.net.http@21.0.1/jdk.internal.net.http.MultiExchange.responseAsync(MultiExchange.java:299)
    at java.net.http@21.0.1/jdk.internal.net.http.HttpClientImpl.sendAsync(HttpClientImpl.java:1047)
    at java.net.http@21.0.1/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:930)
    ... 14 more
Caused by: java.nio.channels.UnresolvedAddressException
    at java.base@21.0.1/sun.nio.ch.Net.checkAddress(Net.java:137)
    at java.base@21.0.1/sun.nio.ch.Net.checkAddress(Net.java:145)
    at java.base@21.0.1/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:842)
    at java.base@21.0.1/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:865)
    at java.net.http@21.0.1/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$1(PlainHttpConnection.java:210)
    at java.base@21.0.1/java.security.AccessController.executePrivileged(AccessController.java:114)
    at java.base@21.0.1/java.security.AccessController.doPrivileged(AccessController.java:571)
    at java.net.http@21.0.1/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:212)
pditommaso commented 9 months ago

Solved by f5d6d9a5