unable to "nitrogen start" on a vps as normal user

25 views
Skip to first unread message

Franklin Brauning

unread,
Nov 23, 2016, 10:41:06 AM11/23/16
to Nitrogen Project / The Nitrogen Web Framework for Erlang
I'm installing a demo in a vps (opensuse 13)

The app should run in port 8000

In the user shell (non-root) "nitrogen console"  launches the server correctly (I can see the website)
But "nitrogen start" doesnt launch the website. The log directory doesnt contain anything related to
this. On the other side, there are pipes created

~/instalacion> ls /tmp/****//home/****/instalacion/  -l
total 0
prw-r--r-- 1 salud users 0 Nov 23 15:30 erlang.pipe.1.r
prw-r--r-- 1 salud users 0 Nov 23 15:30 erlang.pipe.1.w

tryng again creates more pipes but there are no hints of erlang running (nitrogen ping shows nothing)

If I do "nitrogen start" as root it works, but I want to run as an unprivileged user to minimize
attack surface

The firewall service is down, and I don't know what else I'm missing

If anyone has some clue on this I can provide ssh access to solve this






Jesse Gumm

unread,
Nov 23, 2016, 2:11:16 PM11/23/16
to nitrogenweb
Hey Franklin,

My gut is telling me that maybe the first time the pipe files were created in tmp, they were made as root, and now the non-root user doesn't have permission to write to that directory.

As root, wipe out that /tmp/username/home directory and then retry running the app to see if that gets it going.

-Jesse

--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb+unsubscribe@googlegroups.com.
To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.



--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

Franklin Brauning

unread,
Dec 1, 2016, 7:36:09 PM12/1/16
to Nitrogen Project / The Nitrogen Web Framework for Erlang
So, this is what is happening on that VPS.
I modified the launcher script to skip that -daemon argument so error messages
go to stdout.

***@***:~/instalacion> bin/nitrogen start
/home/***/instalacion/erts-7.3/bin/run_erl -daemon /tmp/*****//home/****/instalacion/ /home/****/instalacion/log exec /home/****/instalacion/bin/nitrogen console ''
run_erl:188 [5049] Fri Dec  2 00:12:13 2016
errno=1 'Operation not permitted'
Could not open pty master

DuckDuckGoing I've found I'm in the same problem this guy mentions
in this post http://erlang.org/pipermail/erlang-questions/2014-September/081109.html
(that threaded wasn't solved either).

Sadly the venerable distro I trust is not offered as a VPS option :(

I'm afraid at this point I can't put my own projects in production.





On Wednesday, November 23, 2016 at 4:11:16 PM UTC-3, Jesse Gumm wrote:
Hey Franklin,

My gut is telling me that maybe the first time the pipe files were created in tmp, they were made as root, and now the non-root user doesn't have permission to write to that directory.

As root, wipe out that /tmp/username/home directory and then retry running the app to see if that gets it going.

-Jesse
On Wed, Nov 23, 2016 at 9:41 AM, Franklin Brauning <braun...@gmail.com> wrote:
I'm installing a demo in a vps (opensuse 13)

The app should run in port 8000

In the user shell (non-root) "nitrogen console"  launches the server correctly (I can see the website)
But "nitrogen start" doesnt launch the website. The log directory doesnt contain anything related to
this. On the other side, there are pipes created

~/instalacion> ls /tmp/****//home/****/instalacion/  -l
total 0
prw-r--r-- 1 salud users 0 Nov 23 15:30 erlang.pipe.1.r
prw-r--r-- 1 salud users 0 Nov 23 15:30 erlang.pipe.1.w

tryng again creates more pipes but there are no hints of erlang running (nitrogen ping shows nothing)

If I do "nitrogen start" as root it works, but I want to run as an unprivileged user to minimize
attack surface

The firewall service is down, and I don't know what else I'm missing

If anyone has some clue on this I can provide ssh access to solve this






--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb...@googlegroups.com.

To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.

Jesse Gumm

unread,
Dec 2, 2016, 8:42:10 AM12/2/16
to nitrogenweb
I'll try putting Opensuse 13 on virtualbox on my machine to see if I can't reproduce it with that.

To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb+unsubscribe@googlegroups.com.

To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.

Franklin Brauning

unread,
Dec 2, 2016, 1:38:23 PM12/2/16
to Nitrogen Project / The Nitrogen Web Framework for Erlang
I could give you access to the vps

Franklin Brauning

unread,
Dec 7, 2016, 1:09:20 PM12/7/16
to Nitrogen Project / The Nitrogen Web Framework for Erlang
OK I could solve this

If anybody has this kind of problems, check the /etc/fstab file
for a /dev/pts mount: comment that, udev (or **** systemd, I guess) will by itself mount it with
sane parameters.

Jesse Gumm

unread,
Dec 7, 2016, 1:47:25 PM12/7/16
to nitrogenweb
Oh fantastic!

Sorry I didn't get back to you, but I'm very happy to hear you discovered the problem.

Honestly, I don't think me getting into your system would have found that solution anyway :)

Something worth making a note of for troubleshooting on opensuse.

Thanks for the followup,

-Jesse

To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb+unsubscribe@googlegroups.com.

To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages