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

Check socket file permissions before starting #9

Open
RubenHoms opened this issue Dec 5, 2019 · 0 comments
Open

Check socket file permissions before starting #9

RubenHoms opened this issue Dec 5, 2019 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@RubenHoms
Copy link
Contributor

Version

v1.1.1

File / Feature

Reading metrics from the OpenSIPS socket file.

Expected behaviour

It should tell me that I don't have the right permissions to read from the socket file and exit with a useful info message.

Actual behaviour

The exporter runs and spits our permission denied errors.

Stacktrace / Error message

Started OpenSIPS exporter, listening on :9434
Error encountered while reading statistics from opensips socket: read unixgram /tmp/opensips_exporter158593694/1.sock: i/o timeout
ERROR:mi_datagram:mi_datagram_server: failed to send the response: Permission denied (13)

Other info

Same error came up in #8, with the simple fix being "run it as the same user your OpenSIPS socket file is created with". It would make sense to have the exporter check the socket file permissions against the user it is running as. If they're not the same user, or don't have the proper permissions to read from the file, the exporter should exit and print a message telling them to run the exporter as the correct user.

@RubenHoms RubenHoms added enhancement New feature or request help wanted Extra attention is needed labels Dec 5, 2019
@RubenHoms RubenHoms added bug Something isn't working good first issue Good for newcomers and removed enhancement New feature or request labels Dec 9, 2020
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 help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant