-
-
Notifications
You must be signed in to change notification settings - Fork 756
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
exec /opt/_slim/bin/slim-sensor: no such file or directory #742
Comments
Thank you for opening the issue @MartinLoeper ! TLDR on the error ( Quick Do you mind sharing a bit about your setup. How did you install the tool in your Nix environment? The Docker volume creation logic might have a problem if the sensor binary ends up being located where it can't find it, which might explain why the Docker volume is missing |
Hi @kcq. Thanks for your detailed explanation! I have a standard nix setup and install docker-sim via the official nixos package: The slim and slim-sensor binaries are located in the same nix store path under the bin folder. Can you help me bring the slim-sensor binary into the container mount? What is the program argument to do that? |
Thanks for the additional context @MartinLoeper ! Can you also enable trace logging to see if we can catch any extra info when the Docker volume create logic for the sensor runs. This can be done with the global Can you also try the latest/mint version. There was a symlink related problem a while back, which might be relevant here... because Nix does a lot of its magic with symlinks :-) How is Docker installed/configured in your Nix environment? Do you have a special user group for it? Do you need to run the Docker commands with 'sudo'? |
Thanks for the instructions @kcq!
Is there something in the error message to proceed debugging. Thanks again :) |
@MartinLoeper the trace output confirms that the volume creation logic is ok. That's good to eliminate this as the source of failure. We also have the volume name here ( Let's list files in the Docker volume next to see what's inside (assuming the volume name is The goal is to see if there are any files there and if the sensor file is there the goal is to see the file size, which should indicate if we have a symlink or an actual file. |
=) |
That's interesting... 5MB sensor means that it's definitely not a symlink :) |
@MartinLoeper the next thing we can try is the |
Hi @kcq, Thanks again for your help! Unfortunately I cannot make the I noticed another thing though: I inspected the slim-sensor binary using readelf. It shows a program interpreter of I do not understand how this is supposed to work and how the official NixOS package ever worked. I think will have to go and open an upstream issue. Since nixos does not adhere to Linux FSH, I cannot imagine how copying a nixos executable into a non-nixos docker image is supposed to work. What do you think @kcq? It looks like the binary is there in the docker container, it is also executed but the loader fails as it is pointing at a path on the host machine which is not available in the container. Maybe I could patch the loader manually though to make it work until it is fixed upstream... |
@MartinLoeper are you passing the Sounds like you are onto something... It appears that the Nix installer A workaround for it would be downloading the sensor binary yourself and creating a Docker volume yourself with that clean non-nixified binary and then naming the volume what the slim app expects its to be. |
Wait so mint is the successor of this repository or how are they connected?
I'll ask the maintainers and link to this issue upstream.
Will do that! |
@kcq I managed to copy one of the latest gh releases into the volume manually and it worked. I think a solution would be to statically compile the slim-sensor binary. Was that the case in the past? I asked on nixpkgs upstream how the nix package ever worked. One answer could be that previous versions were statically linked. Could you give me a hint how to enable static linking? Is it just |
Thank you for putting in the extra effort @MartinLoeper ! Great to hear that the solution worked! The sensor in the official builds has always been statically compiled (e.g., the I've been thinking about embedding the sensor binary in the main app. The overall UX will be nicer too and the Nix problem would be avoided. There's been a number of support requests that were the result of the sensor not being in the right place, the sensor binary being outdated and the sensor volume creation problems (due to symlinks and other gotchas). The build process becomes messier and more complicated though (but still doable :-)). The other option I've been considering is publishing pre-created volumes to a container registry either as non-image artifacts or as images that have only sensors in them. In a way, the second option is sort of there because for each release there's a containerized version published to DockerHub and the sensor binaries can be extracted from those container images. |
I have to thank you for pointing me into the right direction!
That is interesting! It is apparently not the case for the NixOS binary, see:
I am going the create a PR to fix that!
It is good to see that you have ideas to make the whole usage experience smoother! I cannot comment on that since I have no idea how you could go about embedding the sensor binary. :D
I did not know that is possible either. Definitely keen to see this setup. =) |
Upstream NixOS PR: NixOS/nixpkgs#373029 I gonna close this issue soon when I get approval for the PR and they confirm that my change works. |
This is great! Thank you for doing the PR there! I'd also recommend updating the repo it's pointing to so it picks up the latest/newest enhancements (quite a few of those :-)) |
Good point. Going to open a separate PR for the version bump. |
Thank you for doing that! No changes with the flags. |
merged upstream |
@kcq You mentioned the new mint codebase. Should I update the code references for the NixOS package to use the mint repository instead of this one? Is there something with regards to naming that must be adjusted or is it effectively just the repository location that changed? I need your statement here to justify my NixOS Pull Request if I gonne change the whole repository URL instead of only the tag. |
@kcq I just saw that the whole binary name changed to mint. That is probably an issue since the package is not backward compatible due to that. I also cannot create a new package called mint since there is already an existing one. |
Expected Behavior
Successful
slim build
command execution.I am trying to build an alpine image.
Actual Behavior
Error:
exec /opt/_slim/bin/slim-sensor: no such file or directory
Specifications
The text was updated successfully, but these errors were encountered: