[newy] first start problems

Hi,

I want to try ejabberd XMPP server. As a matter of fact, I downloaded ejabberd-0.7.5.tar.gz and compiled erlang/OTP R10B4 (otp_src_R10B-4.tar.gz). Then, I followed all the installation steps:

  • configure: no pb
  • make: no pb
  • make install: no pb (directories and files created)

Then, I tried to start it without any success:

- erl -pa /var/lib/ejabberd/ebin -name ejabberd -s ejabberd (see the result below)
- erl -pa /var/lib/ejabberd/ebin -sname ejabberd -s ejabberd
- erl -pa /var/lib/ejabberd/ebin \
      -sname ejabberd \
      -s ejabberd \
      -ejabberd config \"/etc/ejabberd/ejabberd.cfg\" \
                log_path \"/var/log/ejabberd/ejabberd.log\" \
      -sasl sasl_error_logger \{file,\"/var/log/ejabberd/sasl.log\"\} \
      -mnesia dir \"/var/lib/ejabberd/spool\"

I suppose the server is not running properly since I cannot browse the admin console on http://localhost:5280/admin and my shell does not know ejabberdctl command. As I do not know anything about erlang, I do not know how to sort it out. I would appreciate if someone can tell me what is wrong with my installation process and how to make the server running. Moreover, I would like to install transport components on ejabberd, so if you could give me a "step by step" guide to perform all this aims (and perhaps uninstall the current installation before) and make it working properly, it would be great.

Regards, Seb

PS: I am working on Fedora Core 3

erl command result:

Erlang (BEAM) emulator version 5.4.5 [source] [hipe]

Eshell V5.4.5  (abort with ^G)
(ejabberd@pri.atchik)1>
=PROGRESS REPORT==== 18-Apr-2005::12:05:55 ===
          supervisor: {local,sasl_safe_sup}
             started: [{pid,<0.48.0>},
                       {name,alarm_handler},
                       {mfa,{alarm_handler,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

...

=PROGRESS REPORT==== 18-Apr-2005::12:05:56 ===
          supervisor: {local,ssl_sup}
             started: [{pid,<0.85.0>},
                       {name,ssl_broker_sup},
                       {mfa,{ssl_broker_sup,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,supervisor}]

=PROGRESS REPORT==== 18-Apr-2005::12:05:56 ===
         application: ssl
          started_at: 'ejabberd@pri.atchik'

=ERROR REPORT==== 18-Apr-2005::12:05:56 ===
E(<0.39.0>:ejabberd_config:58): Can't load config file "ejabberd.cfg": enoent

=CRASH REPORT==== 18-Apr-2005::12:05:56 ===
  crasher:
    pid: <0.38.0>
    registered_name: []
    error_info: "invalid return value from ejabberd_app:start(normal,[]) 
      -> {'EXIT',\"no such file or directory\"}"
    initial_call: {application_master,init,
                                     [<0.5.0>,
                                      <0.37.0>,
                                      {appl_data,
                                          ejabberd,
                                          [ejabberd,
                                           ejabberd_sup,
                                           ejabberd_auth,
                                           ejabberd_router,
                                           ejabberd_sm,
                                           ejabberd_s2s,
                                           ejabberd_local,
                                           ejabberd_listeners,
                                           ejabberd_iq_sup,
                                           ejabberd_service_sup,
                                           ejabberd_s2s_out_sup,
                                           ejabberd_s2s_in_sup,
                                           ejabberd_c2s_sup,
                                           ejabberd_mod_roster,
                                           ejabberd_mod_echo,
                                           ejabberd_mod_pubsub,
                                           ejabberd_mod_irc,
                                           ejabberd_mod_muc,
                                           ejabberd_offline,
                                           random_generator],
                                          undefined,
                                          {ejabberd_app,[]},
                                          [acl,
                                           configure,
                                           cyrsasl,
                                           cyrsasl_digest,
                                           cyrsasl_plain,
                                           ejabberd,
                                           ejabberd_app,
                                           ejabberd_auth,
                                           ejabberd_c2s,
                                           ejabberd_config,
                                           ejabberd_listener,
                                           ejabberd_logger_h,
                                           ejabberd_local,
                                           ejabberd_router,
                                           ejabberd_s2s,
                                           ejabberd_s2s_in,
                                           ejabberd_s2s_out,
                                           ejabberd_service,
                                           ejabberd_sm,
                                           ejabberd_sup,
                                           ejabberd_tmp_sup,
                                           gen_iq_handler,
                                           gen_mod,
                                           jd2ejd,
                                           jlib,
                                           mod_configure,
                                           mod_disco,
                                           mod_echo,
                                           mod_last,
                                           mod_offline,
                                           mod_private,
                                           mod_register,
                                           mod_roster,
                                           mod_stats,
                                           mod_time,
                                           mod_vcard,
                                           mod_version,
                                           randoms,
                                           sha,
                                           shaper,
                                           translate,
                                           xml,
                                           xml_stream],
                                          [],
                                          infinity,
                                          infinity},
                                      normal]}
    ancestors: [<0.37.0>]
    messages: [{'EXIT',<0.39.0>,normal}]
    links: [<0.37.0>,<0.5.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 987
    stack_size: 21
    reductions: 96
  neighbours:

=INFO REPORT==== 18-Apr-2005::12:05:57 ===
    application: ejabberd
    exited: "invalid return value from ejabberd_app:start(normal,[]) 
      -> {'EXIT',\"no such file or directory\"}"
    type: temporary

ejabberd.cfg does not exist

I tried to start it without any success

Only ERROR and CRASH REPORT are significant now. The key is here:

=ERROR REPORT==== 18-Apr-2005::12:05:56 ===
E(<0.39.0>:ejabberd_config:58): Can't load config file "ejabberd.cfg": enoent
The error is that ejabberd can't load the config file 'ejabberd.cfg'. And 'enoent' means that the file does not even exist.

You can use 'ejabberd.cfg.example' to create your config file. Don't forget to specify its full path to erlang, and make it readable by the user that will run ejabberd.

I would like to install transport components on ejabberd

I hope those tutorials are good enought :)

Still does not work...

Thanks for your help but I still cannot make it work...
I have a ejabberd.cfg file in /etc/ejabberd/ and directly in /var/lib/ejabberd/ but I always get the same ERROR report, even if I am logged as root with full rights on the files. So, is there another mistake I could have done?

thanks,
Seb

I have a ejabberd.cfg file in

I have a ejabberd.cfg file in /etc/ejabberd/ and directly in /var/lib/ejabberd/

If you do not specify the exact file with '-ejabberd config "/etc/ejabberd/ejabberd.cfg" ', ejabberd will look for ejabberd.cfg on the current directory, where the *.beam files are.

Solution...

If you pass the locale of the cfg file to the erl command as an argument it seems to work:
erl -pa /var/lib/ejabberd/ebin -sname ejabberd -s ejabberd -ejabberd config \"/etc/ejabberd/ejabberd.cfg\" log_path "/var/log/ejabberd/ejabberd.log\" -sasl sasl_error_logger \{file,\"/var/log/ejabberd/sasl.log\"\} -mnesia dir "/var/lib/ejabberd/spool\"

Or just copy the ejabberd.cfg from /etc/ejabberd to /var/lib/ejabberd

It works ;o)

Ok, I downloaded las ejabberd version 0.9 and I made a new installation that seems to work... but I still have a problem (I am a horrible newby, don't you think?): I cannot create a user account.
Indeed, I have not an access to the admin console since I have not created my admin account yet and ejabberdctl script does not work (see the error message below). I specified a username for admin in the ejabberd.cfg with {acl, admin, {user, "Admin"}}. but I am not able to create this account even if I use Psi (it does not know the server...).
So, how to make a first XMPP admin account on the ejabberd server?

Regards,
Seb

ejabberdctl's error message:
{"init terminating in do_boot",{undef,[{ejabberd_ctl,start,[]},{init,start_it,1},{init,start_em,1}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

copy the script to the beam directory

ejabberdctl script does not work: undef, [{ejabberd_ctl,start

The error reported by Erlang when running that script means it can't find the ejabberd *.beam files. Check these solutions:

  • Copy that script to the directory where ejabberd *.beam files are, and execute it from there.
  • Tell Erlang the directory where the ejabberd *.beam files are; add something like this to the script: -pa /var/lib/ejabberd/ebin

{acl, admin, {user, "Admin"}}

It's not relevant now, but better put it lowercase.

Psi (it does not know the server...)

Maybe the server name can't be resolved. Does 'ping servername' work?. Try setting the servername as 'localhost', it should work

nearly working...

Ok, ejabberd server and ejabberdctl work properly now.

But (there is always a "but" in my posts...), I cannot log in the admin console. I set {acl, admin, {user, "admin"}} and created a account for admin but I still get a "401 unauthorised". I restarted several times the server to make it take into account the admin settings but it does not work better... Any idea?

Moreover, I am wondering why my XMPP server on localhost only works with user@localhost JIDs and not with user@cpuName JIDs (cpuName is the name of my computer on the network) whereas all the application are able to make the translation and use both server name (i.e. localhost or cpuName). PDUs are routed on the same machine/interface, that is to say it should make no differences...

Regards,
Seb

webadmin: use the full JID

there is always a "but" in my posts

Yes, I noticed that :)

I still get a "401 unauthorised"

Possible errors when authenticating on the web admin:

  • 401 unauthorised: you did not specify an existing user, or a valid password. On ejabberd 0.9, the webadmin login user is the full JID: admin@localhost or admin@cpuname...
  • Not Allowed: you entered an existing user, but he has no privileges to view the page.

I am wondering why my XMPP server on localhost only works with user@localhost JIDs and not with user@cpuName JIDs

Set the host name in ejabberd.cfg to the Jabber server name: 'cpuname', or 'cpuname.org' or jabber.cpuname.org'..., not to 'localhost'. JIDs will be user@servername.

Great!!!

Ok, Really thank you for being so helpfull with such an awful newby ;o)
Now, every things seem to work properly. So, I am going to try XMPP and test what I can make with this platform...
See you next time I get a challenge in my XMPP quest ;o)

web admin

i run into problem when access http://localhost:5280/admin with result "not allow".

Can you access this url? if can, how to conf it?

Thanks

Syndicate content