2016-02-04 41 views
0

我已经配置了Riak集群,一切都很好。我配置了ejabberd.yml来与它交谈,但是我在日志中看到的最后几行代码如下,我无法弄清楚如何进一步调试它。ejabberd与Riak

任何人都可以提供帮助吗?

Change ejabberd install user to root... 
Missing ssl cert for your host. Generating snakeoil ssl cert for xmpp.alchemy.local... 
Generating a 4096 bit RSA private key 
..............................................++ 
..............................................++ 
writing new private key to '/tmp/selfsigned.key' 
----- 
Writing ssl cert and private key to '/opt/ejabberd/ssl/host.pem'... 
Missing ssl cert for your xmpp domain. Generating snakeoil ssl cert for alchemy.local... 
Generating a 4096 bit RSA private key 
................................................++ 
........................++ 
writing new private key to '/tmp/selfsigned.key' 
----- 
Writing ssl cert and private key to '/opt/ejabberd/ssl/alchemy.local.pem'... 
Generating ejabberd config file... 
Generating ejabberdctl config file... 
Starting ejabberd... 
tail: cannot open ‘/var/log/ejabberd/crash.log’ for reading: No such file or directory 
tail: cannot open ‘/var/log/ejabberd/error.log’ for reading: No such file or directory 
tail: cannot open ‘/var/log/ejabberd/erlang.log’ for reading: No such file or directory 
tail: ‘/var/log/ejabberd/crash.log’ has been replaced with a remote file. giving up on this name 
tail: ‘/var/log/ejabberd/error.log’ has been replaced with a remote file. giving up on this name 
09:57:16.424 [info] Application lager started on node [email protected] 
09:57:16.431 [info] Application crypto started on node [email protected] 
09:57:16.442 [info] Application sasl started on node [email protected] 
09:57:16.452 [info] Application asn1 started on node [email protected] 
09:57:16.452 [info] Application public_key started on node [email protected] 
09:57:16.466 [info] Application ssl started on node [email protected] 
09:57:16.474 [info] Application p1_yaml started on node [email protected] 
09:57:16.485 [info] Application p1_tls started on node [email protected] 
09:57:16.493 [info] Application p1_xml started on node [email protected] 
09:57:16.507 [info] Application p1_stringprep started on node [email protected] 
09:57:16.511 [info] Application p1_zlib started on node [email protected] 
09:57:16.519 [info] Application cache_tab started on node [email protected] 
09:57:16.677 [info] Application mnesia started on node [email protected] 
09:57:17.179 [info] Application inets started on node [email protected] 
09:57:17.558 [notice] Changed loglevel of //var/log/ejabberd/ejabberd.log to debug 
09:57:17.567 [debug] Supervisor ejabberd_sup started ejabberd_hooks:start_link() at pid <0.239.0> 
09:57:17.575 [debug] Supervisor kernel_safe_sup started pg2:start_link() at pid <0.241.0> 
09:57:17.575 [debug] Supervisor ejabberd_sup started ejabberd_node_groups:start_link() at pid <0.240.0> 
09:57:17.575 [debug] Supervisor ejabberd_sup started ejabberd_system_monitor:start_link() at pid <0.242.0> 
09:57:17.577 [debug] Supervisor ejabberd_sup started ejabberd_router:start_link() at pid <0.243.0> 
09:57:17.579 [debug] Supervisor ejabberd_sup started ejabberd_router_multicast:start_link() at pid <0.249.0> 
09:57:17.582 [debug] Supervisor ejabberd_sup started ejabberd_s2s:start_link() at pid <0.255.0> 
09:57:17.584 [debug] Supervisor ejabberd_sup started ejabberd_local:start_link() at pid <0.265.0> 
09:57:17.585 [debug] The option captcha_cmd is not configured, but some module wants to use the CAPTCHA feature. 
09:57:17.587 [debug] Supervisor ejabberd_sup started ejabberd_captcha:start_link() at pid <0.271.0> 
09:57:17.587 [debug] Supervisor ejabberd_sup started ejabberd_tmp_sup:start_link(ejabberd_s2s_in_sup, ejabberd_s2s_in) at pid <0.273.0> 
09:57:17.587 [debug] Supervisor ejabberd_sup started ejabberd_tmp_sup:start_link(ejabberd_s2s_out_sup, ejabberd_s2s_out) at pid <0.274.0> 
09:57:17.587 [debug] Supervisor ejabberd_sup started ejabberd_tmp_sup:start_link(ejabberd_service_sup, ejabberd_service) at pid <0.275.0> 
09:57:17.587 [debug] Supervisor ejabberd_sup started ejabberd_tmp_sup:start_link(ejabberd_iq_sup, gen_iq_handler) at pid <0.276.0> 
09:57:17.588 [debug] Supervisor ejabberd_sup started ejabberd_tmp_sup:start_link(ejabberd_frontend_socket_sup, ejabberd_frontend_socket) at pid <0.277.0> 
09:57:17.588 [debug] Supervisor ejabberd_sup started ejabberd_listener:start_link() at pid <0.278.0> 
09:57:17.591 [info] Application protobuffs started on node [email protected] 
09:57:17.591 [info] Application riak_pb started on node [email protected] 
09:57:17.591 [info] Application riakc started on node [email protected] 
09:57:17.600 [debug] Supervisor inet_gethost_native_sup started undefined at pid <0.289.0> 
09:57:17.600 [debug] Supervisor kernel_safe_sup started inet_gethost_native:start_link() at pid <0.288.0> 

我设法通过ejabberdctl debug获得更多的细节。它似乎有一个问题与节点名称,但完全相同的配置工作正常,如果我不添加RIAK到ejabberd.yml文件。

tail: cannot open ‘/var/log/ejabberd/crash.log’ for reading: No such file or directory 
tail: cannot open ‘/var/log/ejabberd/error.log’ for reading: No such file or directory 
tail: cannot open ‘/var/log/ejabberd/erlang.log’ for reading: No such file or directory 
{error_logger,{{2016,2,4},{19,30,38}},"Invalid node name: ~p~n",['debug-not a [email protected]']} 
{error_logger,{{2016,2,4},{19,30,38}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.20.0>},{registered_name,[]},{error_info,{exit,{error,badarg},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,322}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}},{ancestors,[net_sup,kernel_sup,<0.10.0>]},{messages,[]},{links,[<0.17.0>]},{dictionary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,987},{stack_size,27},{reductions,902}],[]]} 
{error_logger,{{2016,2,4},{19,30,38}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[['debug-not a tty-ejabberd',shortnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]} 
{error_logger,{{2016,2,4},{19,30,38}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}},{offender,[{pid,undefined},{name,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]} 
{error_logger,{{2016,2,4},{19,30,38}},crash_report,[[{initial_call,{application_master,init,['Argument__1','Argument__2','Argument__3','Argument__4']}},{pid,<0.9.0>},{registered_name,[]},{error_info,{exit,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{kernel,start,[normal,[]]}},[{application_master,init,4,[{file,"application_master.erl"},{line,133}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}},{ancestors,[<0.8.0>]},{messages,[{'EXIT',<0.10.0>,normal}]},{links,[<0.8.0>,<0.7.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,376},{stack_size,27},{reductions,117}],[]]} 
{error_logger,{{2016,2,4},{19,30,38}},std_info,[{application,kernel},{exited,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{kernel,start,[normal,[]]}}},{type,permanent}]} 
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{kernel,start,[normal,[]]}}}"} 

Crash dump was written to: //var/log/ejabberd/erl_crash_20160204-193037.dump 
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{k 

**** ****更新

的原因,这是发生了,因为我没有指定我泊坞运行命令--net网络连接,所以它不能找到网络。不幸的是,没有调试表明它只是永久挂起(这种情况发生在一般情况下,无法找到承载Riak集群的网络,并且是调试的噩梦)。

我仍然不知道为什么“调试”标志导致tty被添加到节点名称,但我怀疑它是以某种方式相关,因为当我修复它也停止出现。

任何有兴趣了解详情可以查看这里https://github.com/rroemhild/docker-ejabberd/issues/81#issuecomment-181133336

+0

提供更详细的ejabberd和riak日志。 –

+0

更新了整个日志,但最后几行是与Mnesia和Riak成功安装的唯一区别:S – stevenlivz

+0

您是从源代码安装的还是二进制安装程序安装的ejabberd?你应该以root用户身份重新安装ejabberd。 –

回答

0

您用一个无效的节点名称开始Erlang的VM:

{error_logger,{{2016,2,4},{19,30,38}},"Invalid node name: ~p~n",['debug-not a [email protected]']} 

检查,你已经完成了这个:'debug-not a [email protected]',因为它是的确不是有效的Erlang VM集群节点名称。

+0

Thanks @Mickaël - 我正在调试刚才的。我已经剥去了大部分剧本并专注于此。 – stevenlivz

+0

你知道在什么时候这可能被分配。我似乎已经正确设置了所有的配置,但它只有当我运行'ejabberdctl调试',我得到这个(我试图调试它为什么不连接到Riak集群,但这阻止了我发现了这一点)。如果我不使用调试,而是使用实时,它启动罚款(但唉不连接到Riak)。 – stevenlivz