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

ENXIO Error When Opening Host FIFO File from Docker Container #617

Open
san-tekart opened this issue Apr 1, 2024 · 1 comment
Open

ENXIO Error When Opening Host FIFO File from Docker Container #617

san-tekart opened this issue Apr 1, 2024 · 1 comment

Comments

@san-tekart
Copy link

Description:
I am experiencing an issue where my application, running inside a Docker container, fails to send DLT logs to the dlt-daemon running on the host system. Specifically, the application encounters an ENXIO (No such device or address) error when attempting to open the DLT daemon FIFO (/tmp/dlt) for writing, despite the FIFO being correctly mounted and accessible within the container. The following message is outputted when executing dlt_register_application.

"[846134.595925]DLT 30~INFO ~FIFO /tmp/dlt cannot be opened. Retrying later..."

Steps to Reproduce:

  1. Start dlt-daemon on the host with the FIFO file located at /tmp/dlt.
  2. Run a Docker container with the host's /tmp/dlt directory mounted inside the container using -v /tmp/dlt:/tmp/dlt.
  3. Inside the Docker container, attempt to register a DLT application and send logs via the dlt_register_app function, which internally tries to open the FIFO file with open(dlt_daemon_fifo, O_WRONLY | O_NONBLOCK | O_CLOEXEC).

Expected Behavior:
The application running inside the Docker container successfully opens the FIFO file and sends logs to the dlt-daemon running on the host.

Actual Behavior:
The open() call for the FIFO file fails with errno set to 6 (ENXIO), indicating "No such device or address", preventing the application from sending logs to the host's dlt-daemon.

Environment:

  • DLT Daemon version: [specify version]
  • Docker version: [specify version]
  • Host OS: [specify OS and version]
  • Container base image: [specify image]

Additional Context:

  • The FIFO file /tmp/dlt exists on the host and is correctly identified as a FIFO.
  • The same FIFO file is mounted inside the Docker container with correct permissions (prw-rw-rw-).
  • Manual tests with echo "test" > /tmp/dlt from the host work as expected, indicating that the dlt-daemon is correctly processing logs sent to the FIFO.
  • Similar manual tests from within the Docker container do not show any visible error but do not result in logs being processed by the dlt-daemon.

I suspect this issue may involve how Docker containers interact with FIFO files or a potential race condition with dlt-daemon initialization. Any insights or suggestions on how to address this problem would be greatly appreciated.

@minminlittleshrimp minminlittleshrimp self-assigned this Apr 9, 2024
@minminlittleshrimp
Copy link
Collaborator

Hello @san-tekart
this is a known issue and we have some idea to overcome. I will create PR for this as a request.
Nice to have this issue on my list, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants