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

Can't register application in Consul #5812

Open
rkudryashov opened this issue Nov 27, 2019 · 2 comments
Open

Can't register application in Consul #5812

rkudryashov opened this issue Nov 27, 2019 · 2 comments

Comments

@rkudryashov
Copy link

@rkudryashov rkudryashov commented Nov 27, 2019

Describe the bug
It isn't possible to register Quarkus application in Consul using some of the latest Quarkus versions that I've tested (including 999-SNAPSHOT, 1.0.0.Final, RCs). I haven't data about previous versions, though in the reproducer project below, that uses 0.15.0 Quarkus version, there is other error (probably it is not needed to investigate it). It seems like the goal of this reproductor is to show ability to read config from Consul, but not the registration by itself. I don't know whether registration will work after fix of reading config.

Expected behavior
There are not Consul-related warnings in the log of application. Registration is shown on http://localhost:8500/ui/dc1/services

Actual behavior
Application is not registered in Consul; the log looks like:

2019-11-27 18:35:46,377 INFO  [org.mic.con.sou.con.ConsulConfigSource] (vert.x-worker-thread-2) Loading [consul] MicroProfile ConfigSource
2019-11-27 18:35:46,403 INFO  [org.mic.con.sou.con.ConsulConfigSource] (vert.x-worker-thread-2) getProperties
2019-11-27 18:35:46,422 INFO  [org.mic.con.sou.con.ConsulConfigSource] (vert.x-worker-thread-2) Loading [consul] MicroProfile ConfigSource
2019-11-27 18:35:46,589 INFO  [org.mic.con.sou.con.ConsulConfigSource] (vert.x-worker-thread-2) getProperties
2019-11-27 18:35:46,590 WARNING [org.mic.con.sou.con.ConsulConfigSource] (vert.x-worker-thread-2) consul getKVValue failed: Illegal character in path at index 52: http://localhost:8500/v1/kv/%dev.quarkus.log.filter."io.vertx.core.impl.VertxImpl".if-starts-with
2019-11-27 18:35:46,590 WARNING [org.mic.con.sou.con.ConsulConfigSource] (vert.x-worker-thread-2) consul getKVValue failed: Illegal character in path at index 47: http://localhost:8500/v1/kv/quarkus.log.filter."io.vertx.core.impl.VertxImpl".if-starts-with
2019-11-27 18:35:46,590 WARNING [org.mic.con.sou.con.ConsulConfigSource] (vert.x-worker-thread-2) consul getKVValue failed: Illegal character in path at index 52: http://localhost:8500/v1/kv/%dev.quarkus.log.filter."org.jboss.threads".if-starts-with
2019-11-27 18:35:46,590 WARNING [org.mic.con.sou.con.ConsulConfigSource] (vert.x-worker-thread-2) consul getKVValue failed: Illegal character in path at index 47: http://localhost:8500/v1/kv/quarkus.log.filter."org.jboss.threads".if-starts-with
2019-11-27 18:35:46,590 WARNING [org.mic.con.sou.con.ConsulConfigSource] (vert.x-worker-thread-2) consul getKVValue failed: Illegal character in path at index 52: http://localhost:8500/v1/kv/%dev.quarkus.log.filter."org.jboss.resteasy.resteasy_jaxrs.i18n".if-starts-with
2019-11-27 18:35:46,591 WARNING [org.mic.con.sou.con.ConsulConfigSource] (vert.x-worker-thread-2) consul getKVValue failed: Illegal character in path at index 47: http://localhost:8500/v1/kv/quarkus.log.filter."org.jboss.resteasy.resteasy_jaxrs.i18n".if-starts-with
2019-11-27 18:35:46,596 INFO  [io.quarkus] (vert.x-worker-thread-2) Quarkus 999-SNAPSHOT started in 0.806s. Listening on: http://0.0.0.0:8080
2019-11-27 18:35:46,596 INFO  [io.quarkus] (vert.x-worker-thread-2) Profile dev activated. Live Coding activated.
2019-11-27 18:35:46,596 INFO  [io.quarkus] (vert.x-worker-thread-2) Installed features: [cdi, resteasy]
2019-11-27 18:35:46,596 INFO  [io.qua.dev] (vert.x-worker-thread-2) Hot replace total time: 0.832s 

To Reproduce
Steps to reproduce the behavior:

  1. Install Consul
  2. Start the Consul agent in development mode
  3. Checkout repository https://github.com/yazidaqel/quarkus-consul-config-demo
  4. Replace Quarkus version in pom.xml to 999-SNAPSHOT
  5. Run Maven task quarkus:dev

Configuration
Specified in the project

Environment

  • Microsoft Windows 10
  • openjdk version "12"
  • Quarkus version: any of [1.0.0.Final, 999-SNAPSHOT]
@gsmet

This comment has been minimized.

Copy link
Member

@gsmet gsmet commented Nov 28, 2019

@dmlloyd this looks like an issue with how we deal with profiles. Not sure if we have an easy solution though.

@gsmet gsmet added the area/config label Nov 28, 2019
@dmlloyd

This comment has been minimized.

Copy link
Member

@dmlloyd dmlloyd commented Nov 29, 2019

The ConsulConfigSource is definitely not correctly URL-encoding its parameters, which is dangerous as well as being incorrect. I don't think that code exists in any of our code bases though, does it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.