-
Notifications
You must be signed in to change notification settings - Fork 179
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
Quarkus won't allow empty string for username and password #2235
Comments
That's a question for @radcortez |
From the stacktrace, not with that API. A call to In this case, to support an empty username / password, the integration code in RM needs to use another API from Config: |
But that's in the dev console, not in reactive messaging. |
What do you mean? |
The code using |
Ah got it! Sorry. |
Fix how is retrieved the configuration (See smallrye/smallrye-reactive-messaging#2235 for details)
Will be fixed by quarkusio/quarkus#35115. Closing this one (wrong repo as explained). |
Fix how is retrieved the configuration (See smallrye/smallrye-reactive-messaging#2235 for details)
I am trying to pass an empty string as the username and password in my configuration but it is being converted to null and I am getting CONNECTION_REFUSED. Is there a way to pass empty string in the quarkus application.properties for username and password?
mp.messaging.incoming.scores.username=
mp.messaging.incoming.scores.password=
2023-07-26 14:39:57,593 DEBUG [io.ver.mqt.imp.MqttClientImpl] (vert.x-eventloop-thread-0) Trying to connect with XXXX:8883
2023-07-26 14:39:57,620 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile [dev]): java.util.NoSuchElementException: SRCFG00040: The config property mp.messaging.incoming.scores.username is defined as the empty String ("") which the following Converter considered to be null: io.smallrye.config.Converters$BuiltInConverter
at io.smallrye.config.SmallRyeConfig.convertValue(SmallRyeConfig.java:300)
at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:242)
at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:168)
at io.quarkus.smallrye.reactivemessaging.runtime.devconsole.Connectors.getProperties(Connectors.java:96)
at io.quarkus.smallrye.reactivemessaging.runtime.devconsole.Connectors.collect(Connectors.java:77)
at io.quarkus.smallrye.reactivemessaging.runtime.devconsole.Connectors_Observer_collect_09787e46bbc1ae6beb97ee935c415e22cef455b0.notify(Unknown Source)
at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:328)
at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:310)
at io.quarkus.arc.impl.EventImpl.fire(EventImpl.java:78)
at io.quarkus.arc.runtime.ArcRecorder.fireLifecycleEvent(ArcRecorder.java:131)
at io.quarkus.arc.runtime.ArcRecorder.handleLifecycleEvents(ArcRecorder.java:100)
at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent1144526294.deploy_0(Unknown Source)
at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent1144526294.deploy(Unknown Source)
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:108)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
at io.quarkus.runner.GeneratedMain.main(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:104)
at java.base/java.lang.Thread.run(Thread.java:829)
2023-07-26 14:39:57,621 INFO [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start live reload endpoint to recover from previous Quarkus startup failure
2023-07-26 14:39:57,954 INFO [io.ver.mqt.imp.MqttClientImpl] (vert.x-eventloop-thread-0) Connection with XXXX:8883 established successfully
2023-07-26 14:39:57,954 INFO [io.ver.mqt.imp.MqttClientImpl] (vert.x-eventloop-thread-0) Connection with XXXX:8883 established successfully
2023-07-26 14:39:57,959 DEBUG [io.ver.mqt.imp.MqttClientImpl] (vert.x-eventloop-thread-0) Sending packet MqttConnectMessage[fixedHeader=MqttFixedHeader[messageType=CONNECT, isDup=false, qosLevel=AT_MOST_ONCE, isRetain=false, remainingLength=0], variableHeader=MqttConnectVariableHeader[name=MQTT, version=4, hasUserName=false, hasPassword=false, isWillRetain=false, isWillFlag=false, isCleanSession=true, keepAliveTimeSeconds=30], payload=MqttConnectPayload[clientIdentifier=df7057e3-58a0-45a0-8200-68db4d9aec69, willTopic=null, willMessage=null, userName=null, password=null]]
2023-07-26 14:39:57,959 DEBUG [io.ver.mqt.imp.MqttClientImpl] (vert.x-eventloop-thread-0) Sending packet MqttConnectMessage[fixedHeader=MqttFixedHeader[messageType=CONNECT, isDup=false, qosLevel=AT_MOST_ONCE, isRetain=false, remainingLength=0], variableHeader=MqttConnectVariableHeader[name=MQTT, version=4, hasUserName=false, hasPassword=false, isWillRetain=false, isWillFlag=false, isCleanSession=true, keepAliveTimeSeconds=30], payload=MqttConnectPayload[clientIdentifier=df7057e3-58a0-45a0-8200-68db4d9aec69, willTopic=null, willMessage=null, userName=null, password=null]]
2023-07-26 14:39:57,995 DEBUG [io.ver.mqt.imp.MqttClientImpl] (vert.x-eventloop-thread-0) Incoming packet MqttConnAckMessage[fixedHeader=MqttFixedHeader[messageType=CONNACK, isDup=false, qosLevel=AT_MOST_ONCE, isRetain=false, remainingLength=2], variableHeader=MqttConnAckVariableHeader[connectReturnCode=CONNECTION_REFUSED_NOT_AUTHORIZED, sessionPresent=false], payload=]
2023-07-26 14:39:57,995 DEBUG [io.ver.mqt.imp.MqttClientImpl] (vert.x-eventloop-thread-0) Incoming packet MqttConnAckMessage[fixedHeader=MqttFixedHeader[messageType=CONNACK, isDup=false, qosLevel=AT_MOST_ONCE, isRetain=false, remainingLength=2], variableHeader=MqttConnAckVariableHeader[connectReturnCode=CONNECTION_REFUSED_NOT_AUTHORIZED, sessionPresent=false], payload=]
2023-07-26 14:39:57,996 ERROR [io.ver.mqt.imp.MqttClientImpl] (vert.x-eventloop-thread-0) Connection refused by the server - code: CONNECTION_REFUSED_NOT_AUTHORIZED
2023-07-26 14:39:57,996 ERROR [io.ver.mqt.imp.MqttClientImpl] (vert.x-eventloop-thread-0) Connection refused by the server - code: CONNECTION_REFUSED_NOT_AUTHORIZED
The text was updated successfully, but these errors were encountered: