IBM Support

Must Gather Diagnostic Material for IBM i Access Client Solutions (ACS) Linux Application Package ODBC Problems

Troubleshooting


Problem

This technote lists the documentation that must be gathered to troubleshoot problems that occur when you use the IBM i Access Client Solutions Linux Application Package ODBC driver.

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 -j

An 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. Note the default output directory. It is a hidden directory in the home of the user executing the command:
 $ /opt/ibm/iaccess/bin/cwbtrc /DT:1

Use the following to command turn off the cwbtrc trace.
$ /opt/ibm/iaccess/bin/cwbtrc /DT:0
  • - Apache and PHP instructions


    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 apache to 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:
$ /opt/ibm/iaccess/bin/cwbmedic

You 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 command

    Here 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":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"Access for Linux","Platform":[{"code":"PF016","label":"Linux"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Product Synonym

IBM i Access Client Solutions - Linux Application Package

Document Information

Modified date:
21 June 2021

UID

nas8N1021042