[erlang-questions] Problem attaching a shell to an Erlang node started through SSH

André Graf andre.graf@REDACTED
Fri Jul 6 10:17:47 CEST 2012


Hi Ivan,

Running EUnit works. I am pretty sure the problem is somehow related
with the runner script generated by Rebar (which I haven't changed).
I tried both sudo and run. I forgot to mention that you must disable
fabric pty when starting the node through the runner script otherwise
the start call succeeds but no node (and also no logs) are generated.

Symptoms are difficult to describe. The resulting shell looks like that:
user@REDACTED:~/test_project/rel/mynode/bin$ sudo ./mynode attach
Attaching to /tmp//home/user/test_project/rel/mynode/erlang.pipe.3 (^D to exit)

^R

So I won't get the normal Erlang shell prompt, I can run some Erlang
commands though, but I don't have any tab-completion.
Ctrl-D will properly exit, Ctrl-G is not giving me the User switch
command, Ctrl-C gives the proper Break menu.

Funny here, If I don't use sudo for the attach I get a "Node is not
running!" although the node was started without using sudo, but this
problem also appears if I start the node directly on the server
without going through SSH.

Cheers,
André






On 6 July 2012 07:27, Ivan Uemlianin <ivan@REDACTED> wrote:
> Dear André
>
> This is what we're doing (see my recent email) and the erlang is working
> fine. I'll be at the office this afternoon to check properly but here are a
> few differences:
>
> - our fab script uses sudo() instead of run();
> - this function calls an unit script instead of calling the release start
> directly.
>
>> However, attaching a shell to the
>> node triggers a strange
>> behavior, the shell is available but
>> unusable.
>
> What are the symptoms?
>
> Best wishes
>
> Ivan
>
>
> Sent from my iPhone
>
> On 5 Jul 2012, at 23:27, André Graf <andre.graf@REDACTED> wrote:
>
> Hello,
>
> I am working on a small library that uses Python Fabric together with
> Rebar deploying of Erlang applications. Fabric provides a scriptable
> (it's Python) abstraction over SSH.
> While I am able to deploy and upgrade new releases through such a
> fabric script I struggle with a simple Erlang node startup.
>
> A fabric call e.g. run("/path/to/my/release/bin/myproject start")
> invokes following SSH command
> ssh user@REDACTED "/bin/bash -l -c '/path/to/my/release/bin/myproject start'"
>
> This starts the node and I can use the remote shell to operate on the
> node. However, attaching a shell to the node triggers a strange
> behavior, the shell is available but unusable. It seems the startup
> through SSH has somehow confused the involved pipes.
>
> Do you have any hints on that? I am using rebar 2.0.0 R15B
> 20120625_185716 git 2.0.0-45-gc41fda6.
>
> Cheers,
> Andre
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list