mosquitto_pyauth icon indicating copy to clipboard operation
mosquitto_pyauth copied to clipboard

ModuleNotFoundError

Open jvoshage opened this issue 5 years ago • 1 comments

I am trying to start mosquitto 1.6.2 using the mosquitto.conf where I put

auth_plugin  /usr/local/lib/mosquitto/auth_plugin_pyauth.so
auth_opt_pyauth_module testauth.py 

I keep getting the ModuleNotFoundError no matter where I put the testauth.py file.

1557196428: mosquitto version 1.6.2 starting 
1557196428: Config loaded from mqtt/mosquitto/mosquitto.conf. 
1557196428: Loading plugin: /usr/local/lib/mosquitto/auth_plugin_pyauth.so
1557196428:  ├── Username/password checking enabled.                                             
1557196428:  ├── TLS-PSK checking not enabled.                                                   
1557196428:  └── Extended authentication not enabled.                                            ModuleNotFoundError: No module named 'testauth'                                                  
failed to import module: testauth.py 

I am running out of ideas on what to try next. Any ideas?

jvoshage avatar May 07 '19 02:05 jvoshage

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

DxrMorgan avatar Jun 23 '19 21:06 DxrMorgan