Troubleshooting
Problem
Diagnosing The Problem
Basic setup verification
Does cwbping work?
$ /opt/ibm/iaccess/bin/cwbping <IBM_i_SystemName>Check the list of available ODBC DSNs with the following command:
$ odbcinst -q -s Is the isql utility included with unixODBC able to re-create the failure?
For example,
$ isql <DSNname> <IBM_i_UID> <IBM_i_PWD>Then, enter an SQL statement. For example,
SELECT * FROM QIWS.QCUSTCDT
Resolving The Problem
Diagnostic material needed
- Any error messages generated by ODBC applications.
- SQL.log generated by unixODBC
- CWBTRC trace
- CWBMEDIC archive
The SQL.log and cwbtrc traces explained in the following text must be taken concurrently.
1. How to gather SQL.log
Execute the following to find where the odbcinst.ini file is located:
$ odbcinst -jAn SQL.log trace is enabled by adding the following section to the end of the odbcinst.ini file:
[ODBC]
Trace = Yes
TraceFile = /tmp/sql.log
ForceTrace = No
Pooling = No
The ODBC application to be traced must be started after you add the ODBC trace section to the odbcinst.ini file. If you are tracing an Apache application, HTTPd must be restarted for the change to take effect.
Be sure to set "Trace = No" when finished.
2. How to gather cwbtrc
Execute the following to turn on a Detail Trace.
$ cwbtrc /DT:1 /DFLTR:1 /DCOMP:Configuration,Communication,Comm-API,Comm-SPI,Comm-System,Comm-Base,NLS,ODBC,ODBC-Error,Service,Security
Use the following to command turn off the cwbtrc trace.
$ cwbtrc /DT:0 /DFLTR:1 /DCOMP:Configuration,Communication,Comm-API,Comm-SPI,Comm-System,Comm-Base,NLS,ODBC,ODBC-Error,Service,SecurityNote the "DETAIL TRACE" "Path" value. That is the directory where the trace output is generated.
Apache and PHP applications must set up tracing as the user that runs Apache, which by default is "www-data" on Ubuntu (ps aux | grep apacheto determine). For example,
$ sudo mkdir ~www-data/.iSeriesAccess $ sudo chown www-data ~www-data/.iSeriesAccess $ sudo chmod 755 ~www-data/.iSeriesAccess(This action must be done because www-data's home directory (
/var/www) is only writeable by root by default, so cwbtrc cannot write to the settings file to enable the trace.)$ sudo -H -u www-data /opt/ibm/iaccess/bin/cwbtrc /dt:1
Apache needs to be restarted.
The trace files are under~/www-data/.iSeriesAccess
3. Cwbmedic archive
The following command is a Linux shell script that collects all of the files required by IBM i Support. It places the files in an archive named cwbmedic*.tgz in the user's home directory:
$ cwbmedicYou can attach the SQL.log and cwbmedic*.tgz files to the case or submit them by using:
http://www.ecurep.ibm.com/app/upload
More details regarding the cwbtrc commandHere is the output from the command:
$ cwbtrc /? Format: CWBTRC DETAIL TRACE [ /DT:0-1 ] on/off [ /DPATH:path ] path [ /DWRAP:0-4000 ] wrap (MB) [ /DFLTR:0-1 ] filter on/off [ /DCOMP:abc,abc ] filter component list [ /DTICK:0-1 ] time format [ /DFRMT:0-1 ] limit hex data on/off HISTORY LOG [ /HL:0-1 ] on/off [ /HPATH:path ] path [ /HWRAP:0-4000 ] wrap (MB) [ /HFLTR:0-1 ] filter on/off [ /HCOMP:abc,abc ] filter component list [ /HTICK:0-1 ] time format Filter List: Configuration,Communication,Comm-API,Comm-SPI,Comm-System Comm-Base,License Management,NLS,ODBC,ODBC-Error,Emulator Remote Command,Service,Security Status: DETAIL TRACE Status: ON Path: /tmp [note the alternate output path] Wrap: 500 MB [Note the wrap size changed from default of 100 MB] Filter: OFF List: Tick: OFF Format: OFF HISTORY LOG Status OFF Path: /home/<currentUID>/.iSeriesAccess [~/.iSeriesAccess is the default output path] Wrap: 100 MB Filter: OFF List: Tick: OFF
Related Information
Product Synonym
IBM i Access Client Solutions - Linux Application Package
Was this topic helpful?
Document Information
Modified date:
09 September 2026
UID
nas8N1021042