Informix Error -45
-45 Operation not supported on socket.
An operating-system error code with the meaning shown was unexpectedly returned to the database server. If the error recurs, note all circumstance, and contact IBM Informix Technical Support.
Oninit® Troubleshooting Guidance
This is an operating-system error number, not an Informix diagnosis.
The same errno is returned by many different operations, so on its own it says what the operating system refused, not what Informix was trying to do. Informix will usually have reported a more specific error alongside it — in the message log, in the SQL or ISAM error pair, or in the accompanying assert failure — and that error normally defines the real cause far more precisely than the errno does. Find it before diagnosing from this number alone.
This matters less than it used to. Later versions of the engine trap many of these conditions and report them as specific Informix errors naming the operation, the object and the context, so a bare errno in this range is increasingly a sign of an older version, an unusual code path, or a failure early in startup before the better reporting is available. If you are seeing one on a current version, the more specific error is worth looking for even harder.
Important platform note. Error codes in this range represent operating-system
errnovalues whose meanings vary between Unix platforms and versions. Confirm the nativeerrnodefinition on the server where the Informix error occurred before diagnosing the problem from the number alone.
Determine the Native Error Meaning
| Value | Symbol | |
|---|---|---|
| Catalogue text — Operation not supported on socket | 45 | EOPNOTSUPP on BSD |
| The same condition on Linux | 95 | EOPNOTSUPP (also spelled ENOTSUP) |
| Errno 45 on Linux | 45 | EL2NSYNC — Level 2 not synchronized, STREAMS-era |
Codes -42 to -55 are the BSD socket block and each sits 50 higher on Linux.
python3 -c 'import os; print(45, os.strerror(45)); print(95, os.strerror(95))'
What EOPNOTSUPP Actually Tells You
The object exists and the operation is real — this particular object does not support it.
The catalogue's wording restricts it to sockets, and on BSD that is where it originates. On Linux errno 95 is broader and appears well outside networking, which matters because it is one of the more useful errors in the set once you know where to look for it.
The distinction from the errors it is confused with is exact, and worth holding because the remedies are completely different:
| Error | Symbol | Meaning |
|---|---|---|
| -45 | EOPNOTSUPP |
The operation exists; this object will not do it |
| -38 | ENOSYS |
The operation does not exist on this kernel |
| -42 | ENOPROTOOPT |
The option does not exist for this protocol |
| -22 | EINVAL |
The arguments are not acceptable |
ENOSYS against EOPNOTSUPP is the pair that matters. fallocate() returning ENOSYS means the kernel has no such call; returning EOPNOTSUPP means it has one and this filesystem will not preallocate. The first is an environment problem, the second is a "move the file" problem. See -38, where the same contrast is set out from the other side.
What This Means in Informix
Two quite separate contexts, and the socket one is the less likely on the platforms Informix runs on.
Filesystem operations — the realistic case on Linux
Errno 95 is what a filesystem returns when it cannot perform an operation the kernel supports:
fallocate()on a filesystem without preallocation. Creating or extending a cooked chunk on a filesystem that does not implement it — some network filesystems, some gateway and overlay filesystems, and older or unusual local ones.- Direct I/O where the filesystem will not support it.
DIRECT_IOenabled against a filesystem that declinesO_DIRECTis a configuration that will not do what it says. - Extended attributes, reflinks or hole-punching where a tool assumes a capability the filesystem lacks.
- A container overlay filesystem, which commonly lacks capabilities the underlying filesystem has — the same image on the same host behaves differently inside and outside.
The signature is that the same operation works in one directory and not another, because the two are on different filesystems.
Socket operations
The original meaning, and mostly a programming error rather than a runtime condition: accept() on a socket that is not listening, listen() on a datagram socket, or a stream operation on a socket type that does not support it. In an Informix context that means custom code — a UDR, a wrapper, or a client library — rather than the engine.
Common Causes
- A filesystem that does not support preallocation, met when a cooked chunk is created or extended.
DIRECT_IOconfigured against a filesystem that will not do direct I/O.- A container overlay filesystem lacking a capability the host filesystem has.
- A network filesystem without the operation the caller assumed.
- A socket operation wrong for the socket type, in custom code.
- A tool assuming a capability — reflinks, hole punching, extended attributes — that the target filesystem lacks.
Diagnostic Checks
Confirm the symbol, since errno 45 on Linux is a STREAMS value and unrelated:
python3 -c 'import os; print(45, os.strerror(45)); print(95, os.strerror(95))'
Find the failing call, and read the errno beside it. This is what separates -45 from -38, and nothing else does:
strace -f -e trace=fallocate,openat,fcntl,setsockopt,accept -p <pid> 2>&1 | grep -iE 'EOPNOTSUPP|ENOTSUP|ENOSYS'
Identify the filesystem under the path:
findmnt -T /path/to/object -o TARGET,SOURCE,FSTYPE,OPTIONS
stat -f -c '%T %n' /path/to/object
Test the specific capability directly rather than inferring it from the filesystem type:
fallocate -l 1M /path/to/dir/.fatest && echo "preallocation OK" || echo "NOT SUPPORTED"
rm -f /path/to/dir/.fatest
python3 - <<'EOF'
import os
p = "/path/to/dir/.dio"
try:
fd = os.open(p, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600)
os.close(fd); os.unlink(p); print("O_DIRECT OK")
except OSError as e:
print("O_DIRECT not supported:", e)
EOF
Two short tests that answer the question definitively, in the exact directory that matters.
Check the engine's I/O configuration against what the filesystem will actually do:
grep -nE 'DIRECT_IO|VPCLASS|AUTO_TUNE' "$INFORMIXDIR/etc/$ONCONFIG"
onstat -d
tail -300 "$INFORMIXDIR/tmp/online.log"
In a container, test inside the container, not on the host — the overlay is the filesystem that matters:
findmnt -T /path -o FSTYPE # expect overlay
Solutions / Resolution
- Read the errno precisely.
EOPNOTSUPPmeans move the object to a filesystem that supports the operation;ENOSYSmeans the kernel has no such call at all. Confusing the two sends the work to entirely the wrong place. - Test the capability in the directory that failed, using the two tests above. Filesystem type is a poor proxy — mount options and the kernel version both change the answer.
- If
DIRECT_IOis configured against a filesystem that will not do it, that configuration is not doing what it claims. Either move the chunks or change the setting deliberately, rather than leaving a parameter set that the storage silently ignores or rejects. - Do not place cooked chunks on a filesystem lacking the capabilities the engine expects. The error at creation time is the cheapest warning you will get; the alternative is discovering it under load.
- In containers, check the overlay rather than the host filesystem. An image that works on the host can fail inside it, and neither is misconfigured.
- For socket operations, the fault is in the calling code. A stream operation on a datagram socket is a defect, not a configuration.
Example
The same operation works in one directory and not another
$ fallocate -l 1M /informix/chunks/.fatest && echo OK
OK
$ fallocate -l 1M /mnt/nfschunks/.fatest
fallocate: fallocate failed: Operation not supported
$ findmnt -T /mnt/nfschunks -o FSTYPE,SOURCE
FSTYPE SOURCE
nfs4 nas01:/vol/ifx
Local filesystem supports preallocation; the NFS mount does not. The kernel has fallocate — it is this filesystem that declines, which is why the errno is EOPNOTSUPP and not ENOSYS.
Where a chunk was to be created on that mount, the filesystem is the thing to change.
Platform Note
| Platform | This condition | Errno 45 there means |
|---|---|---|
| Linux | errno 95 | EL2NSYNC — STREAMS-era, unrelated |
| Solaris, AIX, HP-UX | confirm on the host | confirm on the host |
| BSD, Darwin | errno 45 | this condition |
Linux uses errno 95 for both EOPNOTSUPP and ENOTSUP, so the two names describe one value and the distinction between them is not observable from the number.
| Task | Linux | Solaris | AIX |
|---|---|---|---|
| Trace the call | strace -f |
truss -f |
truss -f |
| Filesystem type | findmnt, stat -f |
df -n, fstyp |
lsfs, df |
| Preallocation test | fallocate |
mkfile, filesystem-dependent |
filesystem-dependent |
fallocate(1) is Linux-specific; on the other platforms test the capability through the application path rather than with a utility.
Related Errors / Related Topics
- -38 — on Linux,
ENOSYS. The operation does not exist rather than being unsupported here. The pair to keep straight, and the reason to read the errno rather than the message. - -42 — Option not supported by protocol, where a socket option rather than an operation is refused.
- -22 — Invalid argument, where the operation is supported and the arguments were not acceptable.
Where this error appears against a file path, test the capability in the failing directory. Two commands establish whether the filesystem is the constraint, and that decides whether anything about the database needs to change at all.