2.1.3 invalid host error on OpenBSD 4.8 x64 (newbie)

Greetings,

I've installed 2.1.3 through Open BSD's pkg_add and it came with a bunch of extra modules, default config etc... It oughta just work, but i get this error when starting it:

# ejabberdctl start
# ejabberdctl       
The node ejabberd@obsd6448 is started with status: started
ejabberd is not running in that node
Check for error messages: /var/log/ejabberd/ejabberd.log
or other files in that directory.

Error in ejabberd ctl process: 'error' badarg

...

=ERROR REPORT==== 2011-01-29 12:33:23 ===
E(<0.35.0>:ejabberd_config:164) : Can't load config file: invalid host name [49]

=INFO REPORT==== 2011-01-29 12:33:23 ===
    application: ejabberd
    exited: {bad_return,{{ejabberd_app,start,[normal,[]]},
                         {'EXIT',"invalid hostname"}}}
    type: temporary

I've tried the solution in [1], but it doesn't seem to work:

# erl 
Erlang (BEAM) emulator version 5.6.5 [source] [64-bit] [async-threads:0] [kernel-poll:false]

Eshell V5.6.5  (abort with ^G)
1> stringrep:start().
** exception error: undefined function stringrep:start/0

I have all the .beam in /usr/local/lib/ejabberd/ebin/ including:

stringprep.beam
stringprep_sup.beam

and the .so in /usr/local/lib/ejabberd/priv/lib

stringprep_drv.so

I've also ln-ed the .so so that it would be in ebin, mas it doesn't work either. There's nothing wrong with the host (a regular sub.domain.com) and i even stripped down the .cfg to a bare minimum. I assumed the BSD package came well configured and installed all dependencies, but i'm most likely missing something. My erlang knowledge is 0.

I can't find that many useful resources through search engines. The README has general installation stuff. Any suggestions?

TIA,
Nuno Magalhães

[1] http://www.ejabberd.im/node/4309

vesperto wrote: =ERROR

vesperto wrote:
=ERROR REPORT==== 2011-01-29 12:33:23 ===
E(<0.35.0>:ejabberd_config:164) : Can't load config file: invalid host name [49]

=INFO REPORT==== 2011-01-29 12:33:23 ===
    application: ejabberd
    exited: {bad_return,{{ejabberd_app,start,[normal,[]]},
                         {'EXIT',"invalid hostname"}}}
    type: temporary

You modified ejabberd.cfg and put some strange content. See what happens if I put
{hosts, ["local@host"]}.

=ERROR REPORT==== 2-Feb-2011::11:09:38 ===
E(<0.39.0>:ejabberd_config:164) : Can't load config file: invalid host name ["local@host"]

=CRASH REPORT==== 2-Feb-2011::11:09:38 ===
  crasher:
    initial call: application_master:init/4
    pid: <0.38.0>
    registered_name: []
    exception exit: {bad_return,{{ejabberd_app,start,[normal,[]]},
                                 {'EXIT',"invalid hostname"}}}
      in function  application_master:init/4
    ancestors: [<0.37.0>]
    messages: [{'EXIT',<0.39.0>,normal}]
    links: [<0.37.0>,<0.6.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 610
    stack_size: 24
    reductions: 134
  neighbours:

=INFO REPORT==== 2-Feb-2011::11:09:38 ===
    application: ejabberd
    exited: {bad_return,{{ejabberd_app,start,[normal,[]]},
                         {'EXIT',"invalid hostname"}}}
    type: temporary
vesperto wrote:
# erl 
Erlang (BEAM) emulator version 5.6.5 [source] [64-bit] [async-threads:0] [kernel-poll:false]

Eshell V5.6.5  (abort with ^G)
1> stringrep:start().
** exception error: undefined function stringrep:start/0

Remember the middle P: stringPrep

I've stripped my .cfg[1] from

I've stripped my .cfg[1] from comments and extra stuff.

My bad about the p. Still:

# erl
Erlang (BEAM) emulator version 5.6.5 [source] [64-bit] [async-threads:0] [kernel-poll:false]

Eshell V5.6.5 (abort with ^G)
1> stringPrep:start().
** exception error: undefined function stringPrep:start/0
2> stringprep:start().
** exception error: undefined function stringprep:start/0
3> q().
ok
4> #

As for the server, i use this string:
{hosts, "test.domain.com"}.

# ejabberdctl start
# ejabberdctl
The node ejabberd@obsd6448 is started with status: started
ejabberd is not running in that node
Check for error messages: /var/log/ejabberd/ejabberd.log
or other files in that directory.

Error in ejabberd ctl process: 'error' badarg

...

# cat /var/log/ejabberd/ejabberd.log
...
=ERROR REPORT==== 2011-02-02 22:06:02 ===
E(<0.35.0>:ejabberd_config:164) : Can't load config file: invalid host name [116]

=INFO REPORT==== 2011-02-02 22:06:02 ===
application: ejabberd
exited: {bad_return,{{ejabberd_app,start,[normal,[]]},
{'EXIT',"invalid hostname"}}}
type: temporary

I've also tried with.
# ejabberdctl start --config /etc/ejabberd/ejabberd.cfg, same results.

I previously tested with "localhost", gave me 49, now it gives me 116. I've neither defined "49" nor "116" as the host. I've also tried with ip adresses, my guess is i'm missing some Erlang lib.

I have these installed:
ejabberd-2.1.3
erlang-12b.5

The package states this:
@depend converters/libiconv:libiconv-*:libiconv-1.13p1
@depend lang/erlang:erlang->=12b.0:erlang-12b.5
@wantlib crypto.18.0
@wantlib expat.9.0
@wantlib iconv.6.0
@wantlib ssl.15.1
@wantlib z.4.1

I have both dependencies, but none of the recommended. It shouldn't prevent the server from starting, tough, right?

[1] http://pastebin.com/5NbAXMtW

1/2 SOLVED

I'm kinda glad my previous, lengthly, documented post didn't quite make it. I've maanged to solve it in the meantime. Newbie error (i'm sure you're surprised).

I still get the erl error:

# erl
Erlang (BEAM) emulator version 5.6.5 [source] [64-bit] [async-threads:0] [kernel-poll:false]

Eshell V5.6.5 (abort with ^G)
1> stringPrep:start().
** exception error: undefined function stringPrep:start/0
2> stringprep:start().
** exception error: undefined function stringprep:start/0
3> q().
ok
4> #

As for the server, i had:

{hosts, "test.domain.com"}.

instead of:

{hosts,["test.domain.com"]}.

I assumed for a single host the [] wasn't necessary, but i was wrong[1].

Thanks for the reply :)

[1] http://www.process-one.net/docs/ejabberd/guide_en.html#htoc21

Another clarification

Just for completion, let's clarify also this problem:

vesperto wrote:

I still get the erl error:

# erl
Erlang (BEAM) emulator version 5.6.5 [source] [64-bit] [async-threads:0] [kernel-poll:false]

Eshell V5.6.5 (abort with ^G)
1> stringPrep:start().
** exception error: undefined function stringPrep:start/0
2> stringprep:start().
** exception error: undefined function stringprep:start/0
3> q().
ok
4> #

In my previous comment I was running erl inside ejabberd/src with all the *.beam and *.so binaries.

This is a more reproducible example:

$ cd /tmp
/tmp

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

Eshell V5.8.2  (abort with ^G)
1> stringprep:start().
** exception error: undefined function stringprep:start/0
2> q().
ok

$ erl -pa /lib/ejabberd/ebin
Erlang R14B01 (erts-5.8.2) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]

Eshell V5.8.2  (abort with ^G)
1> stringprep:start().
{ok,<0.36.0>}
2> q().
ok
Syndicate content