Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Set 0.0.0.0 as a host to run Quarkus app #318

Merged
merged 2 commits into from
Dec 21, 2020
Merged

Set 0.0.0.0 as a host to run Quarkus app #318

merged 2 commits into from
Dec 21, 2020

Conversation

Signed-off-by: svor <vsvydenk@redhat.com>
@svor svor self-assigned this Dec 18, 2020
@svor svor changed the title Set host to run quarkus app Set 0.0.0.0 as a host to run Quarkus app Dec 18, 2020
@sunix
Copy link
Contributor

sunix commented Dec 18, 2020

@svor Maybe better to set as an env variable? so it works also when you start from the terminal?
QUARKUS_HTTP_HOST

do we have the same issue with the native app ?

@svor
Copy link
Contributor Author

svor commented Dec 18, 2020

@sunix
Copy link
Contributor

sunix commented Dec 18, 2020

Still, I think it is better to set that as an environment variable in the container.
At the moment some users won't notice that there are predefined tasks. These one would just start the terminal and run ./mvnw compile quarkus:dev and it won't work as expected.

@benoitf
Copy link
Contributor

benoitf commented Dec 18, 2020

Screen.Recording.2020-12-18.at.17.28.44.mov

@svor
Copy link
Contributor Author

svor commented Dec 21, 2020

@svor Maybe better to set as an env variable? so it works also when you start from the terminal?
QUARKUS_HTTP_HOST

@sunix If we have this value in env variable, we will get a problem with tests:

[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 5.676 s <<< FAILURE! - in org.acme.getting.started.GreetingResourceTest
[ERROR] org.acme.getting.started.GreetingResourceTest.testHelloEndpoint  Time elapsed: 0.007 s  <<< ERROR!
java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
Caused by: java.lang.RuntimeException: Failed to start quarkus
Caused by: java.lang.RuntimeException: Unable to start HTTP server
Caused by: java.util.concurrent.ExecutionException: java.net.UnknownHostException: -Dquarkus.http.host=0.0.0.0: Name or service not known
Caused by: java.net.UnknownHostException: -Dquarkus.http.host=0.0.0.0: Name or service not known

@sunix
Copy link
Contributor

sunix commented Dec 21, 2020

https://che.openshift.io/factory?url=https://gist.github.com/sunix/2cc2daa838d6be27b425216ff25db3c7/raw/1dea9f886d6fb90abf7fe7a4a7c6370b1635a75b/quarkus.devfile.yaml

https://gist.github.com/sunix/2cc2daa838d6be27b425216ff25db3c7#file-quarkus-devfile-yaml-L28-L29

I don't have your error
maybe you are passing -Dquarkus.http.host=0.0.0.0 and not 0.0.0.0 in your QUARKUS_HTTP_HOST env variable

Selection_112

Signed-off-by: svor <vsvydenk@redhat.com>
@svor svor merged commit 117efdd into eclipse-che:master Dec 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants