簡體   English   中英

鳳凰框架部署問題

[英]phoenix framework deployment issue

我正在嘗試使用exrm和conform部署Phoenix應用程序。 在本地Ubuntu上測試發行版有效。 但是,當我在服務器上運行相同時,會失敗。 我無法理解確切原因。

{error_logger,{{2016,1,30},{7,45,44}}},““協議:〜tp:注冊/偵聽錯誤:〜tp〜n”,[“ inet_tcp”,etimedout]} {error_logger,{ {2016,1,30},{7,45,44}},crash_report,[[{initial_call,{net_kernel,INIT,[ 'Argument__1']}},{PID,<0.22.0>},{registered_name, []},{ERROR_INFO,{退出,{錯誤,badarg},[{gen_server,init_it,6,[{文件, “gen_server.erl”},{線,344}]},{proc_lib,init_p_do_apply,3, [{文件, “proc_lib.erl”},{線,240}]}]}},{祖先,[net_sup,kernel_sup,<0.10.0>]},{消息,[]},{鏈接,[#端口<0.380>,<0.19.0>]},{字典,[{longnames,TRUE}]},{trap_exit,TRUE},{狀態,運行},{heap_size,987},{STACK_SIZE,27},{減少數842}],[]]} {error_logger,{{2016,1,30},{7,45,44}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error}, {原因,{ '退出',nodistribution}},{罪犯,[{PID,未定義},{ID,net_kernel},{mfargs,{net_kernel,START_LINK,[[ '應用@ 127.0.0.1',longnames]]} },{restart_type,permanent},{shutdown,2000},{child_type,worker}}}}} {error_logger,{{2016,1,30},{7,45,44}},supervisor_report,[{superviso R,{本地,kernel_sup}},{errorContext,START_ERROR},{原因,{關機,{failed_to_start_child,net_kernel,{ '退出',nodistribution}}}},{罪犯,[{PID,未定義},{ID, net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}}} {error_logger,{{2016,1,30},{ 7,45,44}},crash_report,[[{initial_call,{application_master,INIT,[ 'Argument__1', 'Argument__2', 'Argument__3', 'Argument__4']}},{PID,<0.9.0>}, {registered_name,[]},{ERROR_INFO,{退出,{{關機,{failed_to_start_child,net_sup,{關機,{failed_to_start_child,net_kernel,{ '退出',nodistribution}}}}},{內核,啟動,[正常, []]}},[{application_master,INIT,4,[{文件, “application_master.erl”},{線,134}]},{proc_lib,init_p_do_apply,3,[{文件, “proc_lib.erl”} {線,240}]}]}},{祖先,[<0.8.0>]},{消息,[{ '退出',<0.10.0>,正常}]},{鏈接,[<0.8 0.0>,<0.7.0>]},{字典,[]},{trap_exit,TRUE},{狀態,運行},{heap_size,376},{STACK_SIZE,27},{減少,117}], []]} {error_logger,{{2016,1,30},{7,45,44}}, std_info,[{應用,內核},{退出,{{關機,{failed_to_start_child,net_sup,{關機,{failed_to_start_child,net_kernel,{ '退出',nodistribution}}}}},{內核,啟動,[正常,[ ]]}}},{類型,永久}]} {“內核pid終止”,application_controller,” {application_start_failure,內核,{{關閉,{failed_to_start_child,net_sup,}關閉,{failed_to_start_child,net_kernel,},{'EXIT', nodistribution}}}}},{內核,啟動,[正常,[]]}}}“}

已將故障轉儲寫入:erl_crash.dump ...內核pid終止(application_controller)({application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,}} {shutdown,{failed_to_start_child,net_kernel,{'EXIT}} }}},{ķ

錯誤原因通常在錯誤和crashdump的第一行:

{error_logger,{{2016,1,30},{7,45,44}},"Protocol: ~tp: register/listen error: ~tp~n",["inet_tcp",etimedout]}...

({application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}}...

在啟動過程中,使用etimedout超時打開監聽套接字時etimedout 這可能是由於以下原因引起的:

  • 您的應用程序已經在運行,並且您無法兩次打開相同的端口,
  • 有防火牆限制-檢查iptables尤其是端口4369(Erlang端口映射器守護程序)
  • 您的應用沒有權限打開該端口

iexdev環境啟動您的應用程序,而exrm使用prod 比較您的devprod設置。 可能定義了不同的端口。 嘗試使用iex運行prod ,但要在prod環境下運行。

MIX_ENV=prod iex -S mix phoenix.server

請記住,生成的發行版具有在創建過程中評估並進行硬編碼的所有配置值。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM