Skip to content
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

Question: Error: IoError(Os { code: 21, kind: Other, message: "No such file or directory" }) in Docker #53

Closed
Deverall opened this issue Jul 29, 2020 · 14 comments
Labels
question Further information is requested

Comments

@Deverall
Copy link

Describe the bug
If anyone can assist with this I would greatly appreciate it. I am very green when it comes to Docker and Containers, but am trying to learn. I just cannot find any help with this anywhere. When using the following CMD to load the image to a container using Portainer and Container Station on QNAP (even directly via SSH):

docker run --rm -p 9554:8554 -v /neolink.conf:/etc/neolink.conf mr2jzgte/neolink
or
docker run --rm -p 9554:8554 -v /neolink.conf:/etc/neolink.conf thirtythreeforty/neolink
or
docker run
-p 8554:8554
--restart=on-failure
--volume=$PWD/config.toml:/etc/neolink.toml
thirtythreeforty/neolink

I receive the following errors:
Error: IoError(Os { code: 21, kind: Other, message: "Is a directory" })
or
Error: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })

To Reproduce

  1. I have tried using the GUI in Container Station with with loaded thirtythreeforty/neolink:latest docker image (loads ENV and CMD info into Container Station) as well as mr2jzgte/neolink and the containers build, but then powers off immediately and in the log I get the error listed above.
  2. I tried loading both images into a container via Portainer with the same results.
  3. I also SSH'd into the QNAP and ran the commands manually resulting in the same error.

Expected behavior
For the Docker image to load into the container and run properly without any errors.

Versions
Neolink software: latest
Reolink camera model and firmware: D800 with latest firmware

@Deverall Deverall added the bug Something isn't working label Jul 29, 2020
@QuantumEntangledAndy
Copy link
Collaborator

The docker is trying to read the file neolink.conf and mount it at /etc/neolink.conf. Do you have the file neolink.conf outside of your container ready for mounting?

@QuantumEntangledAndy
Copy link
Collaborator

QuantumEntangledAndy commented Jul 30, 2020

Googling around for info on the container station I think you may need to use a shared folder with the neolink.conf in and set it up as shown in here. I am not an expert on this though.

@QuantumEntangledAndy
Copy link
Collaborator

If you use container station though is it not being hosted externally? I don't expect this method to be able to connect to your camera on your local LAN

@QuantumEntangledAndy
Copy link
Collaborator

Perhaps I am misunderstanding container station though

@QuantumEntangledAndy
Copy link
Collaborator

QuantumEntangledAndy commented Jul 30, 2020

Oh I see wiki on QNAP suggests you have a box running on your local LAN ok I think I understand now.

But I think your issues if that you have not got the config setup for mounting, please correct me if this is not the case

@Deverall
Copy link
Author

The docker is trying to read the file neolink.conf and mount it at /etc/neolink.conf. Do you have the file neolink.conf outside of your container ready for mounting?

Yes I have the modified neolink.conf file that I thought I manually copied to the /etc folder. I understand a bit about linux, but the file structure sometimes gets me.

@QuantumEntangledAndy
Copy link
Collaborator

So you've manually put it inside the container at /etc/neolink.conf?

If that's the case you don't need


-v /neolink.conf:/etc/neolink.conf 

Since this line of code is saying:

Find /neolink.conf outside the container and put it inside the container at /etc/neolink.conf

I think that you were getting errors because it wasn't able to find /neolink.conf outside the container

@Deverall
Copy link
Author

I guess I didn't put it manually in the container no. Just in the filesystem as I thought it would copy it over with that command. I think I was also getting the.toml and .conf confused with each other. I dont actually have a .conf file anywhere that I have created or modified, only the neolink.toml.

@Deverall
Copy link
Author

When importing the image into container station these are the defaults based on the imported docker image.
2020-07-30_08-16-21
2020-07-30_08-16-44
2020-07-30_08-17-02
2020-07-30_08-17-17

@Deverall
Copy link
Author

I have also modified it to what is below and get the following in the console when trying to start the container.
2020-07-30_08-28-14
2020-07-30_08-29-07

@Deverall
Copy link
Author

I placed my modified neolink.toml config file in the Qnap's file dir /usr/local/bin/neolink (because it looks like the command is looking there for the file to copy over to the container file structure /etc/). Maybe I am just not understanding the file structure properly?

@QuantumEntangledAndy
Copy link
Collaborator

Mind you I'm not a docker expert. I was just reading the manual on the -v switch. Perhaps someone who is an expert can comment.

@thirtythreeforty thirtythreeforty added question Further information is requested and removed bug Something isn't working labels Jul 30, 2020
@Deverall
Copy link
Author

I think I got it figured out for the most part and the container is actually running now. It was having an issue with -v switch and pulling the config from the right path. Thanks for your help in at least pointing me in the right direction, I appreciate it!

@Deverall
Copy link
Author

I placed the modified .toml config in root and used the following command to launch:

docker run -p 8554:8554 --restart=on-failure --volume=$PWD/neolink.toml:/etc/neolink.toml thirtythreeforty/neolink

QuantumEntangledAndy referenced this issue in kevin-david/neolink May 19, 2023
…feature/pir

Rework PIR data and fetch status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants