1
votes

My program is written in mac os 10.6.8(erlang 15B01) and release with rebar.

In my development pc, when calling rel/app_a/bin/app_a console, it runs ok.

    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]

I have tar the "rel/app_a" directory, then move the tar into the target host which run debian (erlang version is R1501).

When calling the rel/app_a/bin/app_a console, it show the error message as following:

    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

What's the meaning erlexec:4 here? how to solve the problem?

current sys.config

[
 %% 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 [email protected]

## 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

I try to create syntax error in sys.config file for experiment. So I think it is not caused by sys.config syntax error.

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: ']')
1

1 Answers

1
votes

Check sys.config and vm.args for any syntax errors.