8. Troubleshooting and Debugging
8.2 Failures During c-treeACE Operation
8.2.7 Errors Occur When Reading or Writing c-tree Files
Error description:
Seek error. A file seek operation on a c-tree data or index file failed.
Possible causes:
A file seek operation can fail for various reasons, including disk media errors or an invalid file descriptor.
Troubleshooting steps:
In the event of a SEEK_ERR, the c-tree Server logs the following message to CTSTATUS.FCS:
SEEK_ERR... <filename>
where <filename> is the name of c-tree data or index file for which the seek operation failed. When a c-tree Plus API function returns c-tree error 35, check the value of the c-tree global variable sysiocod, which contains the system error code returned by the failed seek operation. The interpretation of the system error code can explain the cause of the failed seek operation.
c-tree Error 36: READ_ERR
Error description:
Read error. A file read operation on a c-tree data or index file failed.
Possible causes:
A file read operation can fail for various reasons, including disk media errors and inaccessible files due to locking by external applications.
Troubleshooting steps:
When a c-tree Plus API function returns c-tree error 36, check the value of the c-tree global variable sysiocod, which contains the system error code returned by the failed file read operation. The interpretation of the system error code can explain the cause of the failed read operation.
c-tree Error 37: WRITE_ERR
Error description:
Write error. A file write operation on a c-tree data or index file failed.
Possible causes:
A file write operation can fail for various reasons, including disk media errors, insufficient disk space, and inaccessible files due to locking by external applications.
Troubleshooting steps:
When a c-tree Plus API function returns c-tree error 37, check the value of the c-tree global variable sysiocod, which contains the system error code returned by the failed file write operation. The interpretation of the system error code can explain the cause of the failed write operation.
c-tree Error 39: FULL_ERR
A FULL_ERR (39) error means a file is at it's capacity size limit, and there's no space available to add additional records. For a non-HUGE file, this is not easy to resolve. You will need to convert it to a HUGE file, and rebuild all indexes. The ctcv67 utility helps in this case.
>ctcv67 <file.dat> <path/to/new/file.da> H yes
The file will need to be taken offline while conversion takes place. It is a standalone utility, and can not run while the file remains under server control.
c-tree Error 40: KSIZ_ERR
Error description:
Index node size too large. The c-tree Server was not able to open the specified index file, superfile, or variable-length data file because the page size used when creating the file is larger than the server’s current page size. The page size determines the maximum supported index node size.
Possible causes:
The file was created using a larger PAGE_SIZE setting than the server is currently using. This situation can arise if the file was created by a server or a standalone c-tree utility that is configured to use a smaller page size than the server is currently using, or if after the file was created the PAGE_SIZE setting was changed and the server was restarted.
Troubleshooting steps:
To resolve this error, either:
1. Re-create the file (by rebuilding or compacting the file) using the page size setting currently used by the c-tree Server, or
2. Change the server’s PAGE_SIZE setting to ensure it is at least as large as the page size used when creating the file and restart the c-tree Server.
Note: A c-tree superfile has stricter page size requirements than a c-tree index has. A superfile can only be opened by a server who’s PAGE_SIZE exactly matches the page size used when creating the superfile. See the discussion of c-tree error 417 for details.
c-tree Plus ODBC Driver
c-tree Plus ODBC Driver users may experience error 40 when an application’s index file is using a page size larger than allocated by the ODBC driver. To adjust this, access the Windows ODBC Data Source Administrator.
Note: To configure the 32 bit ODBC driver with 64 bit versions of Windows, you must access the ODBC Data Source Administrator from the following
directory: %WINDIR%\syswow64\odbcad32.exe
In the ODBC Data Source Administrator window, select the FairCom 32bit driver and click Configure. When the configuration window is displayed, click the Options button.
The page size used by the driver is calculated by multiplying the Sector Size shown in this window by 128 bytes. Try increasing the Sector Size from 16 up to 32, then 64. Be sure to close your ODBC compliant application and reconnect after each change to the ODBC driver
configuration.
If this doesn't work, you may need to rebuild the index files. It's possible a corrupted index file (typically caused by a system coming down without the files being closed first) could be cause this error.
c-tree Error 49: FSAV_ERR
Error description:
Could not save file. In some situations, the c-tree Server must ensure that all writes that have been issued to the filesystem for a c-tree data or index file have been flushed to disk. The server accomplishes this by issuing a “save” operation on the file, which involves a system call that forces the filesystem to write to disk all unwritten filesystem buffers for the file. If this flush fails, the server returns c-tree error 49.
Possible causes:
A file flush operation can fail for a variety of reasons such as a disk media error, insufficient disk space, or a loss of connectivity to network storage system.
Troubleshooting steps:
When a save operation fails, the c-tree Server logs the following message to CTSTATUS.FCS:
ctsave failed: system code = <err> lc = <loc> fd = <fd> <filename>
where <err> is the system error code returned by the failed flush call, <loc> is a c tree Server location code, and <filedesc> is the file descriptor passed to the flush call. Check the
interpretation of the system error code to determine the reason why the flush call failed.