How to debug extauth?

I moved my ejabberd to new server and found that my extauth script is no longer working. It starts, writes an entry into log file and... does nothing.
Code is guarded with massive try..except where all working code sits and should not be crashing at all.
Maybe ejabberd itself is killing it, but i don't know and that's why the question.

Also, i see «crash» message on every connection try:

** Reason for termination =
** {badarg,[{extauth,call_port,2},
            {ejabberd_auth_external,check_password_extauth,3},
            {ejabberd_auth,check_password_loop,2},
            {cyrsasl_plain,mech_step,2},
            {cyrsasl,server_step,2},
            {ejabberd_c2s,wait_for_feature_request,2},
            {p1_fsm,handle_msg,10},
            {proc_lib,init_p_do_apply,3}]}

Which «arg» is «bad» i honestly don't know because there's nothing in my script log and erlang dumps are so unhelpful ):

dp_wiz wrote: I moved my

dp_wiz wrote:

I moved my ejabberd to new server and found that my extauth script is no longer working. It starts, writes an entry into log file and... does nothing.
Maybe ejabberd itself is killing it

Remember that your extauth script must have an infinite loop.

dp_wiz wrote:

I moved my ejabberd to new server and found that my extauth script is no longer working. It starts, writes an entry into log file and... does nothing.
Also, i see «crash» message on every connection try:

** Reason for termination =
** {badarg,[{extauth,call_port,2},

Which «arg» is «bad» i honestly don't know because there's nothing in my script log and erlang dumps are so unhelpful ):

The bad argument problem is detected in the function call_port. That function tries to send an erlang message to the erlang process that is connected to your script. Apparently that process doesn't exist.

Simple example:

$ erl
Erlang R13B04 (erts-5.7.5) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]

Eshell V5.7.5  (abort with ^G)
1> self() ! hello.
hello
2> aei ! hello.
** exception error: bad argument
     in operator  !/2
        called as aei ! hello
Syndicate content