dynamite-ready

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

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

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

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

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. :+1:

Where Next?

Popular in Questions Top

dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement