(Newbie here) ranch example을 실행하려고하면 오류가 발생합니다. 통해 rebar
응용 프로그램과 노드를 만들었습니다 (github 참조). 하지만 빌드하고 실행하려고하면 undef
ranch,start_listener
이 발생합니다.My Erlang 응용 프로그램에 목장 모듈 종속성이 표시되지 않습니다.
전체 콘솔 출력을 참조하십시오
$ rebar get-deps compile generate && sh rel/reverse/bin/reverse console
WARN: Expected reverse/deps/ranch to be an app dir (containing ebin/*.app), but no .app found.
==> rel (get-deps)
==> reverse (get-deps)
WARN: Expected reverse/deps/ranch to be an app dir (containing ebin/*.app), but no .app found.
Pulling ranch from {git,"[email protected]:ninenines/ranch.git",{tag,"1.1.0"}}
Cloning into 'ranch'...
==> ranch (get-deps)
==> ranch (compile)
Compiled src/ranch_transport.erl
Compiled src/ranch_sup.erl
Compiled src/ranch_ssl.erl
Compiled src/ranch_tcp.erl
Compiled src/ranch_protocol.erl
Compiled src/ranch_listener_sup.erl
Compiled src/ranch_app.erl
Compiled src/ranch_acceptors_sup.erl
Compiled src/ranch_acceptor.erl
Compiled src/ranch_server.erl
Compiled src/ranch.erl
Compiled src/ranch_conns_sup.erl
==> rel (compile)
==> reverse (compile)
Compiled src/reverse_sup.erl
Compiled src/reverse_app.erl
Compiled src/reverse_protocol.erl
==> rel (generate)
WARN: 'generate' command does not apply to directory reverse
Exec: reverse/rel/reverse/erts-6.3/bin/erlexec -boot reverse/rel/reverse/releases/1/reverse -mode embedded -config reverse/rel/reverse/releases/1/sys.config -args_file reverse/rel/reverse/releases/1/vm.args -- console
Root: reverse/rel/reverse
Erlang/OTP 17 [erts-6.3] [source-f9282c6] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.3 (abort with ^G)
([email protected])1>
=INFO REPORT==== 30-Dec-2014::22:47:08 ===
application: reverse
exited: {bad_return,
{{reverse_app,start,[normal,[]]},
{'EXIT',
{undef,
[{ranch,start_listener,
[reverse,10,ranch_tcp,
[{port,5555}],
reverse_protocol,[]],
[]},
{reverse_app,start,2,
[{file,"src/reverse_app.erl"},{line,13}]},
{application_master,start_it_old,4,
[{file,"application_master.erl"},
{line,272}]}]}}}}
type: permanent
{"Kernel pid terminated",application_controller,"{application_start_failure,reverse,{bad_return,{{reverse_app,start,[normal,[]]},{'EXIT',{undef,[{ranch,start_listener,[reverse,10,ranch_tcp,[{port,5555}],reverse_protocol,[]],[]},{reverse_app,start,2,[{file,\"src/reverse_app.erl\"},{line,13}]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,272}]}]}}}}}"}
Crash dump was written to: erl_crash.dump
내가 제대로 reltool.config
(please see on github)에 ranch
를 추가 모르겠습니다. 그러나 deps
을 libs_dir
경로에서 제거하면 오류 Application version clash. Multiple directories contain version ...
이 표시됩니다. 내가 failing call을 제거하고 실행하면
UPDATE는 application:which_applications().
나에게 실행중인 사람의 하나로서 {ranch,[],[]}
을 제공합니다.
UPDATE 버전 내가 잘못 뭐하는 거지
$ erl
Erlang/OTP 17 [erts-6.3] [source-f9282c6] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
$ rebar --version
rebar 2.5.1 17 20141223_141030 git 2.5.1-84-gdd9125e
?
미리 감사드립니다. reltool.config
에서
'deps'를 제거하면 질문에 쓴 것처럼'응용 프로그램 버전 충돌 '오류가 발생합니다. –
'{app, ranch, [...]}'을 완전히 제거하고'{lib_dirs, [ "../ deps"]}'를 추가하면'{ "init은 do_boot에서 종료됩니다.", { 'can not load ', ranch_sup, get_files}}'. –
repo를 복제하고 {app, ranch, ...} 패치를 사용해 보았습니다. 제게 잘 작동합니다. 또한 그 행을 지우고'{lib_dirs, [ "../ deps"]}'는 예상대로 작동합니다. – johlo