Strange problems (maybe bad config?)

Hello. I have a problems getting ejabberd up and running correctly.

root@misfortune> /etc/init.d/ejabberd start
Starting jabber server: ejabberd.

Looks like all is good, but...

root@misfortune> ejabberdctl status
Node ejabberd@localhost is started. Status: started
ejabberd is not running

When trying to register user:

root@misfortune> ejabberdctl register user misfortune pass
RPC failed on the node ejabberd@localhost: {'EXIT',
                                               {badarg,
                                                   [{erlang,
                                                        port_control,
                                                        [stringprep_port,
                                                         1,
                                                         "misfortune"]},
                                                    {stringprep,control,2},
                                                    {jlib,nameprep,1},
                                                    {ejabberd_auth,
                                                        auth_modules,
                                                        1},
                                                    {ejabberd_auth,
                                                        is_user_exists,
                                                        2},
                                                    {ejabberd_auth,
                                                        try_register,
                                                        3},
                                                    {ejabberd_ctl,process,1},
                                                    {rpc,
                                                        '-handle_call/3-fun-0-',
                                                        5}]}}

However, ejabberd is active on 5280 port, but inactive on 5222...

Some lines from config:

{acl, admin, {user, "user" }}.
...
{host,                  "misfortune"}.
...
{listen, [{5222, ejabberd_c2s,
                      [{access,   c2s},
                       {shaper,   c2s_shaper}]},
          {5223, ejabberd_c2s,
                      [{access,   c2s},
                       {shaper,   c2s_shaper},
                       {ssl,    [{certfile, "/etc/ejabberd/ejabberd.pem"}]}]},
          {5269, ejabberd_s2s_in,
                      [{shaper,   s2s_shaper}]}]}.

I just don't know where to dig.
Thanks in advance.

Check logs when starting ejabberd

Hello. I have a problems getting ejabberd up and running correctly.
...

root@misfortune> ejabberdctl status
Node ejabberd@localhost is started. Status: started
ejabberd is not running

...
ejabberd is ... inactive on 5222...

Did you check ejabberd.log and sasl.log immediately after starting ejabberd?

Some lines from config:
{acl, admin, {user, "user" }}.

That ACL grants admin privileges to any account named "user@*"!! You should put something like:

{acl, admin, {user, "user", "misfortune"}}.

With that ACL only "user@misfortune will have admin privileges.

Once your server works correctly, remember to enter in the Web Admin and delete the stored old ACLs that you don't want.

Same

badlop wrote:

Did you check ejabberd.log and sasl.log immediately after starting ejabberd?

Yes, there is nothing in them, just old crash reports. Nothing about current start.

Quote:

With that ACL only "user@misfortune will have admin privileges.

Fixed, thanks.

Quote:

Once your server works correctly, remember to enter in the Web Admin and delete the stored old ACLs that you don't want.

The problem is I cannot enter in the Web Admin. I cannot create new user from the terminal nor from jabber client. Ahd what is that meaning:

root@misfortune> ejabberdctl status
Node ejabberd@localhost is started. Status: started
ejabberd is not running

Not started correctly; some error message would help

clayman wrote:

And what is that meaning:

root@misfortune> ejabberdctl status
Node ejabberd@localhost is started. Status: started
ejabberd is not running

That means the Erlang node called "ejabberd@localhost" is started correctly. Inside that node (it's like a virtual machine), the ejabberd application is NOT running.

This means ejabberd did not crash, but it didn't start correctly. The problem is usually a syntax mistke in ejabberd.cfg, badly corrupted Mnesia database, or unable to load some important ejabberd or erlang library. I think in all those cases some kind of ERROR REPORT or similar is shown in ejabberd.log or sasl.log

If ejabberd is started correctly, you should see in sasl.log a lot of PROGRESS REPORT, and finally something like this:

=PROGRESS REPORT==== 13-Sep-2008::01:25:04 ===
         application: ejabberd
          started_at: ejabberd@atenea
Syndicate content