Informix Error -842: Cannot read temp file.
Cause and resolution
Cannot read temp file.
Informix SQL created a temporary file; now it is trying to read back the temporary file. However, it received an unexpected operating-system return code. Possibly you or another user removed the file, or possibly a hardware error occurred.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-842 fires when the interactive tool, trying to read back a temporary file it created earlier, gets an unexpected OS-level return code — per the official guidance, two possibilities: the file was removed (by the current user or someone else), or a hardware error occurred.
- The temp file removed (by the user, another user, or an automated cleanup process) before the tool tried to read it back, per the official guidance.
- A hardware error affecting the storage holding the temp file, per the official guidance.
Solutions / Resolution
- Check whether the temp file still exists, if its location and name are known, to confirm
whether removal is the cause:
ls -l /tmp/ # or wherever the tool's temp files are configured to live - Check for hardware-level errors on the filesystem holding the temp directory:
dmesg | tail -50 - Retry the operation, since a removed temp file is often the result of a one-time external action (a cleanup script, another user) rather than a persistent condition.
- If hardware errors are found, escalate to whoever administers the underlying storage.
Examples
Checking for OS-level hardware errors
$ dmesg | tail -50
Diagnostic Checks
- Check whether an external process/user removed the temp file.
- Check for hardware-level errors on the underlying storage if removal doesn't explain it.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -842 in this set yet.
Check whether the temp file was removed externally first, then check for hardware errors on the underlying storage.