Skip to content

Quarkus devmode does not warn when port is not available #17950

@glefloch

Description

@glefloch

Describe the bug

Starting two quarkus apps end up with an ERROR and a WARNING in the second one indicating that the port is already binded.
When running a docker container on port 8080 and starting a quarkus app, this warning does not appear, everything looks good but the app is not accessible.

cc @sebastienblanc I think this is the same error you hit on your demo last week

Expected behavior

Quarkus should display a warning such as:

2021-06-15 22:22:40,108 ERROR [io.qua.run.Application] (Quarkus Main Thread) Port 8080 seems to be in use by another process. Quarkus may already be running or the port is used by another application.
2021-06-15 22:22:40,110 WARN  [io.qua.run.Application] (Quarkus Main Thread) Use 'netstat -anv | grep 8080' to identify the process occupying the port.
2021-06-15 22:22:40,110 WARN  [io.qua.run.Application] (Quarkus Main Thread) You can try to kill it with 'kill -9 <pid>'.

Actual behavior

Quarkus does not display this error when the port is occupied by a docker container

To Reproduce

Steps to reproduce the behavior:

  1. Start a docker container that exposes something on port 8080
  2. Start a quarkus app in dev mode with a simple rest resource
  3. everything looks ok but, hitting http://localhost:8080 will hit the docker container

Environment (please complete the following information):

Output of uname -a or ver

Darwin Guillaumes-MacBook-Pro.local 20.1.0 Darwin Kernel Version 20.1.0: Sat Oct 31 00:07:11 PDT 2020; root:xnu-7195.50.7~2/RELEASE_X86_64 x86_64

Output of java -version

openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06, mixed mode, sharing)

GraalVM version (if different from Java)

Quarkus version or git rev

Build tool (ie. output of mvnw --version or gradlew --version)

It appears with both tools

Additional context

(Add any other context about the problem here.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions