Remember: GoldenGate is a sequential, binary protocol. Bytes do not lie. When it expects 4 bytes but gets 0, your ear to the rail has detected a break ahead. Stop the train, repair the rail, and resume the journey.
If you are still stuck after this guide, capture the following and contact Oracle Support or your GoldenGate expert:
With this article, you now have both the surgical tools and the strategic vision to conquer OGG-01184. Good luck, and may your trails always be intact.
The error OGG-01184 indicates that an Oracle GoldenGate process (Extract, Pump, or Replicat) encountered a corrupted trail record. Specifically, the process expected to find a 4-byte trailer token at a specific Relative Byte Address (RBA) but found 0 bytes instead, typically because the record length in the trail file does not match the actual data present. Error Breakdown Error Code: OGG-01184
Message: Expected 4 bytes, but got 0 bytes, in trail [path], seqno [number], reading record trailer token at RBA [number].
Primary Cause: Corruption in the trail file. This often happens if a process (like a Pump) tries to read beyond the actual end of a file, or if a network/disk failure caused an incomplete write. Troubleshooting & Resolution Steps Identify the Corruption Point
Note the Trail File Path, Sequence Number, and RBA provided in the error message. ogg-01184 expected 4 bytes but got 0 bytes in trail
Compare the reported RBA against the actual size of the file on the disk. If the RBA is greater than the file size, the process is attempting to read "ghost" data. Verify Process Checkpoints
Use the command INFO [process_name], SHOWCH in GGSCI to see the current read and write checkpoints.
Confirm if the trail file actually exists and isn't a directory mistakenly named after a checkpoint file. Perform a Trail Rollover (If on Source/Pump)
If the source Extract or Pump is the one failing, force it to start a new trail file to skip the corrupted segment:ALTER [process_name], ETROLLOVER.
After rolling over, you may need to reposition the downstream process to the new sequence number. Reposition the Process
If you can afford to skip the corrupted record, reposition the failing process to the next valid RBA or the next trail file sequence:ALTER [process_name], EXTSEQNO [next_seq], EXTRBA 0. Re-read or Regenerate (Last Resort) Remember: GoldenGate is a sequential, binary protocol
If the trail file is severely corrupted and data integrity is critical, you may need to delete and re-add the process or re-extract the data from the source.
Check for disk space issues or network jitter, as these are common environmental causes for trail corruption. Reference Documentation
For further details, consult the Oracle GoldenGate Error Messages Guide or search My Oracle Support (MOS) for Doc ID 1138409.1, which specifically addresses RBA mismatches. OGG-01184 - Oracle GoldenGate Error Messages
Expected 3,number,0 bytes, but got 4,number,0 bytes, in trail 0, seqno 1,number,0, reading record trailer token at RBA {2, Oracle Help Center OGG-01184 - Oracle GoldenGate Error Messages
Expected 3,number,0 bytes, but got 4,number,0 bytes, in trail 0, seqno 1,number,0, reading record trailer token at RBA {2, Oracle Help Center Extract & Pump Abends — oracle-mosc
Here’s a structured incident and troubleshooting report for the Oracle GoldenGate error: With this article, you now have both the
Check the ggserr.log for the exact error line. Note:
Example:
Trail file /ggs/dirdat/mt000001 at offset 626222
There are only a few scenarios that generate a got 0 bytes error in a closed file. We must rule them out like suspects in a lineup.
Suspect 1: The Premature Close (Partial Write) This is the most common culprit. GoldenGate writes to trail files in buffered blocks. Usually, the OS handles the syncing of data to disk. However, if the server experienced a sudden power loss, a kernel panic, or a hard reset exactly while the Extract was writing a record, the file system might have closed the file handle without flushing the final buffer. The file system metadata says the file is size X, but the actual data blocks on the disk only contain data up to size X minus a few bytes. When GoldenGate restarts and re-reads the file, it sees the file size, assumes the data is there, tries to read the header, and hits a void.
Suspect 2: The Third-Party Interloper
Are you using storage replication (SRDF, NetApp SnapMirror) or backup agents (NetBackup, Commvault) that touch the trail files?
I have seen cases where a backup agent puts a "freeze" or a snapshot lock on the file system. If the lock interrupts the I/O syscall mid-stream, or if the snapshot creates a "sparse file" (where the backup software didn't capture the tail end of the growing file correctly), GoldenGate reads the copied trail and finds it truncated.
Alternatively, if someone manually copied the file (via cp or scp) without locking the writer, and the Data Pump process was reading from that copy, the copy might represent a version of the file that existed before the last write completed.
Suspect 3: The Storage Liar (Disk Corruption) This is the nightmare scenario. The disk array reported a "write success" to the OS (and thus to GoldenGate), but due to a firmware bug or a dying sector, the data never actually committed to the platter. The file size metadata was updated, but the actual payload was lost. This is rare but fatal.
When you see this error, follow these diagnostic steps before attempting any fix.