Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Problem attaching a shell to an Erlang node started through SSH
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
André Graf  
View profile   Translate to Translated (View Original)
 More options Jul 5 2012, 6:27 pm
From: André Graf <andre.g...@erl.io>
Date: Fri, 6 Jul 2012 00:27:56 +0200
Local: Thurs, Jul 5 2012 6:27 pm
Subject: [erlang-questions] Problem attaching a shell to an Erlang node started through SSH
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@remote "/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-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ivan Uemlianin  
View profile   Translate to Translated (View Original)
 More options Jul 6 2012, 1:27 am
From: Ivan Uemlianin <i...@llaisdy.com>
Date: Fri, 6 Jul 2012 06:27:25 +0100
Local: Fri, Jul 6 2012 1:27 am
Subject: Re: [erlang-questions] Problem attaching a shell to an Erlang node started through SSH

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.g...@erl.io> wrote:

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
André Graf  
View profile   Translate to Translated (View Original)
 More options Jul 6 2012, 4:17 am
From: André Graf <andre.g...@erl.io>
Date: Fri, 6 Jul 2012 10:17:47 +0200
Local: Fri, Jul 6 2012 4:17 am
Subject: Re: [erlang-questions] Problem attaching a shell to an Erlang node started through SSH
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@remote:~/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 <i...@llaisdy.com> wrote:

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

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ivan Uemlianin  
View profile  
 More options Jul 7 2012, 6:31 am
From: Ivan Uemlianin <i...@llaisdy.com>
Date: Sat, 07 Jul 2012 11:31:43 +0100
Local: Sat, Jul 7 2012 6:31 am
Subject: Re: [erlang-questions] Problem attaching a shell to an Erlang node started through SSH
Dear André

Sorry I made a typo in my email (never try to be helpful before
breakfast;).  I should have written:

 >> - this function calls an *init* script instead of calling the
 >> release start directly.

e.g.:

     sudo("webapp start")

Then the shell script "webapp" calls start functions for the python app
and the erlang app (i.e., "/path/to/erlangapp/rel/eappnode/bin/eappnode
start").

 > user@remote:~/test_project/rel/mynode/bin$ sudo ./mynode attach
 > ...

I didn't know about attach!  I've just verified I can ssh onto the
remote machine and attach to the node.

Why is sshing onto the remote machine and attaching better than running
an erlang shell on your local machine and connecting to the remote
machine from there?

Thanks

Ivan

On 06/07/2012 09:17, André Graf wrote:

--
============================================================
Ivan A. Uemlianin PhD
Llaisdy
Speech Technology Research and Development

                     i...@llaisdy.com
                      www.llaisdy.com
                          llaisdy.wordpress.com
               github.com/llaisdy
                      www.linkedin.com/in/ivanuemlianin

               "hilaritas excessum habere nequit"
                  (Spinoza, Ethica, IV, XLII)
============================================================

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
André Graf  
View profile  
 More options Jul 7 2012, 7:38 am
From: André Graf <andre.g...@erl.io>
Date: Sat, 7 Jul 2012 13:38:16 +0200
Local: Sat, Jul 7 2012 7:38 am
Subject: Re: [erlang-questions] Problem attaching a shell to an Erlang node started through SSH
Hi Ivan

Thank you for your reply!
Good question, maybe somebody more experienced can shed some light on that one.

Actually the main reason why I stumbled upon these problems is that I
wanted to start the node using the privbind tool for letting a
non-privileged run-user bind to privileged ports such as 80 or 443. If
I used fabric e.g.
sudo('privbind -u myuser /path/to/my/release/bin/myproject start',
pty=False) the fabric call froze my terminal since the privbind
process will terminate after the Erlang node has terminated (hopefully
never). At this point I have two problems: first, why behaves an
attached shell so weird if you start the node through SSH. Second how
to use privbind within a fabric command. For the first one I can well
live with the workaround through the remote shell. For the second
problem I am on the wrong mailing list.

Cheers,
André

On 7 July 2012 12:31, Ivan Uemlianin <i...@llaisdy.com> wrote:

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

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »