{"record":{"id":"706cb172b3c03192","repo":"quarkusio/quarkus","slug":"could-not-connect-to-remote-side-after-restart","errorCode":null,"errorMessage":"Could not connect to remote side after restart","messagePattern":"Could not connect to remote side after restart","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/HttpRemoteDevClient.java","lineNumber":296,"sourceCode":"            long timeout = System.currentTimeMillis() + reconnectTimeoutMillis;\n            try {\n                Thread.sleep(500);\n            } catch (InterruptedException e) {\n\n            }\n            while (System.currentTimeMillis() < timeout) {\n                try {\n                    HttpURLConnection connection = (HttpURLConnection) probeUrl.openConnection();\n                    connection.setRequestProperty(HttpHeaders.ACCEPT.toString(), DEFAULT_ACCEPT);\n                    connection.setRequestMethod(\"POST\");\n                    connection.addRequestProperty(HttpHeaders.CONTENT_TYPE.toString(), RemoteSyncHandler.APPLICATION_QUARKUS);\n                    IoUtil.readBytes(connection.getInputStream());\n                    return doConnect(initialState, initialConnectFunction);\n                } catch (IOException e) {\n\n                }\n            }\n            throw new RuntimeException(\"Could not connect to remote side after restart\");\n        }\n\n    }\n\n}\n","sourceCodeStart":278,"sourceCodeEnd":302,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/HttpRemoteDevClient.java#L278-L302","documentation":"HttpRemoteDevClient throws this when it cannot establish a connection to the remote dev-mode server, even after triggering a restart and retrying the connect loop. The loop attempts to reconnect after a remote restart, swallowing IOExceptions per attempt; if every attempt fails it gives up with this RuntimeException.","triggerScenarios":"doConnect -> waitForRestart loop exhausts all retry attempts (quarkus.live-reload.retry-max-attempts) with IOException on every connection attempt to the live-reload URL after a remote restart.","commonSituations":"Remote host unreachable or VPN down; wrong quarkus.live-reload.url; remote side restarted but slow to come up so all retries are exhausted; firewall blocking the port; retry-interval too short for a slow remote.","solutions":["Verify quarkus.live-reload.url points at the reachable remote dev server (curl it)","Increase quarkus.live-reload.retry-interval and quarkus.live-reload.retry-max-attempts to tolerate slow remote restarts","Check network/VPN/firewall reachability of the remote host and port","Restart the client after the remote side is fully up"],"exampleFix":"// before\nquarkus.live-reload.url=http://remote-host:8080\nquarkus.live-reload.retry-max-attempts=5\n// after\nquarkus.live-reload.url=http://remote-host:8080\nquarkus.live-reload.retry-max-attempts=30\nquarkus.live-reload.retry-interval=2S","handlingStrategy":"retry","validationCode":"// before starting remote dev, check the server is reachable\nURL u = URI.create(\"http://remote-host:8080\").toURL();\nHttpURLConnection c = (HttpURLConnection) u.openConnection();\nc.setConnectTimeout(5000);\nif (c.getResponseCode() >= 400) throw new IllegalStateException(\"Remote dev server not reachable\");","typeGuard":null,"tryCatchPattern":"try {\n    startRemoteDevClient();\n} catch (RuntimeException e) {\n    if (e.getMessage().contains(\"Could not connect to remote side\")) {\n        // check network/VPN, verify live-reload.url, restart with higher retry-max-attempts\n    }\n}","preventionTips":["Verify quarkus.live-reload.url with curl before starting the client","Raise retry-max-attempts and retry-interval to survive slow remote restarts","Keep client and server on the same VPN/network segment","Confirm the remote server log shows it is listening before launching the client"],"tags":["network","dev-mode","remote-dev","retry-exhausted"],"backgroundTag":"remote-dev-connection-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}