processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6.07k stars 1.51k forks source link

Make no error, but can't start #678

Closed allran closed 9 years ago

allran commented 9 years ago

Erlang/OTP 17 [erts-6.4] [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]

$ git clone https://github.com/processone/ejabberd.git $ cd /Users/allran/SDK/chart/ejabberd $ chmod +x autogen.sh $ ./autogen.sh
$ ./configure --prefix=/Users/allran/SDK/chart/my-ejabberd --enable-all
$ ./rebar get-deps $ ./rebar compile

And it's successfull like this log:

==> p1_utils (pre_compile)
==> p1_utils (compile)
==> p1_cache_tab (pre_compile)
==> p1_cache_tab (compile)
==> p1_tls (pre_compile)
==> p1_tls (compile)
==> p1_stringprep (pre_compile)
==> p1_stringprep (compile)
==> p1_xml (pre_compile)
==> p1_xml (compile)
==> p1_stun (pre_compile)
==> p1_stun (compile)
==> esip (pre_compile)
==> esip (compile)
==> p1_yaml (pre_compile)
==> p1_yaml (compile)
==> meck (pre_compile)
==> meck (compile)
==> p1_mysql (pre_compile)
==> p1_mysql (compile)
==> p1_pgsql (pre_compile)
==> p1_pgsql (compile)
==> sqlite3 (pre_compile)
==> sqlite3 (compile)
==> p1_pam (pre_compile)
==> p1_pam (compile)
==> p1_zlib (pre_compile)
==> p1_zlib (compile)
==> protobuffs (pre_compile)
==> protobuffs (compile)
==> riak_pb (pre_compile)
==> riak_pb (compile)
==> riakc (pre_compile)
==> riakc (compile)
==> eredis (pre_compile)
==> eredis (compile)
==> jiffy (pre_compile)
==> jiffy (compile)
==> rebar_elixir_plugin (pre_compile)
==> rebar_elixir_plugin (compile)
==> elixir (pre_compile)
==> elixir (compile)
==> elixir (compile)
==> goldrush (pre_compile)
==> goldrush (compile)
==> lager (pre_compile)
==> lager (compile)
==> p1_iconv (pre_compile)
==> p1_iconv (compile)
==> rel (pre_compile)
==> rel (compile)
==> ejabberd (pre_compile)
==> ejabberd (compile)

Then i make it: [root@allran ejabberd]# make & make install And it's also sucessfull with follow log:

[1] 7144
/usr/local/lib/erlang/bin/escript rebar skip_deps=true compile
/usr/local/lib/erlang/bin/escript rebar skip_deps=true compile
==> rel (pre_compile)
==> rel (compile)
==> ejabberd (pre_compile)
==> rel (pre_compile)
==> ejabberd (compile)
==> rel (compile)
==> ejabberd (pre_compile)
==> ejabberd (compile)
#
# Configuration files
/usr/bin/install -c -d -m 750  /root/chart/my-ejabberd/etc/ejabberd
[ -f /root/chart/my-ejabberd/etc/ejabberd/ejabberd.yml ] \
                && /usr/bin/install -c -b -m 640  ejabberd.yml.example /root/chart/my-ejabberd/etc/ejabberd/ejabberd.yml-new \
                || /usr/bin/install -c -b -m 640  ejabberd.yml.example /root/chart/my-ejabberd/etc/ejabberd/ejabberd.yml
/bin/sed -e "s*{{rootdir}}*/root/chart/my-ejabberd*" \
                -e "s*{{installuser}}**" \
                -e "s*{{bindir}}*/root/chart/my-ejabberd/bin*" \
                -e "s*{{libdir}}*/root/chart/my-ejabberd/lib*" \
                -e "s*{{sysconfdir}}*/root/chart/my-ejabberd/etc*" \
                -e "s*{{localstatedir}}*/root/chart/my-ejabberd/var*" \
                -e "s*{{docdir}}*/root/chart/my-ejabberd/share/doc/ejabberd*" \
                -e "s*{{erl}}*/usr/local/bin/erl*" ejabberdctl.template \
                > ejabberdctl.example
[ -f /root/chart/my-ejabberd/etc/ejabberd/ejabberdctl.cfg ] \
                && /usr/bin/install -c -b -m 640  ejabberdctl.cfg.example /root/chart/my-ejabberd/etc/ejabberd/ejabberdctl.cfg-new \
                || /usr/bin/install -c -b -m 640  ejabberdctl.cfg.example /root/chart/my-ejabberd/etc/ejabberd/ejabberdctl.cfg
/usr/bin/install -c -b -m 644  inetrc /root/chart/my-ejabberd/etc/ejabberd/inetrc
#
# Administration script
[ -d /root/chart/my-ejabberd/sbin ] || /usr/bin/install -c -d -m 755 /root/chart/my-ejabberd/sbin
/usr/bin/install -c -m 550  ejabberdctl.example /root/chart/my-ejabberd/sbin/ejabberdctl
# Elixir binaries
[ -d /root/chart/my-ejabberd/bin ] || /usr/bin/install -c -d -m 755 /root/chart/my-ejabberd/bin
[ -f deps/elixir/bin/iex ] && /usr/bin/install -c -m 550  deps/elixir/bin/iex /root/chart/my-ejabberd/bin/iex
[ -f deps/elixir/bin/elixir ] && /usr/bin/install -c -m 550  deps/elixir/bin/elixir /root/chart/my-ejabberd/bin/elixir
[ -f deps/elixir/bin/mix ] && /usr/bin/install -c -m 550  deps/elixir/bin/mix /root/chart/my-ejabberd/bin/mix
#
# Init script
/bin/sed -e "s*@ctlscriptpath@*/root/chart/my-ejabberd/sbin*" \
                -e "s*@installuser@*root*" ejabberd.init.template \
                > ejabberd.init
chmod 755 ejabberd.init
#
# Binary Erlang files
/usr/bin/install -c -d /root/chart/my-ejabberd/lib/ejabberd/ebin
/usr/bin/install -c -m 644 ebin/*.app /root/chart/my-ejabberd/lib/ejabberd/ebin
/usr/bin/install -c -m 644 ebin/*.beam /root/chart/my-ejabberd/lib/ejabberd/ebin
/usr/bin/install -c -m 644 deps/*/ebin/*.app /root/chart/my-ejabberd/lib/ejabberd/ebin
/usr/bin/install -c -m 644 deps/*/ebin/*.beam /root/chart/my-ejabberd/lib/ejabberd/ebin
# Install Elixir and Elixir dependancies
/usr/bin/install -c -m 644 deps/*/lib/*/ebin/*.app /root/chart/my-ejabberd/lib/ejabberd/ebin
/usr/bin/install -c -m 644 deps/*/lib/*/ebin/*.beam /root/chart/my-ejabberd/lib/ejabberd/ebin
rm -f /root/chart/my-ejabberd/lib/ejabberd/ebin/configure.beam
#
# ejabberd header files
/usr/bin/install -c -d /root/chart/my-ejabberd/lib/ejabberd/include
/usr/bin/install -c -m 644 include/*.hrl /root/chart/my-ejabberd/lib/ejabberd/include
/usr/bin/install -c -m 644 deps/*/include/*.hrl /root/chart/my-ejabberd/lib/ejabberd/include
#
# Binary C programs
/usr/bin/install -c -d /root/chart/my-ejabberd/lib/ejabberd/priv/bin
/usr/bin/install -c -m 750  tools/captcha.sh /root/chart/my-ejabberd/lib/ejabberd/priv/bin
/usr/bin/install -c -m 750  tools/joincluster /root/chart/my-ejabberd/lib/ejabberd/priv/bin
/usr/bin/install -c -m 750  tools/leavecluster /root/chart/my-ejabberd/lib/ejabberd/priv/bin
[ -f deps/p1_pam/priv/bin/epam ] \
                && /usr/bin/install -c -m 750  deps/p1_pam/priv/bin/epam /root/chart/my-ejabberd/lib/ejabberd/priv/bin
#
# Binary system libraries
/usr/bin/install -c -d /root/chart/my-ejabberd/lib/ejabberd/priv/lib
/usr/bin/install -c -m 644 deps/esip/priv/esip_drv.so deps/jiffy/priv/jiffy.so deps/sqlite3/priv/sqlite3_drv.so deps/p1_iconv/priv/lib/iconv.so deps/p1_stringprep/priv/lib/stringprep.so deps/p1_tls/priv/lib/p1_sha.so deps/p1_tls/priv/lib/p1_tls_drv.so deps/p1_xml/priv/lib/expat_erl.so deps/p1_xml/priv/lib/xml.so deps/p1_yaml/priv/lib/p1_yaml.so deps/p1_zlib/priv/lib/ezlib_drv.so /root/chart/my-ejabberd/lib/ejabberd/priv/lib
[ -f /root/chart/my-ejabberd/lib/ejabberd/priv/lib/jiffy.so ] && (cd /root/chart/my-ejabberd/lib/ejabberd/priv; ln -s lib/jiffy.so; true)
ln: creating symbolic link `./jiffy.so': File exists
[ -f /root/chart/my-ejabberd/lib/ejabberd/priv/lib/sqlite3_drv.so ] && (cd /root/chart/my-ejabberd/lib/ejabberd/priv; ln -s lib/sqlite3_drv.so; true)
ln: creating symbolic link `./sqlite3_drv.so': File exists
#
# Translated strings
/usr/bin/install -c -d /root/chart/my-ejabberd/lib/ejabberd/priv/msgs
/usr/bin/install -c -m 644 priv/msgs/*.msg /root/chart/my-ejabberd/lib/ejabberd/priv/msgs
#
# Copy lite.sql
[ -d deps/sqlite3 ] && /usr/bin/install -c -d /root/chart/my-ejabberd/lib/ejabberd/priv/sql
[ -d deps/sqlite3 ] && /usr/bin/install -c -m 644 sql/lite.sql /root/chart/my-ejabberd/lib/ejabberd/priv/sql
#
# Spool directory
/usr/bin/install -c -d -m 750  /root/chart/my-ejabberd/var/lib/ejabberd
echo -R  /root/chart/my-ejabberd/var/lib/ejabberd >/dev/null
chmod -R 750 /root/chart/my-ejabberd/var/lib/ejabberd
[ ! -f /root/chart/my-ejabberd/var/lib/ejabberd/.erlang.cookie ] || { echo  /root/chart/my-ejabberd/var/lib/ejabberd/.erlang.cookie >/dev/null ; chmod 400 /root/chart/my-ejabberd/var/lib/ejabberd/.erlang.cookie ; }
#
# ejabberdctl lock directory
/usr/bin/install -c -d -m 750  /root/chart/my-ejabberd/var/lock/ejabberdctl
echo -R  /root/chart/my-ejabberd/var/lock/ejabberdctl >/dev/null
chmod -R 750 /root/chart/my-ejabberd/var/lock/ejabberdctl
#
# Log directory
/usr/bin/install -c -d -m 750  /root/chart/my-ejabberd/var/log/ejabberd
echo -R  /root/chart/my-ejabberd/var/log/ejabberd >/dev/null
chmod -R 750 /root/chart/my-ejabberd/var/log/ejabberd
#
# Documentation
/usr/bin/install -c -d /root/chart/my-ejabberd/share/doc/ejabberd
[ -f doc/guide.html ] \
                && /usr/bin/install -c -m 644 doc/guide.html /root/chart/my-ejabberd/share/doc/ejabberd \
                || echo "Documentation not included in sources"
Documentation not included in sources
/usr/bin/install -c -m 644 COPYING /root/chart/my-ejabberd/share/doc/ejabberd
[1]+  Done                    make
[root@allran ejabberd]# 

But when i check the ejabberdctl, i get follow error: [root@allran ejabberd]# /root/chart/my-ejabberd/sbin/ejabberdctl live

--------------------------------------------------------------------

IMPORTANT: ejabberd is going to start in LIVE (interactive) mode.
All log messages will be shown in the command shell.
You can interact with the ejabberd node if you know how to use it.
Please be extremely cautious with your actions,
and exit immediately if you are not completely sure.

To exit this LIVE mode and stop ejabberd, press:
  q().  and press the Enter key

--------------------------------------------------------------------
To bypass permanently this warning, add to ejabberdctl.cfg the line:
  EJABBERD_BYPASS_WARNINGS=true
Press return to continue

{error_logger,{{2015,7,24},{3,28,56}},"Protocol: ~tp: register/listen error: ~tp~n",["inet_tcp",epmd_close]}
{error_logger,{{2015,7,24},{3,28,56}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.21.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,[#Port<0.104>,<0.18.0>]},{dictionary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,376},{stack_size,27},{reductions,755}],[]]}
{error_logger,{{2015,7,24},{3,28,56}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[['ejabberd@localhost',shortnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2015,7,24},{3,28,56}},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,{{2015,7,24},{3,28,56}},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,{{2015,7,24},{3,28,56}},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: /root/chart/my-ejabberd/var/log/ejabberd/erl_crash_20150724-032854.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
[root@allran ejabberd]# 
mremond commented 9 years ago

It seems like you may have an issue with your Erlang install. Which Erlang version are you using and how did you install it ?

allran commented 9 years ago

@mremond code from http://www.erlang.org/download_release/28, and i get the OTP 17.5 Source File (64.1 MB)

wget http://www.erlang.org/download/otp_src_17.5.tar.gz tar zxvf otp_src_17.5.tar.gz cd otp_src_17.5 ./configure && make && sudo make install

[root@allran ~]# erl
Erlang/OTP 17 [erts-6.4] [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.4  (abort with ^G)
1> 
badlop commented 9 years ago

Does this work?

erl -name aaa

allran commented 9 years ago

@badlop

[root@allran bin]# erl --version
Erlang/OTP 17 [erts-6.4] [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.4  (abort with ^G)
1> q().
ok
2> [root@allran bin]# erl -name aaa
{error_logger,{{2015,7,27},{3,29,31}},"Can't set long node name!\nPlease check your configuration\n",[]}
{error_logger,{{2015,7,27},{3,29,31}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.21.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.18.0>]},{dictionary,[{longnames,true}]},{trap_exit,true},{status,running},{heap_size,987},{stack_size,27},{reductions,605}],[]]}
{error_logger,{{2015,7,27},{3,29,31}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[[aaa,longnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2015,7,27},{3,29,31}},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,{{2015,7,27},{3,29,31}},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,{{2015,7,27},{3,29,31}},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: erl_crash.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
[root@allran bin]# 

Is that mean, my erlang isn't install successfull?

badlop commented 9 years ago

So, there's a problem in your erlang installation. Once you fix it, try again ejabberd.

It may be some problem in the network setup in your machine, see for example: http://stackoverflow.com/questions/16121632/erlang-reported-epmd-closed-error

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.