-
Hello community, I setup a fresh server with ejabberd installed from repo and edited However, if I try to register a user account with Example: root@xxx:# ejabberdctl register test123 server.****.chat password
Error: conflict: User test123@server.****.chat already registered I am not sure if the error code is correct and registration is somehow not working or just throwing a wrong indication and some other basic config is wrong. mod_register has been enabled. Thanks for advise! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
OS version? ejabberd version? Put your cleaned config on https://gist.github.com and post a link. |
Beta Was this translation helpful? Give feedback.
-
That error message is generated here: ejabberd/src/ejabberd_admin.erl Line 606 in 9a8a843 I installed pgsql docker image, ejabberd compiled from 22.05, configured similar to yours (at least hosts, all the sql and auth and db options, acl, access_rules and api_permissions). Registration using ejabberdctl worked for me. You can try using the erlang shell manually, with those erlang calls, maybe they show some clue about the problem:
|
Beta Was this translation helpful? Give feedback.
-
I found the issue...The SQL password contained a special character "%" and has not been quoted in the yml config. After putting the password quoted it works as expected and user is in the SQL table: User [email protected] successfully registered Therefore I guess during The resulting error message is misleading as there is obviously no user registered. The message should contain a hint that SQL connection is broken if my assumption is correct. Please confirm and advise. |
Beta Was this translation helpful? Give feedback.
-
Seems to be right, i would always suggest to check ejabberd logs in cases like this, there quite often is more information that is displayed to user. Do you have just one auth mechanism enabled in your config? I think try_register should be able to show db_error when that happens, but maybe you have other auth mechanins enabled that could mask it? |
Beta Was this translation helpful? Give feedback.
I found the issue...The SQL password contained a special character "%" and has not been quoted in the yml config. After putting the password quoted it works as expected and user is in the SQL table:
Therefore I guess during
ejabberdctl register
command the SQL connection could not be made as it was escaped due to the % in the password.The resulting error message is misleading as there is obviously no user registered. The message should contain a hint that SQL connection is broken if my assumption is correct.
Please confirm and advise.