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

No module named mosquitto_auth #5

Open
huytn opened this issue Apr 28, 2016 · 6 comments
Open

No module named mosquitto_auth #5

huytn opened this issue Apr 28, 2016 · 6 comments

Comments

@huytn
Copy link

huytn commented Apr 28, 2016

how to install this module

@imZack
Copy link
Contributor

imZack commented Sep 22, 2016

Try to set a proper PYTHONPATH environment variable should works.

@FRANZEE
Copy link

FRANZEE commented Aug 7, 2017

@imZack how to do it?
help please!

@viraja1
Copy link

viraja1 commented Aug 7, 2017

@FRANZEE I have created a pull request to specify module path in mosquitto config instead of using PYTHONPATH #8

@tanktoo
Copy link

tanktoo commented Sep 28, 2017

Hi, I have the same problem and don't know how to set PYTHONPATH that it will work. Any help would be great!

@jaydg
Copy link
Contributor

jaydg commented Oct 18, 2017

PYTHONPATH is an environment variable. Have a look at https://docs.python.org/2/using/cmdline.html#envvar-PYTHONPATH

export PYTHONPATH=/path/to/module
mosquitto -c your_config_file.conf

or when using bash this will also work:

PYTHONPATH=/path/to/module mosquitto -c your_config_file.conf

@DxrMorgan
Copy link

in mosquitto.conf make:

auth_plugin /usr/local/lib/mosquitto/auth_plugin_pyauth.so
auth_opt_pyauth_module mosquitto_auth

EXPORT pythonpath:

export PYTHONPATH=/usr/lib/mosquitto

and run

mosquitto -c /etc/mosquitto/mosquitto.conf

1561325989: mosquitto version 1.6.3 starting
1561325989: Config loaded from /etc/mosquitto/mosquitto.conf.
1561325989: Loading plugin: /usr/local/lib/mosquitto/auth_plugin_pyauth.so
1561325989: ├── Username/password checking enabled.
1561325989: ├── TLS-PSK checking enabled.
1561325989: └── Extended authentication not enabled.
1561325989: Opening ipv4 listen socket on port 8883.
1561325989: Opening ipv6 listen socket on port 8883.

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

No branches or pull requests

7 participants