[ejabberd] Ejabberd 'module could not be loaded', httpc, request,

Konstantin Khomoutov flatworm at users.sourceforge.net
Thu Dec 23 16:24:11 MSK 2010


On Wed, 22 Dec 2010 19:26:02 -0800
Aron Sogor <bigman at gmail.com> wrote:

>I am trying to make an external connection in an auth module and I get
>an error:
>
>** Reason for termination =
>** {'module could not be loaded',
>       [{httpc,request,
>            ["http://www.alpha.pogospike.com/ejabberd/validateTokenAndPogoId/e4d7e947-6af5-4fe6-a2b8-bfbb5d07ec19/16501457"]},
>        {genius_validator,login,3},
>        {ejabberd_auth_genius,handle_login,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}]}
>
>
>
>This is on Ubuntu running R13.
>
>I run the same on MacPort R14 no problem.
>
>I check on Ubuntu:
>/usr/lib/erlang/erts-5.7.2
>/usr/lib/erlang/lib/inets-5.1/ebin/httpc_request.beam
>
>soo the module seems to be there.. it is a different version of
>runtime. is there some lib searchpath I am missing?

I cannot google up anything about ejabberd_auth_genius except your
message, so it appears to be the module you're developing.
So until we see the code of genius_validator:login/3, it's impossible
to do further guessing.

Just one idea: Erlang is packaged for Debian (and pulled by Ubuntu from
there) as a set of many small packages (with the "erlang" being the
meta-package which installs everything else), and ejabberd depends only
on a minimal set of packages needed to run that server; hence if your
Erlang packages were pulled as a result of doing `aptitude install
ejabberd` or the equivalent, it's no surprise something's amiss
compared to your Mac install which presumably has every bit or Erlang
runtime installed.

On the other hand, a no-brainer code involving httpc:request/1 appears
to work for me in my Debian Sid chroot which has just the minimal Erlang
install required by ejabberd:

% erl
Erlang R14A (erts-5.8) [source] [rq:1] [async-threads:0]
[kernel-poll:false]

Eshell V5.8  (abort with ^G)
1> inets:start(permanent).
ok
2> httpc:request("http://localhost").
{ok,{{"HTTP/1.1",200,"OK"},
     [{"connection","Keep-Alive"},
      {"date","Thu, 23 Dec 2010 13:19:29 GMT"},
      {"server",
       "Apache/2.2.9 (Debian) PHP/4.4.4-8+etch6 mod_perl/2.0.4
Perl/v5.10.0"}, {"content-length","1868"},
      {"content-type","text/html;charset=UTF-8"},
      {"keep-alive","timeout=15, max=100"}],
     "<!DOCTYPE HTML PUBLIC ...

And the list of installed Erlang packages:

% aptitude search -F %p '~i~nerlang*'
erlang-asn1
erlang-base
erlang-crypto
erlang-dev
erlang-inets
erlang-mnesia
erlang-odbc
erlang-parsetools
erlang-public-key
erlang-runtime-tools
erlang-ssl
erlang-syntax-tools


More information about the ejabberd mailing list