emqxarchive / emqx-packages

EMQ X RPM/DEB Packages
https://www.emqx.io
5 stars 9 forks source link

service emqttd don't start #6

Closed GwenaelPellenArkeup closed 7 years ago

GwenaelPellenArkeup commented 7 years ago

Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: xenial

with emqttd-ubuntu16.04-v2.3-beta.3_amd64.deb

command

$ sudo service emqttd start

result:

*nothing*

except:

 emqttd 2.3 is started successfully!

How to reproduce (case A) 1- install new ubuntu instance 2- cd /tmp 3- wget "http://emqtt.io/static/brokers/emqttd-ubuntu16.04-v2.3-beta.3_amd64.deb" 4- sudo dpkg -i emqttd-ubuntu16.04-v2.3-beta.3_amd64.deb 5- sudo service emqttd start

but work fine if step 5 is (case B)

$ sudo /etc/init.d/emqttd start
emqttd 2.3 is started successfully!

Differance is .erlang.cookie in /var/lib/emqttd/ In case A, file owner and group is root In case B, file owner and group is emqtt

Trace in case A (fail)

=ERROR REPORT==== 30-Aug-2017::14:44:21 ===
Error when reading /var/lib/emqttd/.erlang.cookie: eaccesescript: exception error: no match of right hand side value
                {error,
                    {{shutdown,
                          {failed_to_start_child,auth,
                              {"Error when reading /var/lib/emqttd/.erlang.cookie: eacces",
                              [{auth,init_cookie,0,
                                    [{file,"auth.erl"},{line,286}]},
                                {auth,init,1,[{file,"auth.erl"},{line,140}]},
                                {gen_server,init_it,2,
                                    [{file,"gen_server.erl"},{line,365}]},
                                {gen_server,init_it,6,
                                    [{file,"gen_server.erl"},{line,333}]},
                                {proc_lib,init_p_do_apply,3,
                                    [{file,"proc_lib.erl"},{line,247}]}]}}},
                      {child,undefined,net_sup_dynamic,
                          {erl_distribution,start_link,
                              [['\''emq_maint_7602@127.0.0.1'\'',longnames],false]},
                          permanent,1000,supervisor,
                          [erl_distribution]}}}
  in function  nodetool__escript__1504__104260__641513__2:process_args/3 (/usr/lib/emqttd/bin/nodetool, line 137)
  in call from nodetool__escript__1504__104260__641513__2:main/1 (/usr/lib/emqttd/bin/nodetool, line 14)
  in call from escript:run/2 (escript.erl, line 759)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_em/1
  in call from init:do_boot/3 '
turtleDeng commented 7 years ago

@GwenaelPellenArkeup The issue has been fixed in 2.3-beta.4