Redis: WRONGPASS invalid username-password pair #22
-
Hi Team, I am writing a new device service using EdgeX C SDK. I was following the documentation for running the sample random number service. After doing above change I was able to run my sample device-template service and issue requests to it via the EdgeX Command microservice. (i.e. I can successfully call the REST API http://EDGE-IP:59882/api/v2/device/name/RandNum-Device01/RandomNumber) Then I noticed there is below error coming on the stdout when I execute the service: In order to resolve above error I see addon-service documentation and hence added below line in my docker compose: After I made above change now my device service immediately exits after throwing below error: I could not figure out why username-password is invalid since both are auto generated and nothing is manually done by me.
Version details: Additional Info on how I am running my sample device service "device-template":
I did this by modifying configuration.toml file:
With this bind IP and name change my service works fine, I can use command microservice to get value of resource attributes, now only issue is that when I add redisdb[device-template] in ADD_KNOWN_SECRETS then things wont work as explained above. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 8 replies
-
Please attach you docker compose file where you have added the above changes. |
Beta Was this translation helpful? Give feedback.
-
Hi @bnevis-i This error "vault: get secrets request failed" I was able to correct as I have mentioned in my post by adding redisdb[device-template] in ADD_KNOWN_SECRETS: section. Now the error I am facing is "Error authenticating with Redis: WRONGPASS invalid username-password pair or user is disabled." If I run my service under strace like: Then I could see my device-service is trying to send below as username and password to redis: I assume my sample device service is able to fetch user name password from vault that is why it is able to send the same but somehow it is not accepted by redis. @lenny-intel Attaching my docker-compose file, please see if I made some mistake. |
Beta Was this translation helpful? Give feedback.
-
That's an easy one. It was a bug. edgexfoundry/edgex-go#4031 Username was a feature added in Redis5. The existing go code had only ever used the Unfortunately, this fix didn't make the 2.2.0 release. Good news is that you won't have to wait much longer for the fix, which will be in the 2.3.0 release. It should be possible to also manually patch the secretstore with the fix, though it could be a little involved to do so. |
Beta Was this translation helpful? Give feedback.
-
Hi @bnevis-i Just a follow up query, when I started using the image nexus3.edgexfoundry.org:10004/security-secretstore-setup:latest, the security-secretstore-setup microservice is continuously restarting and from the docker logs on this service I can see below error: level=INFO ts=2022-11-09T14:21:08.428368795Z app=security-secretstore-setup source=init.go:587 msg="Starting the Kong Admin API config file creation" We are not using Kong maybe thats why, is it possible to workaround this error. |
Beta Was this translation helpful? Give feedback.
-
@satyam1990 it shouldn't matter whether you are using Kong or not. All it does is write a configuration file. Full explanation here: |
Beta Was this translation helpful? Give feedback.
-
I suggest putting this on hold a day or two and testing with the new release when it is out. |
Beta Was this translation helpful? Give feedback.
-
@bnevis-i Tried with levski image: nexus3.edgexfoundry.org:10004/security-secretstore-setup:2.3.0 Still same issue I am facing as mentioned before security-secretstore-setup keeps on restrating. |
Beta Was this translation helpful? Give feedback.
That's an easy one. It was a bug. edgexfoundry/edgex-go#4031
Username was a feature added in Redis5. The existing go code had only ever used the
AUTH <password>
form, which is an implieddefault
user.Unfortunately, this fix didn't make the 2.2.0 release. Good news is that you won't have to wait much longer for the fix, which will be in the 2.3.0 release.
It should be possible to also manually patch the secretstore with the fix, though it could be a little involved to do so.