emqx / emqx-auth-mongo

EMQX Authentication/ACL with MongoDB
https://emqx.io/
Apache License 2.0
21 stars 26 forks source link

MongoDB plugin error eqmx #247

Open ctellechea2001 opened 2 years ago

ctellechea2001 commented 2 years ago

Hi, how are you? I am receiving the following error and the plugin is not starting.

/opt/emqx/bin $ emqx_ctl plugins load emqx_auth_mongo Load plugin emqx_auth_mongo error: parse_config_file_failed. /opt/emqx/bin $

That is the config of etc/plugins/emqx_auth_mongo.conf

auth.mongo.type = sharded
auth.mongo.server = xxx1:27017,xxx2:27017,xxx3:27017
auth.mongo.pool = 8
auth.mongo.login = emqx_users
auth.mongo.password = password
auth.mongo.auth_source = admin
auth.mongo.database = emqx_users
auth.mongo.query_timeout = 5s
auth.mongo.topology.pool_size = 1
auth.mongo.topology.max_overflow = 0
auth.mongo.auth_query.password_hash = sha256
auth.mongo.auth_query.collection = mqtt_user
auth.mongo.auth_query.password_field = password
auth.mongo.auth_query.selector = username=%u

Could you helm please?

Thanks!

k32 commented 2 years ago

I tested loading this exact file in emqx 4, and it was parsed fine. Text encoding error, perhaps? Have you edited this file on windows?

ctellechea2001 commented 2 years ago

Hi @k32 yes, It was an issue with the end spaces. Thanks a lots!