Comments (8)
FYI I posted a simple Elixir repo which recreates the issue. See https://github.com/andyl/zing
from muontrap.
I'm, unfortunately, not a user of Escripts so I don't know. I had the impression that libraries that supplied port binaries were incompatible with Escripts, but that doesn't sound like the error that you're running into. Hopefully someone lurking can provide a clue.
from muontrap.
Just a thought, but does Application.app_dir/2
work for other libraries with Escripts? I'm not sure what muontrap
would have done to break this that would be unique to it.
from muontrap.
Yeah I think the issue is that Application.app_dir/2
doesn't work with escripts because there is no app directory for dependencies of an escript (although that may not be the 100% correct way of writing that). @andyl if it works for you maybe you could try using https://github.com/burrito-elixir/burrito instead of an script since I think deps will have an application directory then.
Although another alternative is to modify muontrap so it doesn't depend on Application.app_dir/2
and copy the binary manually and pass the path to the binary to muontrap. But that's rather invasive.
But for a partial example of what the calling code for that would look like you can take a look at how I handled it for erlexec:
https://github.com/axelson/ls_proxy/blob/6ae090620f4c1e9c95c403515cda3719f89862b2/ls_proxy/lib/erlexec_init.ex
A third alternative would be use erlexec (or its exexec wrapper) directly since it fulfills a similar goal to muontrap, unless what you needed was the cgroup support.
from muontrap.
+1 to use Burrito instead of Escripts. That will work since you'll be making and running an OTP release.
That's an interesting workaround to Escripts for erlexec. If the only change to muontrap
is to add an option supplying a port binary path and using it in preference to calling Application.app_dir/2
in muontrap
, then that doesn't sound like a big change. (Given that erlexec
works already, though, that does sound like possibly the easiest change.)
from muontrap.
@axelson and @fhunleth - thanks for the guidance. I'll give it a try with Burrito and post here when I have some results.
from muontrap.
From my Linux dev box I couldn't get Burrito to cross compile. I expect because Burrito is new and not yet fully tested.
Other than that Burrito runs MuonTrap as expected & looks like a good workaround!
The MuonTrap / Burrito demo is at https://github.com/andyl/mt_demo
MuonTrap is super nice! Thanks again for the tips.
from muontrap.
Thanks for the update! Burrito is actively being worked on so, I expect it to get better. I really like the Burrito approach for this so I'm going to close this. Let me know if you have any other issues.
from muontrap.
Related Issues (13)
- Attempt to convert args to binaries HOT 3
- Windows support. HOT 4
- Fails to compile when there's a space somewhere in the absolute path HOT 4
- Delay to sigkill HOT 2
- Establishing/Supervising Communications With a Long-Running, Data Streaming Python Process HOT 3
- Muontrap.Daemon Proposal HOT 8
- Log stderr when running a daemon
- No Works with Nerves HOT 3
- cgroup support no longer working on Linux 5.15
- Compiler error on Ubuntu 20.04
- Add test to verify killing chatty processes
- Support new/updated logger levels
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from muontrap.