0

I setted up ejabberd server on localhost and now can access admin panel on localhost:5280/admin

In pidgin I fill following values:

username: root
password: password
host: localhost
resource: 5280  

and checking "Create this new account on the server"

There is my mod_register at /etc/ejabberd/ejabberd.cfg

{mod_register, [
              %%
              %% After successful registration, the user receives
              %% a message with this subject and body.
              %%
              {welcome_message, {"Welcome!",
                                 "Welcome to a Jabber service powered by De$
                                 "For information about Jabber visit "
                                 "http://www.jabber.org"}},
              %% Replace it with 'none' if you don't want to send such mess$
              %%{welcome_message, none},

              %%
              %% When a user registers, send a notification to
              %% these Jabber accounts.
              %%
              %%{registration_watchers, ["admin1@example.org"]},
              {access, register, [{allow, all}]}
             ]},

When i try to register user pidgin says Error 503: Service unavailable

Where I wrong?

UPD

Pidgin logs:

(14:13:30) connection: Activating keepalive.
(14:13:31) jabber: Sending (ssl) (zuber@localhost/5280): <iq type='set' id='purple28d4cf' to='localhost'><query xmlns='jabber:iq:register'><username>zuber</username><password>123456</password></query></iq>
(14:13:31) jabber: Recv (ssl)(163): <iq from='localhost' id='purple28d4cf' type='error'><error code='503' type='cancel'><service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
(14:13:31) account: Disconnecting account zuber@localhost/5280 (0x7f06e57042b0)
(14:13:31) connection: Disconnecting connection 0x7f06e5606e30
(14:13:31) connection: Deactivating keepalive.

Ejabberd logs:

=ERROR REPORT==== 2016-03-08 14:13:31 ===
E(<0.397.0>:ejabberd_hooks:335) : {{case_clause,
                                    {value,{access,register,[{allow,all}]}}},
                                   [{gen_mod,get_opt,3,
                                     [{file,"gen_mod.erl"},{line,154}]},
                                    {mod_register,process_iq,4,
                                     [{file,"mod_register.erl"},{line,109}]},
                                    {mod_register,
                                     unauthenticated_iq_register,4,
                                     [{file,"mod_register.erl"},{line,78}]},
                                    {ejabberd_hooks,run_fold1,4,
                                     [{file,"ejabberd_hooks.erl"},{line,331}]},
                                    {ejabberd_c2s,
                                     process_unauthenticated_stanza,2,
                                     [{file,"ejabberd_c2s.erl"},{line,2179}]},
                                    {ejabberd_c2s,wait_for_feature_request,2,
                                     [{file,"ejabberd_c2s.erl"},{line,731}]},
                                    {p1_fsm,handle_msg,10,
                                     [{file,"p1_fsm.erl"},{line,544}]},
                                    {proc_lib,init_p_do_apply,3,
                                     [{file,"proc_lib.erl"},{line,239}]}]}
running hook: {c2s_unauthenticated_iq,
                  ["localhost",
                   {iq,"purple28d4cf",set,"jabber:iq:register",[],
                       {xmlelement,"query",
                           [{"xmlns","jabber:iq:register"}],
                           [{xmlelement,"username",[],
                                [{xmlcdata,<<"zuber">>}]},
                            {xmlelement,"password",[],
                                [{xmlcdata,<<"123456">>}]}]}},
                   {{127,0,0,1},57138}]}
  • What do your server logs say about the 503 error ? – user9517 Mar 8 '16 at 8:06
  • where logs are storing? – Vassily Mar 8 '16 at 8:09
  • I have no idea, you don't even say what OS you are using. Please, don't respond with the OS and expect us to tell you where the logs are, figure it out yourself. – user9517 Mar 8 '16 at 8:14
  • Question updated. Logs are added to the end of post. – Vassily Mar 8 '16 at 8:16
0

I setted up ejabberd by other tutorial and all starts to work.

sudo apt-get install ejabberd

at /etc/ejabberd/ejabberd.cfg:

  1. uncomment line

    override_local

  2. in mod_register config:

    %% Admin user {acl, admin, {user, "admin", "localhost"}}.

    %% Hostname {hosts, ["localhost"]}.

  3. in ACCESS RULES section:

    {access, register, [{allow, all}]}.

  4. restart server:

    sudo service ejabberd restart

| improve this answer | |
  • There is no /etc/ejabberd directory – Paul Aug 4 '17 at 20:02
  • 1
    @Paul if you installed with apt-get package manager it creates /etc/ejabberd directory. If you installed with downloading deb file the config directory is /opt/ejabbed.conf. – digz6666 Jan 31 '18 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.