Giter Site home page Giter Site logo

Comments (12)

jpmens avatar jpmens commented on June 11, 2024

You've compiled yourself, so you've probably also made install in Mosquitto. Did you remember to run ldconfig so that your system picks up new libs? Also, check ldd /usr/lib/auth-plug.so to see whether all paths can be resolved.

from mosquitto-auth-plug.

gallog avatar gallog commented on June 11, 2024

I've made
sudo make install
sudo ldconfig

ldd output:
ldd /usr/lib/auth-plug.so
linux-gate.so.1 => (0xb777b000)
libmysqlclient.so.18 => /usr/lib/i386-linux-gnu/libmysqlclient.so.18 (0xb743b000)
libcrypto.so.1.0.0 => /lib/i386-linux-gnu/libcrypto.so.1.0.0 (0xb7290000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb70ea000)
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb70d4000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb70cf000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb70b4000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb7088000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb7069000)
/lib/ld-linux.so.2 (0xb777c000)

ldd mosquitto
linux-gate.so.1 => (0xb7708000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb76eb000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb76bf000)
librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb76b5000)
libssl.so.1.0.0 => /lib/i386-linux-gnu/libssl.so.1.0.0 (0xb765d000)
libcrypto.so.1.0.0 => /lib/i386-linux-gnu/libcrypto.so.1.0.0 (0xb74b2000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb730d000)
/lib/ld-linux.so.2 (0xb7709000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb72f2000)
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb72db000)

from mosquitto-auth-plug.

jpmens avatar jpmens commented on June 11, 2024

In Mosquitto's src/security.c, on line 56, can you add this after the call to LIB_LOAD?

if (!lib){
       printf("LOADERROR %s\n", dlerror());

from mosquitto-auth-plug.

gallog avatar gallog commented on June 11, 2024

Output:
LOADERROR /usr/lib/auth-plug.so: undefined symbol: ares_library_init

from mosquitto-auth-plug.

jpmens avatar jpmens commented on June 11, 2024

There you go. :)
Mosquitto requires the cares for DNS SRV records, but you can safely change Mosquitto's config.mk to set WITH_SRV:=no. Then:

make clean
make

from mosquitto-auth-plug.

gallog avatar gallog commented on June 11, 2024

Solved, thanks :)
Also need to rebuild you plugin after changing WITH_SRV:=no and recompiling mosquitto.

from mosquitto-auth-plug.

jpmens avatar jpmens commented on June 11, 2024

Because of the linkage with Mosquitto, yes. Sorry: I forgot to say that. Glad it works now.

from mosquitto-auth-plug.

zhangshexin avatar zhangshexin commented on June 11, 2024

Hello, I am using is 1.3.5, I tried in accordance with the above method, but it's still an error like that

from mosquitto-auth-plug.

hkverma310 avatar hkverma310 commented on June 11, 2024

Access denied for user 'xxxx'@'localhost' (using password: NO)
i am getting the above error

any help

auth_opt_backends mysql
auth_opt_db_host 192.168.1.95
auth_opt_db_port 3307
auth_opt_db_username root
auth_opt_db_password root
auth_opt_dbname test
auth_opt_anonusername AnonymouS
auth_opt_userquery SELECT pw FROM users WHERE username = '%s'
auth_opt_superquery SELECT IFNULL(COUNT(*), 0) FROM users WHERE username = '%s' AND super = 1

from mosquitto-auth-plug.

jpmens avatar jpmens commented on June 11, 2024

Why are you commenting on a closed issue with something that has nothing to do with the original issue?! The plugin isn't allowed to connect to mysql. are you sure root is your db password?

from mosquitto-auth-plug.

hkverma310 avatar hkverma310 commented on June 11, 2024

yeah my db password is root

from mosquitto-auth-plug.

mahesh-balumuri avatar mahesh-balumuri commented on June 11, 2024

I have changed WITH_SRV:=no and recompiled both mosquitto and mqtt-auth-plugin. I am getting the below error.

./mosquitto -c ../local.conf
1457697662: mosquitto version 1.4.8 (build date 2016-03-11 03:59:19-0800) starting
1457697662: Config loaded from ../local.conf.
1457697662: |-- *** auth-plug: startup
|-- No backends configured.
|-- *** ABORT.

from mosquitto-auth-plug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.