2016-11-08 21 views
0

「沒有cookie文件的家」是什麼意思?以及如何解決這個問題:Erlang沒有Cookie文件的家

export BINDIR=/usr/lib/disco/master/ebin/;/usr/lib/erlang/erts-5.10.4/bin/beam -K true -P 10000000 -scl false -stbt s -- -root /usr/lib/erlang -progname erl -- -home /usr/var/disco info -- -lager handlers [{lager_file_backend,[{file,"/usr/var/disco/log/error.log"}, {level, error}, {size, 1048576000}, {date, "$D0"}, {count, 5}]},{lager_file_backend,[{file,"/usr/var/disco/log/console.log"}, {level, debug}, {size, 1048576000}, {date, "$D0"}, {count, 5}]}] -lager error_logger_hwm 200 -lager crash_log "/usr/var/disco/log/crash.log" -rsh ssh -connect_all false -sname disco_8989_master -pa /usr/lib/disco/master/ebin -pa /usr/lib/disco/master/deps/mochiweb/ebin -pa /usr/lib/disco/master/deps/goldrush/ebin -pa /usr/lib/disco/master/deps/lager/ebin -pa /usr/lib/disco/master/deps/meck/ebin -pa /usr/lib/disco/master/deps/bear/ebin -pa /usr/lib/disco/master/deps/folsom/ebin -pa /usr/lib/disco/master/deps/folsomite/ebin -pa /usr/lib/disco/master/deps/plists/ebin -eval "application:start(disco)" 

{error_logger,{{2016,11,7},{17,25,49}},"No home for cookie file",[]} 
{error_logger,{{2016,11,7},{17,25,49}},crash_report,[[{initial_call,{auth,init,['Argument__1']}},{pid,<0.20.0>},{registered_name,[]},{error_info,{exit,{"No home for cookie file",[{auth,init_cookie,0,[{file,"auth.erl"},{line,285}]},{auth,init,1,[{file,"auth.erl"},{line,139}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,328}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}},{ancestors,[net_sup,kernel_sup,<0.10.0>]},{messages,[]},{links,[<0.18.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,27},{reductions,139}],[]]} 
{error_logger,{{2016,11,7},{17,25,49}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{"No home for cookie file",[{auth,init_cookie,0,[{file,"auth.erl"},{line,285}]},{auth,init,1,[{file,"auth.erl"},{line,139}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}},{offender,[{pid,undefined},{name,auth},{mfargs,{auth,start_link,[]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]} 
{error_logger,{{2016,11,7},{17,25,49}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,{shutdown,{failed_to_start_child,auth,{"No home for cookie file",[{auth,init_cookie,0,[{file,"auth.erl"},{line,285}]},{auth,init,1,[{file,"auth.erl"},{line,139}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}}}},{offender,[{pid,undefined},{name,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]} 
{error_logger,{{2016,11,7},{17,25,49}},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,auth,{"No home for cookie file",[{auth,init_cookie,0,[{file,"auth.erl"},{line,285}]},{auth,init,1,[{file,"auth.erl"},{line,139}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}}}}},{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,239}]}]}},{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,987},{stack_size,27},{reductions,179}],[]]} 
{error_logger,{{2016,11,7},{17,25,49}},std_info,[{application,kernel},{exited,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{"No home for cookie file",[{auth,init_cookie,0,[{file,"auth.erl"},{line,285}]},{auth,init,1,[{file,"auth.erl"},{line,139}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}}}}},{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,auth,{\"No home for cookie file\",[{auth,init_cookie,0,[{file,\"auth.erl\"},{line,285}]},{auth,init,1,[{file,\"auth.erl\"},{line,139}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,239}]}]}}}}},{kernel,start,[normal,[]]}}}"} 

更多背景:

[email protected]:~$ cat $HOME/.erlang.cookie;echo;ls -ail .erlang.cookie 
QCQSMBOQOJCGVKZCUXQL 
263466 -rw------- 1 disco disco 20 Nov 4 00:00 .erlang.cookie 
+0

我沒有看到Python的問題。你爲什麼使用標籤「python」? – furas

+2

正常情況下'BINDIR'和其他環境變量以及命令行選項,例如'-home',可以通過使用'erl'腳本啓動Erlang來正確設置,通常在'/ usr/local/bin'或'/ usr/bin '。你真的試圖按照你展示的方式啓動Erlang嗎?另外,'BINDIR'通常不會像你顯示的那樣被設置爲'ebin'目錄,而是由'erl'腳本設置爲'$ ROOTDIR/erts-8.1/bin',其中'ROOTDIR'就像'/usr/local/lib/erlang或者/ usr/lib/erlang。 –

+0

@furas迪斯科是一個基於python的地圖縮減,它在後端使用erlang。 – jmunsch

回答

1

您可以使用它提供了以下啓動它,阻止它,檢查其狀態等步驟的腳本運行disco爲我工作,但請注意,他們需要git,make,rebarworking Erlang installation。 (我用下面的省略號,表示冗長輸出不導入足以在這裏顯示。)

$ git clone [email protected]:discoproject/disco.git 
... 
$ cd disco 
$ make 
... 
$ PATH=$PWD/bin:$PATH ./bin/disco start 
Master bignosk:8989 started 

我最初試圖與二郎神,19.x的最新版本,但構建失敗,所以我退縮二郎神18.3,然後一切正常。

+0

'.erlang.cookie'與'magic cookie'有關http://erlang.org/doc/reference_manual/distributed.html#id88336 – jmunsch

+0

@jmunsch:是的,你的'〜/ .erlang.cookie'文件裏有什麼是適當時用作「魔術餅乾」。 –