We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not use this issue tracker to ask questions, instead use one of these channels. Questions will likely be closed without notice.
4.4.9 +
vert.x 4.4.9 and above, http server will not receive requests after deployment
@slf4j public class HttpDeviceNetwork implements IDeviceNetwork {
private Vertx vertx; private HttpServer backendServer; private HttpConfig httpConfig; private CountDownLatch countDownLatch; @Override public void send(String topic, int qos, byte[] content) { } @Override public NetworkType getType() { return NetworkType.http; } @Override public void init(NetworkConfig config) { try { vertx = Vertx.vertx(); httpConfig = config.getConfig("http", HttpConfig.class); backendServer = vertx.createHttpServer(); log.info("======>>>>>http network init success."); } catch (Exception e) { log.error("======>>>>>http network init fail."); } } @Override public void start() { Router router = Router.router(vertx); router.route().handler(BodyHandler.create()); router.get("/test").handler(rc -> { log.info("======>>>>>http network request received."); HttpServerResponse httpServerResponse = rc.response(); httpServerResponse.putHeader("content-type", "text/plain"); httpServerResponse.end("Hello from Thingverse HTTP Server!"); }); backendServer.requestHandler(router) .listen(httpConfig.getPort(), http -> { if (http.succeeded()) { log.info("http server create succeed,port:{}", httpConfig.getPort()); } else { log.error("http server create failed", http.cause()); } }); } @Override public void stop() { backendServer.close(); }
}
C:\Users\Administrator>curl -v http://localhost:28888/test
Host localhost:28888 was resolved. IPv6: ::1 IPv4: 127.0.0.1 Trying [::1]:28888... Connected to localhost (::1) port 28888 GET / HTTP/1.1 Host: localhost:28888 User-Agent: curl/8.8.0 Accept: /
Request completely sent off Empty reply from server Closing connection curl: (52) Empty reply from server
Deploy a server instance that starts up with no errors, but just doesn't receive requests.A version 4.4.8 or lower is fine
The text was updated successfully, but these errors were encountered:
The release notes are short and I can't see anything other than a Netty upgrade that could be related.
Given Vert.x is embedded into a Spring app in your case, perhaps there's a dependency conflict somewhere?
Sorry, something went wrong.
The same code would work fine in version 4.4.8, but would not work at startup if you switched to 4.5.x
Please share a minimal reproducer on GitHub. This snippet alone works for me with any version.
No branches or pull requests
Questions
Do not use this issue tracker to ask questions, instead use one of these channels. Questions will likely be closed without notice.
Version
4.4.9 +
Context
vert.x 4.4.9 and above, http server will not receive requests after deployment
Steps to reproduce
@slf4j
public class HttpDeviceNetwork implements IDeviceNetwork {
}
C:\Users\Administrator>curl -v http://localhost:28888/test
Host localhost:28888 was resolved.
IPv6: ::1
IPv4: 127.0.0.1
Trying [::1]:28888...
Connected to localhost (::1) port 28888
GET / HTTP/1.1
Host: localhost:28888
User-Agent: curl/8.8.0
Accept: /
Request completely sent off
Empty reply from server
Closing connection
curl: (52) Empty reply from server
Deploy a server instance that starts up with no errors, but just doesn't receive requests.A version 4.4.8 or lower is fine
Extra
The text was updated successfully, but these errors were encountered: