我的程序是用 mac os 编写的,10.6.8(erlang 15B01)
并使用 rebar 发布。
在我的开发电脑中,调用rel/app_a/bin/app_a
控制台时,它运行正常。
Exec: /Users/***/Documents/Project/***/rel/app_a/erts-5.9.1/bin/erlexec
-boot /Users/***/Documents/Project/***/rel/app_a/releases/1/capulet
-mode embedded -config /Users/***/Documents/Project/app_a/rel/app_a/releases/1/sys.config
-args_file /Users/***/Documents/Project/app_a/rel/app_a/releases/1/vm.args -- console
Root: /Users/***/Documents/Project/app_a/rel/capulet
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:0]
[hipe] [kernel-poll:false]
我有 tar"rel/app_a"
目录,然后将 tar 移动到运行 debian 的目标主机(erlang 版本是 R1501)。
调用时rel/app_a/bin/app_a console
,显示错误信息如下:
Exec: /home/***/app_a/erts-5.9.1/bin/erlexec -boot /home/***/app_a/releases/1/app_a
-mode embedded -config /home/***/app_a/releases/1/sys.config
-args_file /home/***/app_a/releases/1/vm.args -- console
Root: /home/***/app_a
/home/***/app_a/erts-5.9.1/bin/erlexec: 4: Syntax error: ")" unexpected
这里有什么意义erlexec:4
?如何解决问题?
当前系统配置
[
%% SASL config
{sasl, [
{sasl_error_logger, {file, "log/sasl-error.log"}},
{errlog_type, error},
{error_logger_mf_dir, "log/sasl"}, % Log directory
{error_logger_mf_maxbytes, 10485760}, % 10 MB max file size
{error_logger_mf_maxfiles, 5} % 5 files max
]}
].
vm.args
## Name of the node
-name capulet@127.0.0.1
## Cookie for distributed erlang
-setcookie RIOEAGZQBQKWHSMMXOPW
## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive
## (Disabled by default..use with caution!)
##-heart
## Enable kernel poll and a few async threads
##+K true
##+A 5
## Increase number of concurrent ports/sockets
##-env ERL_MAX_PORTS 4096
## Tweak GC to run more often
##-env ERL_FULLSWEEP_AFTER 10
我尝试在 sys.config 文件中创建语法错误以进行实验。所以我认为这不是由 sys.config 语法错误引起的。
Crash dump was written to: erl_crash.dump
could not start kernel pid (application_controller)
(error in config file "/Users/***/Documents/Project/app_a/rel/app_a/releases/1/sys.config"
(10): syntax error before: ']')