-
Notifications
You must be signed in to change notification settings - Fork 30
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
can't load the emq_auth_pgsql when the db user is NOT "root" #61
Comments
I am using version 2.3.11 and I cant autenticate with database user emq. Log here: webadmin@bagre:~$ sudo emqttd_ctl plugins load emq_auth_pgsql |
Same problem. The plugin always uses the name "root", regardless of the "auth.pgsql.username" setting. 100% reproducible. Why is the issue closed? |
After a simple check, it turned out that all settings except "auth.pgsql.password" are ignored. |
Reproduced on emqx installed from the package for Ubuntu 16.04. On emqx built manually, all parameters are used normally. |
Hi, @eisaev Thanks a lot for your effort. We will try to reproduce it later |
Hi, /opt/emqx/bin $ emqx_ctl plugins load emqx_auth_pgsql Thank you. |
同样的问题,怎么办?已经在postgresql中创建了root超级用户,也不行,不论怎么弄,就是不行 emqx_ctl plugins load emqx_auth_pgsql提示如下: |
@HJianBo @agenteDserrano @seth-yang @eisaev @ALL , Can you help me? |
@leqii-com I don't use pre-built packages and have switched to using a manually built emqx. |
Any fix for this please? |
OS: CentOS 6.8 x86_64
EMQTTD: 2.2
my emq_auth_pgsql.conf list below:
## Postgre Server: 5432, 127.0.0.1:5432, localhost:5432
auth.pgsql.server = 127.0.0.1:5432
auth.pgsql.pool = 8
auth.pgsql.username = mqtt
auth.pgsql.password = mqtt
auth.pgsql.database = mqtt
auth.pgsql.encoding = utf8
auth.pgsql.ssl = false
and i try to load the plugin:
$ emqttd_ctl plugins load emq_auth_pgsql
load plugin error: {emq_auth_pgsql,
{bad_return,
{{emq_auth_pgsql_app,start,[normal,[]]},
{'EXIT',
{{badmatch,
{error,
{shutdown,
{failed_to_start_child,emq_auth_pgsql,
{shutdown,
{failed_to_start_child,worker_sup,
{shutdown,
{failed_to_start_child,
{worker,1},
{error,fatal,<<"28000">>,
invalid_authorization_specification,
<<"role "root" does not exist">>,
[{file,<<"miscinit.c">>},
{line,<<"494">>},
{routine,
<<"InitializeSessionUserId">>}]}}}}}}}}},
[{emq_auth_pgsql_app,start,2,
[{file,"src/emq_auth_pgsql_app.erl"},{line,33}]},
{application_master,start_it_old,4,
[{file,"application_master.erl"},{line,273}]}]}}}}}
when i check the crash.log, i found this message:
i create the user named 'root' in the pg db, and reload the plug, it WORKS!!!
createuser -sP root
emqttd_ctl plugins load emq_auth_pgsql
it does NOT use the conf entry 'auth.pgsql.username'?
The text was updated successfully, but these errors were encountered: