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

Port number must be set on quarkus.spring-cloud-config.url to pass the test #17522

Closed
aymenhouissa opened this issue May 28, 2021 · 1 comment · Fixed by #17553
Closed

Port number must be set on quarkus.spring-cloud-config.url to pass the test #17522

aymenhouissa opened this issue May 28, 2021 · 1 comment · Fixed by #17553
Assignees
Labels
area/spring Issues relating to the Spring integration env/windows Impacts Windows machines kind/bug Something isn't working
Milestone

Comments

@aymenhouissa
Copy link

Describe the bug

My Quarkus project reads its configuration from a central Spring Cloud Config Server. I've set the corresponding properties, so it works when running mvn quarkus:dev but fails when running the tests mvn clean package

Expected behavior

Such command should work. It runs the test using the quarkus.spring-cloud-config.url property without the need to add a special port.
quarkus.spring-cloud-config.url=http://my-spring-config-service

Actual behavior

Got an exception:
Caused by: java.lang.RuntimeException: Failed to start quarkus Caused by: java.lang.RuntimeException: Unable to obtain configuration from Spring Cloud Config Server at http://my-spring-config-service Caused by: java.lang.IllegalArgumentException: port p must be in range 0 <= p <= 65535

To fix this, I added the port number
quarkus.spring-cloud-config.url=http://my-spring-config-service:80

To Reproduce

Create any Hello World application with spring-cloud-config extension, configure the URL targeting SCCS without a port number
then run
mvn clean package

Output of uname -a or ver

Microsoft Windows [version 10.0.19041.804]

Output of java -version

openjdk version "11" 2018-09-25

GraalVM version (if different from Java)

openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment GraalVM CE 21.1.0 (build 11.0.11+8-jvmci-21.1-b05)
OpenJDK 64-Bit Server VM GraalVM CE 21.1.0 (build 11.0.11+8-jvmci-21.1-b05, mixed mode, sharing)

Quarkus version or git rev

1.13.4.Final

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

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)

@aymenhouissa aymenhouissa added the kind/bug Something isn't working label May 28, 2021
@quarkus-bot quarkus-bot bot added area/spring Issues relating to the Spring integration env/windows Impacts Windows machines labels May 28, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented May 28, 2021

/cc @geoand

@geoand geoand self-assigned this May 31, 2021
geoand added a commit to geoand/quarkus that referenced this issue May 31, 2021
geoand added a commit that referenced this issue May 31, 2021
Ensure that Spring Cloud Config Server can be reached when port is not set
@quarkus-bot quarkus-bot bot added this to the 2.1 - main milestone May 31, 2021
@gsmet gsmet modified the milestones: 2.1 - main, 2.0.0.Final May 31, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/spring Issues relating to the Spring integration env/windows Impacts Windows machines kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants