Quarkus: Restarts in DevMode generate a warning about multiple Vertx instance

Created on 21 Oct 2019  路  7Comments  路  Source: quarkusio/quarkus

Describe the bug
In dev mode, we have this warning

WARNING [io.ver.cor.imp.VertxImpl] (vert.x-worker-thread-1) You're already on a Vert.x context, are you sure you want to create a new Vertx instance

Expected behavior
No warning message

Actual behavior
The warning message is logged on each restart

2019-10-21 14:41:34,882 INFO  [io.quarkus] (main) Quarkus 999-SNAPSHOT started in 1.158s. Listening on: http://0.0.0.0:8080
2019-10-21 14:41:34,882 INFO  [io.quarkus] (main) Profile dev activated. Live Coding activated.
2019-10-21 14:41:34,882 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy, smallrye-context-propagation, smallrye-reactive-streams-operators, vertx]
2019-10-21 14:41:57,488 INFO  [io.qua.dev] (vert.x-worker-thread-0) File change detected: /tmp/foo/src/main/resources/application.properties
2019-10-21 14:41:57,532 INFO  [io.quarkus] (vert.x-worker-thread-0) Quarkus stopped in 0.043s
2019-10-21 14:41:57,533 INFO  [io.qua.dep.QuarkusAugmentor] (vert.x-worker-thread-0) Beginning quarkus augmentation
2019-10-21 14:41:57,656 INFO  [io.qua.resteasy] (build-3) Resteasy running without servlet container.
2019-10-21 14:41:57,656 INFO  [io.qua.resteasy] (build-3) - Add quarkus-undertow to run Resteasy within a servlet container
2019-10-21 14:41:57,683 INFO  [io.qua.dep.QuarkusAugmentor] (vert.x-worker-thread-0) Quarkus augmentation completed in 150ms
2019-10-21 14:41:57,720 WARNING [io.ver.cor.imp.VertxImpl] (vert.x-worker-thread-0) You're already on a Vert.x context, are you sure you want to create a new Vertx instance?
2019-10-21 14:41:57,724 INFO  [io.quarkus] (vert.x-worker-thread-0) Quarkus 999-SNAPSHOT started in 0.192s. Listening on: http://0.0.0.0:8080
2019-10-21 14:41:57,724 INFO  [io.quarkus] (vert.x-worker-thread-0) Profile dev activated. Live Coding activated.
2019-10-21 14:41:57,724 INFO  [io.quarkus] (vert.x-worker-thread-0) Installed features: [cdi, resteasy, smallrye-context-propagation, smallrye-reactive-streams-operators, vertx]
2019-10-21 14:41:57,724 INFO  [io.qua.dev] (vert.x-worker-thread-0) Hot replace total time: 0.239s

To Reproduce
Steps to reproduce the behavior:

  1. start Quarkus in dev mode
  2. trigger a restart by modifying a file
  3. observe the console

Environment (please complete the following information):

  • Quarkus version or git rev: 0.25.0
arevertx kinbug

All 7 comments

I suppose we could add a log filter cleanup rule but I'm not sure it would be the right fix. @stuartwdouglas what's your take on that one?

I was thinking of doing it only for DevMode. I was not sure if filtering is the way to go.

I think it's last resort and a proper fix would be better.

I forgot about this otherwise I would have pushed a workaround in 0.26.0. There's a good chance people will complain about this.

Do you want me to prepare a draft PR for the log filtering?

It sounds like this can be closed now?

@stuartwdouglas Hi, the log filtering is a workaround only applied in dev mode till we have a proper solution of having only one Vertx instance. I'll leave the issue open. WDYT?

https://github.com/quarkusio/quarkus/issues/4367 is the issue to track removal of the 2nd vert.x instance, this one was just the log message.

Was this page helpful?
0 / 5 - 0 ratings