The s6-fdholder error codes
The following error messages (and corresponding errno codes) can be returned by the s6-fdholderd daemon to its various clients. This page explains why they occur.
- Protocol error (EPROTO) or Protocol wrong type for socket (EPROTOTYPE): the client connected to the wrong kind of server and they cannot communicate. This is generally a programming error. It can also signal a bug in the s6-fdholder tools, but protocol bugs have usually been wiped out before an s6 release.
- Broken pipe (EPIPE): the client was not authorized to connect to the server, which closed the connection. You need to configure the access rights to the server.
- Operation not permitted (EPERM): even though the client was authorized to connect to the server, the specific operation it wanted to perform was denied. You need to configure the access rights to the server.
- Too many open files in system (ENFILE): the client attempted to store more file descriptors than the server can hold. Or, the client attempted to retrieve more file descriptors than it can hold. You should check the -n option to s6-fdholderd, as well as the RLIMIT_NOFILE resource limits used by the client and the server, and adjust them accordingly.
- Resource busy (EBUSY): the client attempted to store a descriptor under an identifier that is already used.
- Filename too long (ENAMETOOLONG): the identifier provided by the client was too long.
- No such file or directory (ENOENT): the identifier provided by the client was not found in the server database.
- Bad file descriptor (EBADF): the client attempted to transmit a closed, or otherwise unsuitable for fd-passing, file descriptor.
- Operation timed out (ETIMEDOUT): the client, or the server, took too long to perform the wanted operation. This is most probably a programming error, because both client and server should have a very fast reaction time. Check that the client is connecting to the right server, and check -t options to both client and server (the argument is interpreted as milliseconds!).
- Other errors indicate a transient error such as lack of memory, hardware failure, etc.
