Ejabberd: Unable to start - Crash in ejabberd_auth_mnesia

Created on 10 Dec 2020  路  10Comments  路  Source: processone/ejabberd

Environment

  • ejabberd version: HEAD(e048bc671222cd0206de6fb27fd31297df240b02)
  • Erlang version: Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.7 / self-compiled Erlang 22.3
  • OS: CentOS 6
  • Installed from: source

Configuration

https://gist.github.com/licaon-kter/df2af81dbd341837999a38502de79b89

Errors from error.log/crash.log

https://gist.github.com/licaon-kter/7cd16e8e1074aca25a51f97426d2dbff

Adding auth_scram_hash: sha does not help.

Bug Authentication

All 10 comments

@prefiks git bisect says

1dc0ecd1e98e88617d1f1e05563012330aab4a27 is the first bad commit
commit 1dc0ecd1e98e88617d1f1e05563012330aab4a27
Author: Pawe艂 Chmielowski <[email protected]>
Date:   Tue Dec 8 12:06:52 2020 +0100

    Allow to use different hash for storing scram passwords

:100644 100644 61748af56ff94b0ab539fb843d7018077dda745a c464de277036b9a536d870105da92c19d540f46e M      rebar.config
:040000 040000 5ff1a52cff138401e9c8d0dec4ae2b96cacd7f20 a85aed258c9c03ccb32161b76cbfc3c3587649f5 M      src

Spoke too soon, 0c09599d7bc2d9a2ec06da04dc641a8250f56beb will start, but crash on login: https://gist.github.com/licaon-kter/dd98246a58f4b31d8e0cbecefd7e7429

/LE: of course 0371b0f66471c9d340e7a9d8ad96cbfc0def66ed is the winner :)

8214a4fa794855ba6cb91b1b83fa66b6608f1074 still fails to start, log: https://gist.github.com/licaon-kter/02d39c7a1e238e3bbb5f11462ad47487 :(

@licaon-kter Would you be able to start ejabberd debug console on that server (ejabberdctl debug), and see what ejabberd_auth:get_password(<<"YOUR_USERNAME">>, <<"YOUR_SERVER">>). returns? You can replace actual data text in that with xxx or something, i would just like to look how that struct looks in general.

It doesn't look like it's issue with previous scram record format (at least conversion that i added seems to be working correctly here), but maybe there was even older format?

@prefiks

Would you be able to start ejabberd debug console on that server

You mean on the old working version at 02cc212f160c45cb119e44438198f4b78344e2d0 ? Sure:

{scram,<<"vGAitxxxxxxxxxxxxxxxxxxxxxxxx">>,
       <<"Zh9vXSjxxxxxxxxxxxxxxxxxxxxxxxxx">>,
       <<"hifZxxxxxxxxxxxxxxxxxxxxxxxxxxx">>,4096}

No joy with 7da81249f8e33e019b2b18b464091f9efef8a30c either

Ok, you aren't able to start ejabberd with that never version? Still getting error in ejabberd_auth_mnesia:need_transform?

See new log above for the PLuS commit.

Thanks, I commited some changes to auth_mnesia, which could help, can you give it a try?

Yup, fixed now. Thanks

@licaon-kter, @prefiks: Good job!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ThomasLeister picture ThomasLeister  路  4Comments

ForGuru picture ForGuru  路  4Comments

Vshnv picture Vshnv  路  4Comments

shazvan275 picture shazvan275  路  3Comments

andrew-vant picture andrew-vant  路  4Comments