dynamite-ready
Mix release starts with 'start' but not with 'daemon'
Hi all. First time creating a thread here, please be gentle!
I have an Mix release executable that works fine when started normally, but appears not to run when launched as a daemon. Is this a problem that others have encountered?
When I start it explicitly with start it initialises with no errors, and works as expected. But when started with daemon or daemon_iex it starts with no output and performs none of the actions I expect it to. In fact, the command acts like a no-op on the shell.
Further more, no output of any kind is redirected to the /tmp folders, which is making this issue extremely hard to debug.
Interestingly, the issue I believe I’ve encountered sounds very similar to the one found for Distillery on Github here:
So I suspect there could well be a shared underlying cause.
Any ideas, please?
Edit - Further details, I’d encountered this issue running Elixir 1.9.1 (compiled with Erlang/OTP 20), on Ubuntu 16.0.4 via VirtualBox on Windows. I know VM setups can occasionally mess with common OS settings, and security features, so if that might be a potential issue, advice will be welcome.
Most Liked
dynamite-ready
Added a Github issue:
If anyone’s encountered the same, or a similar thing, would be cool to hear from you.
Wondering if this is actually a BEAM level issue.
sd4code
Well lets see what folder permission you have. In a terminal window:
stat /tmp/log
and
stat /tmp/pipe
I want to see what Access: (#) Uid: (#/user) Gid: (#/user )
What I think is going on is that this program should install its own user and file privileges, and somehow that got overlooked or somehow didn’t happen when it was installed.
If this program doesn’t install its own user, it will not run in daemon mode according to the deamon Unix module in the OS (Ubuntu). The only way for it to run without setting as its own user is to run it as root. But I would not advise that.
yurko
Just checked daemon mode with one of my apps on Ubuntu 18.04, seems to work fine - the app is working and there is output in the tmp directory (just to be clear: it’s not /tmp, but a ./tmp in the release dir).
So if there is an issue it might have to do with the OS running in a VM.
dynamite-ready
Looks like there might be a resolution to this ticket here:
So, if anyone’s running into issues with starting a Mix release as a daemon on a VirtualBox instance, it might be an issue you have to look out for.
Thank you for the help. 







