-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nodes fail to start on Ubuntu 16.04 (different sudo setup) #827
Comments
@vstax Thanks for your report. I've investigated it then recognized reproducing the same situation on Ubuntu-16.04.3 as below: $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
$ sudo -u leofs sh
$ echo $HOME
/home/yosuke
# sudo -u leofs sh
$ echo $HOME
/root
$ sudo -H -u leofs sh
$ echo $HOME
/home/leofs We need to adopt your fixed code to fix, and before publishing the packages of a new version, we need to test them on each platform manually/automatically. |
Confirmed on the below env.
|
The problem is fixed in 1.3.7, this issue just has no tag so it didn't make it to changelog:
|
I've just recognized it, so I'm going to add this issue on v1.3.7's changelog. |
I've added this issue on v1.3.7's changelog as follows: |
On freshly installed Ubuntu 16.04 (server edition), this happens (please ignore "1.3.3" version, as I'm testing upgrades from various versions to the latest ones. This problem happens on all current versions):
One cannot start nodes in default setup. The reason is that after launch script executes "sudo" to run as "leofs" user, $HOME still points to /root, so Erlang tries to pick cookie from
/root/.erlang.cookie
instead of/usr/local/leofs/.erlang.cookie
. This wasn't the case on earlier Ubuntu version and not the case on Debian 8 and EL6/7, and caused by default system sudo settings. The solution is to add "-H" option to sudo which makes $HOME correctly on any system:From sudo man page:
Fixing this bug by changing "launch.sh" - adding "-H" to sudo invocation (vstax@8334b8f) seems important, however this will probably require testing on various systems (just launch test of any node). I've checked that it fixes launch script on Ubuntu 16.04 and doesn't change anything for Debian 8, EL6 and EL7. According to man page, "sudo -H" exists and should work as supposed to on Solaris 11 and FreeBSD 10 as well, I checked that launch command works after this change, though I didn't run a real node on these systems.
One thing that bugs me is when did this problem appeared? Did it always exist on Ubuntu 16.04 after changing script to run as "leofs" user? Or it's specific to Ubuntu 16.04 server, or just to my installation (which was more or less default installation from "current" 16.04 server amd64 image). If it happens on any kind of Ubuntu 16 - is some automated testing performed to make sure nodes can launch on various systems before release?
The text was updated successfully, but these errors were encountered: