Configurable remote dev mode connection timeout

136 views
Skip to first unread message

swidersk...@gmail.com

unread,
Mar 17, 2021, 3:22:16 AM3/17/21
to Quarkus Development mailing list
Hello,

I have been using remote dev mode and noticed that sometimes the local side of it can fail with not being able to connect tot he server. In general this ends up with following exception and the command (man quarkus:remote-dev) ends.

2021-03-17 08:03:49,647 ERROR [io.qua.ver.htt.dep.dev.HttpRemoteDevClient] (Remote dev client thread) Remote dev request failed: java.net.SocketException: Connection reset
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:186)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:746)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:689)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:717)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1604)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
at io.quarkus.vertx.http.deployment.devmode.HttpRemoteDevClient$Session.run(HttpRemoteDevClient.java:197)
at java.base/java.lang.Thread.run(Thread.java:834)

2021-03-17 08:03:49,648 ERROR [io.qua.ver.htt.dep.dev.HttpRemoteDevClient] (Remote dev client thread) Connection failed after 10 retries, exiting

It looks like the values (wait interval and max attempts) are hardcoded with 2 seconds and 10 respectively.

Would it be possible to have this configurable maybe with the LiveReloadConfig to make it more flexible?

I can certainly help on implementing that if there is a valid enhancement.

Maciej

Georgios Andrianakis

unread,
Mar 17, 2021, 3:46:16 AM3/17/21
to swidersk...@gmail.com, Quarkus Development mailing list
It sounds reasonable to me

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/59EE7086-BEC7-4795-9077-E98A3B7641F7%40gmail.com.

Stuart Douglas

unread,
Mar 17, 2021, 5:21:17 PM3/17/21
to Georgios Andrianakis, Maciej Swiderski, Quarkus Development mailing list
On Wed, 17 Mar 2021 at 18:46, Georgios Andrianakis <gand...@redhat.com> wrote:
It sounds reasonable to me

On Wed, Mar 17, 2021 at 9:22 AM <swidersk...@gmail.com> wrote:
Hello,

I have been using remote dev mode and noticed that sometimes the local side of it can fail with not being able to connect tot he server. In general this ends up with following exception and the command (man quarkus:remote-dev) ends.

2021-03-17 08:03:49,647 ERROR [io.qua.ver.htt.dep.dev.HttpRemoteDevClient] (Remote dev client thread) Remote dev request failed: java.net.SocketException: Connection reset
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:186)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:746)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:689)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:717)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1604)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
at io.quarkus.vertx.http.deployment.devmode.HttpRemoteDevClient$Session.run(HttpRemoteDevClient.java:197)
at java.base/java.lang.Thread.run(Thread.java:834)

2021-03-17 08:03:49,648 ERROR [io.qua.ver.htt.dep.dev.HttpRemoteDevClient] (Remote dev client thread) Connection failed after 10 retries, exiting

It looks like the values (wait interval and max attempts) are hardcoded with 2 seconds and 10 respectively.

Would it be possible to have this configurable maybe with the LiveReloadConfig to make it more flexible?

I can certainly help on implementing that if there is a valid enhancement.

Awesome.

It should be fairly simple, you need to pull those values out of config in the same way it is done for the host and password, and also add fields to io.quarkus.runtime.LiveReloadConfig. Even though in this case we don't read the value from the config object, it still needs to be there to stop warnings about unkown config (this is kinda a special case, that is happening outside/before the normal config lifecycle).
 
Stuart

Maciej

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/59EE7086-BEC7-4795-9077-E98A3B7641F7%40gmail.com.

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.

swidersk...@gmail.com

unread,
Mar 18, 2021, 2:11:52 AM3/18/21
to Stuart Douglas, Georgios Andrianakis, Quarkus Development mailing list
Thanks for replies, here is pull request for it https://github.com/quarkusio/quarkus/pull/15829

Maciej
Reply all
Reply to author
Forward
0 new messages