[erlang-questions] rebar release not starting with an automated start script

17 views
Skip to first unread message

Matthew Hillsborough

unread,
Jun 16, 2012, 9:34:25 PM6/16/12
to erlang-q...@erlang.org
Hi all,

I am using rebar in order to make releases of my Erlang OTP
application. The application runs rock solid thus far. I'm having one
complication where I am trying to script an automated start of the
Erlang application after a reboot. I trimmed down the script to the
ultimate basics and am running something like this, completely
headless (via Jenkins and/or RightScale).

==========
#!/bin/bash -ex

chmod u+x /home/erlang/erlapp/bin/erlapp
/home/erlang/erlapp/bin/erlapp start

==========


The odd part is that it does listen on the TCP port I have it built to
listen and accept connections on. However, no connections make it
through and I cannot attach to the console using
``/home/erlang/erlapp/bin/erlapp attach``.

If I manually execute the above in login shell, everything works just
great. Server starts, I can attach to the console. Server accepts
connections from clients, etc.

Any idea why I can't script start with a rebar release?

Thanks all.

Matthew
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Matthew Hillsborough

unread,
Jun 22, 2012, 4:06:09 PM6/22/12
to erlang-q...@erlang.org
Just a heads up, I finally fixed this issue. In order to get this
working, I had to stop/start my server with the following if I want to
do it headless, without an interactive shell:

"script -c 'TERM=xterm-256color ./bin/myapp start' /dev/null"

Simply doing "service myapp start" would cause insane behavior. I'm
guessing one of my modules, maybe lager? is requiring TERM to be
defined.

I'm just curious how come I'm googling and no one else had this issue
before. That worries me more than anything. Surely someone else ran
into a similar case where headless starting of their erlang app was
not working properly?

On Sun, Jun 17, 2012 at 9:13 AM, Kunthar <kun...@gmail.com> wrote:
> What is your port number?
> May be your rebar user have no rights to run on this port?
> --
> BR,
> \|/ Kunthar
Reply all
Reply to author
Forward
0 new messages