ENXIO Error When Opening Host FIFO File from Docker Container
Opened this issue · 1 comments
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:
- Start
dlt-daemon
on the host with the FIFO file located at/tmp/dlt
. - Run a Docker container with the host's
/tmp/dlt
directory mounted inside the container using-v /tmp/dlt:/tmp/dlt
. - 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 withopen(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 thedlt-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.
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