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

Konstantin Khomoutov flatworm at users.sourceforge.net
Thu Dec 23 19:44:34 MSK 2010


On Thu, 23 Dec 2010 07:55:06 -0800
Aron Sogor <bigman at gmail.com> wrote:

> You running: Erlang R14A (erts-5.8)
> I had the problem with:  erts-5.7.2
> 
> Once I downloaded the Erlang tarball and compiled an R14A, I was fine
> too.
> 
> R13: has inets-5.1 ... R14 is much like 5.5 or something(so least not
> the same version)
> /usr/lib/erlang/lib/inets-5.1/ebin/httpc_request.beam
> 
> Per my module you right, it is something I made for our app, pretty
> useless for anyone else, so I post the snipet:
> 
> login(Server,User,Passwd) ->
>     Url = string:join
> (["http://",Server,"/ejabberd/validateTokenAndPogoId/", Passwd ,"/" ,
> User], ""), {Resp, Result} = httpc:request(Url),
> 	response_handle(Resp, Result,?GENIUS_AUTH_OK,?
> GENIUS_AUTH_REJECTED).
> 
> Can you help me identify that R13 inets supports: httpc:request(Url)?
I posted a sample interactive session involving the Erlang shell (which
is always available if you have any Erlang package installed) to
demonstrate that how httpc:request/1 works -- what's the problem with
trying it out (verbatim) using your version of Erlang/OTP?

> where would I find the docs for the 5.1 version?
The tarball should come with the docs. Or at least they are
downloadable from erlang.org for any available Erlang/OTP release.

> Is there a way to look at the beam file:
> /usr/lib/erlang/lib/inets-5.1/ebin/httpc_request.beam
> some way to inspect the symbol? decompile? confirm it has
> request(String) support?
Yes, but it's not particularly straightforward, so I can't recall it
off the top of my head. On the other hand, my example mentioned above
does exactly this -- autoloads the module and tries to execute a
function from it.

> It seems to relate to the version because simply switching the erl
> executable in the ejabberctl make the above work.
> 
> Along the same notes is there a way to tell what version of Ubuntu I
> am using? uname-a >> does not tell me anything
$ sudo aptitude install lsb-release
$ lsb_release -a
is one way (working on any contemporary Linux system).

> And is there a way to force to fetch erlang from a later release?
There's no simple way to do this, short of building it from the
source package fetched from a later Ubuntu release.

> Clearly you got R14 on debian from somewhere... I would like it too :)
I maintain ejabberd in Debian so I have a sandbox with the unstable
Debian snapshot (which has the latest possible release of Erlang for
the obvious reasons).

> ATM I compiled from source.
> 
> I know many questions... any answer much appreciated.
I think you're better off investigating why it's not working with R13
using simple tests rather than trying to modify your system.

P.S.
Please don't top-post.


More information about the ejabberd mailing list