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

bad credential amqps://[email protected] #1328

Open
endlisnis opened this issue Dec 5, 2024 · 9 comments
Open

bad credential amqps://[email protected] #1328

endlisnis opened this issue Dec 5, 2024 · 9 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers harmless log log messages inscrutable regression Broke something that was working before. work-around a work-around is provided, mitigating the issue.

Comments

@endlisnis
Copy link
Contributor

endlisnis commented Dec 5, 2024

I've noticed recently that when I start up sr3, I get logs like this:

2024-12-05 14:24:19,094 [ERROR] 333 sarracenia.config.credentials isValid credential ParseResult(scheme='amqps', netloc='[email protected]', path='', params='', query='', fragment='') not found
2024-12-05 14:24:19,094 [CRITICAL] 333 root validate_urlstr bad credential amqps://[email protected]

After that, sr3 is able to function in what appears to be a normal manner. Is this something that needs fixing?

Here's my config file:

broker amqps://hpfx.collab.science.gc.ca

queue_name q_anonymous.${HOSTNAME}.20241013
instances 4

directory ${PWD}/swobMirror/
# All stations
strip 3
topicPrefix v02.post
subtopic *.WXO-DD.observations.swob-ml.#
batch 64

mirror True
accept .*
expire 4h
acceptSizeWrong off
inflight tmp/

rxq_name ${PWD}/rxpipe
flowCallback rxqueue_gzip.RxQueue_gzip
$ sr3 --version
3.00.56
@petersilva petersilva added bug Something isn't working good first issue Good for newcomers harmless labels Dec 5, 2024
@petersilva
Copy link
Contributor

I think it understands ... filling in the anonymous password for the anonymous user... but it incorrectly complains about a missing entry... have to reproduce the problem, then dream up some strategies to get around it.

I confirm it should not result in data loss, or any delay though.

@endlisnis
Copy link
Contributor Author

Even if you put in the password, it still complains.

@petersilva
Copy link
Contributor

When you say "put in the password" ... the place to put it would be in ~/.config/sr3/credentials.conf... The warning should go away if you have an entry like:

amqps://anonymous:[email protected]

in that file. I guess we can call that a work-around.

@endlisnis
Copy link
Contributor Author

Oh, by "put in the password", I mean putting broker amqps://anonymous:[email protected] in my subscribe/hpfx.conf file. I have never even heard of credentials.conf

@petersilva
Copy link
Contributor

Well if you try putting it in the credentials file... let me know if the error goes away.
That would confirm we understand the problem correctly.

@petersilva
Copy link
Contributor

best practice is to put all passwords in the credentials files... and keep the configs password free... but it does work if you put the pw straight in the config... we don't want to be too stubborn about it.

@reidsunderland
Copy link
Member

The error does go away if you have amqps://anonymous:[email protected] in ~/.config/sr3/credentials.conf

@petersilva petersilva added the regression Broke something that was working before. label Dec 9, 2024
@petersilva
Copy link
Contributor

  • suppress CRITICAL message for missing pw for anonymous, because we guess anyways.
  • change ERROR to warning... "credential not found in credentials.conf" ...
  • there should be no message at all for anonymous subscription because:
    • anonymous should be inferred user, if user not specified.
    • if user is anonymous, pw anonymous is inferred, so no message needed.

users should not need a "credentials.conf" file to exist...

when you need credentials.conf... should be more explicit about pointing out the file name and format needed.

@petersilva petersilva added the log log messages inscrutable label Dec 9, 2024
@petersilva
Copy link
Contributor

petersilva commented Dec 13, 2024

work-around to prevent message... do not put the username in the url
note:

broker amqps://dd.weather.gc.ca

Does not provoke the error... only when username is used. (is default anyways.)

@petersilva petersilva added the work-around a work-around is provided, mitigating the issue. label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers harmless log log messages inscrutable regression Broke something that was working before. work-around a work-around is provided, mitigating the issue.
Projects
None yet
Development

No branches or pull requests

4 participants