Skip to content
New issue

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

Fail deployment when unable to create the vertx httpServer #4128

Merged
merged 1 commit into from
Sep 21, 2019

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Sep 20, 2019

Fixes: #4124

@gsmet gsmet added this to the 0.24.0 milestone Sep 20, 2019
@geoand
Copy link
Contributor Author

geoand commented Sep 20, 2019

If #4096 makes it into 0.23, then this (or an effectively similar fix) needs to make it in as well :)

@gsmet
Copy link
Member

gsmet commented Sep 20, 2019

@geoand the issue is only if #4096 is in? It doesn't solve an issue already present in the 0.23 branch in a different way?

@geoand
Copy link
Contributor Author

geoand commented Sep 20, 2019

@gsmet The main issue exists even without #4096 (I am pretty sure although I didn't test specifically). But with #4096 things are worse because a NPE is thrown that completely breaks everything down

@geoand
Copy link
Contributor Author

geoand commented Sep 20, 2019

@gsmet I just tested without #4096. In that case things are different - but still broken. No port clash is displayed and both application report success when starting up.

@geoand
Copy link
Contributor Author

geoand commented Sep 20, 2019

Force pushed to polish the code a little

Copy link
Member

@rsvoboda rsvoboda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, now the app report port already in use and stops the execution

java -jar getting-started-two/target/getting-started-two-1.0-SNAPSHOT-runner.jar
java.lang.RuntimeException: Unable to start HTTP server
	at io.quarkus.vertx.http.runtime.VertxHttpRecorder.doServerStart(VertxHttpRecorder.java:228)
	at io.quarkus.vertx.http.runtime.VertxHttpRecorder.initializeRouter(VertxHttpRecorder.java:124)
	at io.quarkus.deployment.steps.VertxHttpProcessor$initializeRouter8.deploy_0(VertxHttpProcessor$initializeRouter8.zig:94)
	at io.quarkus.deployment.steps.VertxHttpProcessor$initializeRouter8.deploy(VertxHttpProcessor$initializeRouter8.zig:119)
	at io.quarkus.runner.ApplicationImpl1.doStart(ApplicationImpl1.zig:84)
	at io.quarkus.runtime.Application.start(Application.java:91)
	at io.quarkus.runtime.Application.run(Application.java:204)
	at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:34)
Caused by: java.util.concurrent.ExecutionException: java.net.BindException: Address already in use
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
	at io.quarkus.vertx.http.runtime.VertxHttpRecorder.doServerStart(VertxHttpRecorder.java:198)
	... 7 more
Caused by: java.net.BindException: Address already in use
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Net.java:433)
	at sun.nio.ch.Net.bind(Net.java:425)
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
	at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:132)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:551)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1345)
	at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:503)
	at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:488)
	at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:984)
	at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:247)
	at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:355)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasksFrom(SingleThreadEventExecutor.java:392)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:367)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:506)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)
Exception in thread "main" java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.runner.ApplicationImpl1.doStart(ApplicationImpl1.zig:144)
	at io.quarkus.runtime.Application.start(Application.java:91)
	at io.quarkus.runtime.Application.run(Application.java:204)
	at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:34)
Caused by: java.lang.RuntimeException: Unable to start HTTP server
	at io.quarkus.vertx.http.runtime.VertxHttpRecorder.doServerStart(VertxHttpRecorder.java:228)
	at io.quarkus.vertx.http.runtime.VertxHttpRecorder.initializeRouter(VertxHttpRecorder.java:124)
	at io.quarkus.deployment.steps.VertxHttpProcessor$initializeRouter8.deploy_0(VertxHttpProcessor$initializeRouter8.zig:94)
	at io.quarkus.deployment.steps.VertxHttpProcessor$initializeRouter8.deploy(VertxHttpProcessor$initializeRouter8.zig:119)
	at io.quarkus.runner.ApplicationImpl1.doStart(ApplicationImpl1.zig:84)
	... 3 more
Caused by: java.util.concurrent.ExecutionException: java.net.BindException: Address already in use
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
	at io.quarkus.vertx.http.runtime.VertxHttpRecorder.doServerStart(VertxHttpRecorder.java:198)
	... 7 more
Caused by: java.net.BindException: Address already in use
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Net.java:433)
	at sun.nio.ch.Net.bind(Net.java:425)
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
	at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:132)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:551)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1345)
	at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:503)
	at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:488)
	at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:984)
	at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:247)
	at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:355)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasksFrom(SingleThreadEventExecutor.java:392)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:367)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:506)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)

@geoand
Copy link
Contributor Author

geoand commented Sep 20, 2019

Thanks for confirming @rsvoboda !

@gsmet
Copy link
Member

gsmet commented Sep 20, 2019

OK, the random port commit is already in 0.23 so we need to backport this one too. I added the label.

@geoand
Copy link
Contributor Author

geoand commented Sep 20, 2019

Cool, thanks

@gsmet gsmet merged commit 3421fd3 into quarkusio:master Sep 21, 2019
@geoand geoand deleted the #4124 branch September 21, 2019 14:56
@gsmet gsmet removed the backport? label Sep 24, 2019
@gsmet gsmet removed this from the 0.24.0 milestone Sep 24, 2019
@gsmet gsmet added this to the 0.23.0 milestone Sep 24, 2019
@gwenneg
Copy link
Member

gwenneg commented Nov 14, 2019

Don't pay attention to the pull request mentioned above my comment, I made a typo, it is related to another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants