ejabberd won't start

Hello!

I'm trying to set up a ejabberd on my Debian Sarge server with kernel 2.6.8. I've got precompiled debs from

http://sgolovan.nes.ru/jabber/

and installed the package ejabberd. The installation was ok, but when I try to start the server it fails. Here's the output on the terminal

Quote:

# /etc/init.d/ejabberd start
Starting jabber server: ejabberd
Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})

and here is the erl_crash.dump
http://people.freenet.de/christophlangner/erl_crash.dump

Thanks for your help :)
Christoph

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

The problem was the hostname

In my case, the problema was that I had only a short hostname in /etc/hostname, I changed it from "myhost" to "myhost.mydomain.tld", restarted hostname service and then everything works great.

Try to run:

Try to run:

erl
erl -sname qqq
erl -name qqq

And tell if there will be some errors and crashes.

Please, report also versions of erlang related packages and ejabberd.

Ok, here are the results.

Ok, here are the results. Looks like a problem with erlang and not with ejabberd. BTW, using ejabberd 1.1.1 and Erlang 5.4.13 here. Sorry for the long lines, i tried to avoid even longer ones by inserting some line breaks.

This works:

Quote:

# erl
Erlang (BEAM) emulator version 5.4.13 [source] [threads:0] [kernel-poll]

Eshell V5.4.13 (abort with ^G)
1>
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
(v)ersion (k)ill (D)b-tables (d)istribution

This fails:

Quote:

# erl -sname qqq
{error_logger,{{2006,6,6},{12,24,17}},'Protocol: ~p: register error: ~p~n',[inet_tcp,{{badmatch,{error,no_reg_reply_from_epmd}},
[{inet_tcp_dist,listen,1},{net_kernel,start_protos,4},{net_kernel,start_protos,3},{net_kernel,init_node,2},{net_kernel,init,1},
{gen_server,init_it,6},{proc_lib,init_p,5}]}]}

