简体   繁体   中英

Ejabberd user auth failed with mysql

I have installed ejabberd in my local system with mysql using below reference link. i am using php for server side use.

https://medium.com/modern-sysadmin/how-to-install-ejabberd-18-01-xmpp-server-with-mysql-on-ubuntu-16-04-f0facededf2e

Everything is working fine.

i am using This PHP script https://github.com/cweiske/xmpphp/

But problem is when i add user from ejabberd web admin it works perfect to send messages. but when i add user directly in the mysql users table, both user save in users table same format same way, but when i send message using directly added user name its not working.

Getting below errors in terminal

09:49:48.239 [error] Supervisor ejabberd_c2s_sup had child undefined started with {ejabberd_c2s,start_link,undefined} at <0.2500.0> exit with reason no function clause matching base64:decode_binary(<<>>, <<"×mø">>, 57, 58) line 368 in context child_terminated

15:22:43.281 [error] CRASH REPORT Process <0.5360.0> with 0 neighbours exited with reason: no function clause matching base64:decode_binary(<<>>, <<"×mø">>, 57, 58) line 368 in p1_server:terminate/7 line 878

Help me how ejabberd works with mysql users? Ejabberd save users data any other place?

but when i add user directly in the mysql users table

I have two ideas so you can investigate your problem:

  • What if you create an account with plain ascii characters, for example "user123", instead of "×mø", does it work or fail?

  • What if you register the account using "ejabberctl register" command line, instead of inserting elements directly in the database, does it work or fail?

I suspect the problem is in the username or password encoding when inserted in the database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM