quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.35k stars 2.56k forks source link

Dev UI guide should mention that quarkus-vertx-http is required for /q/dev do work #14471

Open ppalaga opened 3 years ago

ppalaga commented 3 years ago

Describe the bug Wanting to try the new Dev UI in a simple Camel Quarkus app https://github.com/apache/camel-quarkus-examples/tree/master/timer-log I found that the /q/dev endpoint is not available unless I add quarkus-resteasy quarkus-vertx-http dependency.

Expected behavior The guide https://quarkus.io/guides/dev-ui should mention the above prerequisite.

Actual behavior I had to figure out myself.

To Reproduce

clone  https://github.com/apache/camel-quarkus-examples.git
cd camel-quarkus-examples/timer-log
mvn clean compile quarkus:dev

http://localhost:8080/q/dev is not available

http://localhost:8080/q/dev starts working when I add

        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-vertx-http</artifactId>
        </dependency>

Environment (please complete the following information):

geoand commented 3 years ago

It is not quarkus-resteasy that needs to be part included, but any extension that results in transitively including quarkus-vertx-http

ppalaga commented 3 years ago

I wonder whether Quarkus tooling could not add quarkus-vertx-http under the hood if necessary? That would be even better than documenting the prerequisite.

geoand commented 3 years ago

cc @aloubyansky ^

phhoef commented 2 years ago

I am very new to quarkus but ran into the same problem. The dev UI is not available and only shows http 404. I tried adding the quarks-vertx-http dependency to my maven pom.xml. But unfortunately it does not solve the problem. Any ideas what's going wrong?

gsmet commented 2 years ago

@phhoef we would need more information, at least the list of extensions you are using (you have that at startup).

aloubyansky commented 2 years ago

And whether the app was actually launched in dev mode.

phhoef commented 2 years ago

@gsmet @aloubyansky thanks for your fast response and sorry for not providing enough information. Not aware if there is a method of listing all installed extension. I understood, that the extensions are just the dependencies of my project:

<dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-kotlin</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-reactive-jackson</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-arc</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-reactive</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-config-yaml</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-junit5</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.rest-assured</groupId>
      <artifactId>rest-assured</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib-jdk8</artifactId>
    </dependency>
    <dependency>
      <groupId>io.rest-assured</groupId>
      <artifactId>kotlin-extensions</artifactId>
      <scope>test</scope>
    </dependency>

The app runs in a docker container through docker-compose and is started in dev mode. Not sure how to double check if dev mode was actually used, but live reload is working.

It's basically just the app generated with maven. I've just added the docker-compose and added an additional rest endpoint. The generated and new endpoint is working.

Quarkus Version: 2.7.5.Final

aloubyansky commented 2 years ago

Ah, it's remote-dev? We are probably not exposing it in this case for safety reasons?

geoand commented 2 years ago

DevUI is indeed not exposed when running remote-dev.

It is only exposed when running mvn:quarkus-dev, absolutely nothing else.

phhoef commented 2 years ago

Again, thanks for explanations. I was following this tutorial: https://blog.sebastian-daschner.com/entries/quarkus-remote-dev-in-containers-update

Not sure, but I think the app is not running in remove-dev in the docker container, right? I am issuing the mvn quarkus:remote-dev on my machine to get live reloading through the container.

The default index page is working. When trying to open the dev ui I see the following screen Sorry, I think GitHub has currently some issues, that's why I cannot upload the image directly to this post. https://ibb.co/yyKYpjc

aloubyansky commented 2 years ago

I wonder whether Quarkus tooling could not add quarkus-vertx-http under the hood if necessary? That would be even better than documenting the prerequisite.

That would be another reason to introduce support for dev mode-only dependencies. It needs to be thought through.