{error_logger,{{2006,6,6},{12,24,17}},crash_report,[[{pid,<0.19.0>},{registered_name,net_kernel},{error_info,{error,badarg}},
{initial_call,{gen,init_it,[gen_server,<0.16.0>,<0.16.0>,{local,net_kernel},net_kernel,{qqq,shortnames,15000},[]]}},
{ancestors,[net_sup,kernel_sup,<0.8.0>]},{messages,[]},{links,[#Port<0.11>,<0.16.0>]},{dictionary,[{longnames,false}]},
{trap_exit,true},{status,running},{heap_size,610},{stack_size,21},{reductions,373}],[]]}

{error_logger,{{2006,6,6},{12,24,17}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},
{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfa,{net_kernel,start_link,[[qqq,shortnames]]}},
{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}

{error_logger,{{2006,6,6},{12,24,17}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},
{reason,shutdown},{offender,[{pid,undefined},{name,net_sup},{mfa,{erl_distribution,start_link,[]}},{restart_type,permanent},
{shutdown,infinity},{child_type,supervisor}]}]}

{error_logger,{{2006,6,6},{12,24,17}},crash_report,[[{pid,<0.7.0>},{registered_name,[]},{error_info,{shutdown,{kernel,start,[normal,[]]}}},
{initial_call,{application_master,init,[<0.5.0>,<0.6.0>,{appl_data,kernel,[application_controller,erl_reply,auth,boot_server,
code_server,disk_log_server,disk_log_sup,erl_prim_loader,error_logger,file_server,file_server_2,fixtable_server,global_group,
global_name_server,heart,init,kernel_config,kernel_sup,net_kernel,net_sup,rex,user,os_server,ddll_server,erl_epmd,inet_db,pg2],
undefined,{kernel,[]},[application,application_controller,application_master,application_starter,auth,code,code_aux,packages,
code_server,dist_util,erl_boot_server,erl_distribution,erl_prim_loader,erl_reply,erlang,error_handler,error_logger,file,file_server,
old_file_server,file_io_server,prim_file,global,global_group,global_search,group,heart,inet6_tcp,inet6_tcp_dist,inet6_udp,
inet_config,inet_hosts,inet_gethost_native,inet_tcp_dist,init,kernel,kernel_config,net,net_adm,net_kernel,os,ram_file,rpc,
user,user_drv,user_sup,disk_log,disk_log_1,disk_log_server,disk_log_sup,dist_ac,erl_ddll,erl_epmd,erts_debug,gen_tcp,gen_udp,
prim_inet,inet,inet_db,inet_dns,inet_parse,inet_res,inet_tcp,inet_udp,pg2,seq_trace,wrap_log_reader,zlib,otp_ring0],[],infinity,infinity},
normal]}},{ancestors,[<0.6.0>]},{messages,[{'EXIT',<0.8.0>,normal}]},{links,[<0.6.0>,<0.5.0>]},{dictionary,[]},{trap_exit,true},
{status,running},{heap_size,987},{stack_size,21},{reductions,1062}],[]]}

{error_logger,{{2006,6,6},{12,24,17}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})

And this also:

Quote:

erl -name qqq
{error_logger,{{2006,6,6},{12,24,50}},'Protocol: ~p: register error: ~p~n',[inet_tcp,{{badmatch,{error,duplicate_name}},
[{inet_tcp_dist,listen,1},{net_kernel,start_protos,4},{net_kernel,start_protos,3},{net_kernel,init_node,2},{net_kernel,init,1},
{gen_server,init_it,6},{proc_lib,init_p,5}]}]}

{error_logger,{{2006,6,6},{12,24,50}},crash_report,[[{pid,<0.19.0>},{registered_name,net_kernel},{error_info,{error,badarg}},
{initial_call,{gen,init_it,[gen_server,<0.16.0>,<0.16.0>,{local,net_kernel},net_kernel,{qqq,longnames,15000},[]]}},
{ancestors,[net_sup,kernel_sup,<0.8.0>]},{messages,[]},{links,[#Port<0.7>,<0.16.0>]},{dictionary,[{longnames,true}]},{trap_exit,true},
{status,running},{heap_size,377},{stack_size,21},{reductions,386}],[]]}

{error_logger,{{2006,6,6},{12,24,50}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},
{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfa,{net_kernel,start_link,[[qqq,longnames]]}},
{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}

{error_logger,{{2006,6,6},{12,24,50}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,shutdown},
{offender,[{pid,undefined},{name,net_sup},{mfa,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},
{child_type,supervisor}]}]}

{error_logger,{{2006,6,6},{12,24,50}},crash_report,[[{pid,<0.7.0>},{registered_name,[]},{error_info,{shutdown,{kernel,start,[normal,[]]}}},
{initial_call,{application_master,init,[<0.5.0>,<0.6.0>,{appl_data,kernel,[application_controller,erl_reply,auth,boot_server,
code_server,disk_log_server,disk_log_sup,erl_prim_loader,error_logger,file_server,file_server_2,fixtable_server,global_group,
global_name_server,heart,init,kernel_config,kernel_sup,net_kernel,net_sup,rex,user,os_server,ddll_server,erl_epmd,inet_db,pg2],
undefined,{kernel,[]},[application,application_controller,application_master,application_starter,auth,code,code_aux,packages,code_server,
dist_util,erl_boot_server,erl_distribution,erl_prim_loader,erl_reply,erlang,error_handler,error_logger,file,file_server,old_file_server,
file_io_server,prim_file,global,global_group,global_search,group,heart,inet6_tcp,inet6_tcp_dist,inet6_udp,inet_config,inet_hosts,
inet_gethost_native,inet_tcp_dist,init,kernel,kernel_config,net,net_adm,net_kernel,os,ram_file,rpc,user,user_drv,user_sup,disk_log,
disk_log_1,disk_log_server,disk_log_sup,dist_ac,erl_ddll,erl_epmd,erts_debug,gen_tcp,gen_udp,prim_inet,inet,inet_db,inet_dns,
inet_parse,inet_res,inet_tcp,inet_udp,pg2,seq_trace,wrap_log_reader,zlib,otp_ring0],[],infinity,infinity},normal]}},{ancestors,
[<0.6.0>]},{messages,[{'EXIT',<0.8.0>,normal}]},{links,[<0.6.0>,<0.5.0>]},{dictionary,[]},{trap_exit,true},{status,running},
{heap_size,987},{stack_size,21},{reductions,1062}],[]]}

{error_logger,{{2006,6,6},{12,24,50}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})

Thanks
Christoph

You have already a running node with this name

When doing:
erl -name qqq

you get a duplicate name error, which means that an Erlang VM is already running with this node name.

--
Mickaël Rémond
Process-one

Do you have firewall enabled

Do you have firewall enabled at localhost? If so, you have to disable it and allow local connections.

Re: Do you have firewall enabled

Nope, my firewall permits connections to localhost. Everything is open on lo:

Quote:

# ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.148 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.100 ms

Not sure how to check if there is a second erlang vm, there is no task with "erl" running on my debian box

Quote:

# ps aux | grep erl
root 3030 0.0 0.0 1672 404 ? S May15 0:00 /usr/sbin/courierlogger -pid=/var/run/courier/authdaemon/pid -start /usr/lib/courier/authlib/authdaemond.mysql
root 3413 0.0 0.1 3212 748 pts/0 R+ 22:45 0:00 grep erl

Thanks for your help.

CU
Christoph

Please, run

Please, run

erl -sname somestrangename

then don't stop it and give the output of:

netstat -atnp |grep 4369

and

ps aux | egrep '(epmd|beam)'

Gosh, i found the problem.

Gosh, i found the problem. I'm running a ocaml application (mlnet) on the same machine.

When mlnet is on:

Quote:

# netstat -atnp |grep 4369
tcp 0 0 0.0.0.0:4369 0.0.0.0:* LISTEN 24217/mlnet

When erl is running

Quote:

# netstat -atnp |grep 4369
tcp 0 0 0.0.0.0:4369 0.0.0.0:* LISTEN 23827/epmd

Looks like both applications use the same port. When i turn of mlnet, ejabberd starts without problems. Is there a way to choose a different port for epmd?

Thanks
Christoph

erl -sname foo - causes crash

I have installed erlang on my ubuntu fiesty.

When I type:

erl -sname foo

I think I see the same problem as reported by Chrissss on Wed, 2006-06-07 13:49.

I thought this thread would solve my problems but I have tried all of the suggestions no avail.

I am trying to duplicate the instructions found on page 171 of Programming Erlang by Joe Armstrong.

Client on one node, server on second node but same host

I quote from the book:

Now we'll start two Erlang nodes on the same computer.

To do this, we need to open two terminal windows and start two Erlang systems.

----- I did this and it works --------

First, fire up a terminal shell

----- did this and it works ---------

and start a distributed Erlang node in this shell called gandalf: then start the server:

$ erl -sname gandalf

------- my comments: ---------------
I did this, but instead of getting what I should, I.e., (gandalf@localhost) >1

I get the lots of output and the file ear_crash.dump is producced.

Comment: I expected that I could install erlang and run the examples found in Programming Erlang without doing anything else.

What step am I missing? Is my system blocking something? Do I need to register something? I feel I have a termendous amount of erlang information to learn and it is frusturating to spend days on figuring out why:

erl -f foo

doesn't work.

By the way, I can enter the following on the command line:

erl

and it is working ok.

Does anybody know of a FAQ that would help me?

solved "erl -sname" crash problem

seems that I had to execute:

epmd -port 4369

One little problem down - now on to climbing the big Erlang mountain.

didn't solve "erl -sname" crash problem (Ubuntu specific?)

I was premature.

executing

epmd -port 4369

Solved my crash problem, but only on my Windows XP running cygwin.

Even after running "epmd -port 4369" I am still having the same problems with "erl -sname foo" causing a crash on my Ubuntu machine.

work around for erlang crash when doing "erl -sname foo"

At 2AM I woke up with an idea on how to resolve Ubuntu Fiesty not being able to run "erl -sname foo" without crashing erlang. The problem was that:

The file ~/.erlang.cookie was read only by root and was owned by root.

that is,

--w------- 1 root root 21 2008-02-21 03:19 .erlang.cookie

The solution is to do:

sudo erl -sname foo

Always having to do a sudo and then type in the password whenever I want to use -sname or -name seems a little much.

Is this as it should be? Anybody else out there experiencing this?

Anyhow, now I can start up two nodes and ping between them.

More mountains to climb.

:-)

That solved the problem I was

That solved the problem I was having. During a distribution upgrade the home directory for the user ejabberd runs as was removed (its location was somewhat of a legacy). So I recreated it in a more conventional location. By the way, you chan change the ownership of that file by running 'chown user.group .erlang.cookie' as root, where user is the username and group is the group you want it to belong to.

You can remove the file

The file .erlang.cookie is generated in $HOME of the user that executes erl, when erl is started, and only if that file does not exist. So, you can remove that file because it will be generated again (with different content of course). Or change its permissions and owner.

The only really important is that all the erlang nodes in your cluster have the same cookie.

Syndicate content