Reputation: 11
I hope someone can shed some light on this pretty old informix DB connection problem running on a very outdated Cisco Call manager 6.1 server (the PUB machine with one functional SUB machine). After an unattended power outage the connection to the DB is no longer possible, however the Informix database is up and running:
-sh-2.05b$ onstat -
IBM Informix Dynamic Server Version 10.00.UC5XAG -- On-Line -- Up 03:53:48 -- 196284 Kbytes
The jar files seem to be all ok (I also extracted them to check their integrity) including the ifxjdc.jar and ifxsqlj.jar files which are in their default location (/usr/local/cm/db/informix/jdbc/lib). I also checked the pref.XML files to see if there was some corrupted one but they all seem to checkout fine. A simple "dbl ping" command (this calls a jar file which checks the database name -> java com.cisco.ccm.dbl.Ping $*) spits out the error:
-sh-2.05b$ sudo dbl ping
CCM1(EXCEPTION: Failed to get Connection.Connector(NOT CONNECTED: Driver=NO_JDBCDRIVER_PROVIDED;))
Error ['Error executing [source /usr/local/cm/db/dblenv.bash ; java com.cisco.ccm.dbl.Ping 2> /dev/null] returned [256]']
The relevant source env file is correct:
-sh-2.05b$ cat /usr/local/cm/db/dblenv.bash
PREFIX=/usr/local/cm
if [ "$1" != "" ]; then
PREFIX=$1
if [ ! -d "$PREFIX" ]; then
# Fix the directory to something reasonable
PREFIX=/usr/local/cm
fi
fi
if [ "$PREFIX" != "$LAST_DBLENV_PREFIX" ]; then
if [ -d "$PREFIX" ]; then
export LD_LIBRARY_PATH=$PREFIX/lib:$PREFIX/../thirdparty/java/j2sdk/jre/lib/i386:$LD_LIBRARY_PATH
export PATH=$PREFIX/bin:$PREFIX/../thirdparty/java/j2sdk/bin:$PATH
for J in $PREFIX/jar/*.jar; do
CLASSPATH=$J:$CLASSPATH
done
export CLASSPATH
export PYTHONPATH=$PREFIX/lib:$PYTHONPATH
if [ -f "$PREFIX/db/informix/local/ids.env" ]; then
source $PREFIX/db/informix/local/ids.env
fi
export LAST_DBLENV_PREFIX=$PREFIX
fi
Also the ids.env file appears intact:
-sh-2.05b$ cat db/informix/local/ids.env
export INFORMIXDIR=/usr/local/cm/db/informix
export INFORMIXTMP=/usr/local/cm/db/informix/tmp
export PATH=$INFORMIXDIR:$INFORMIXDIR/bin:$PATH
export LD_LIBRARY_PATH=$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql:$INFORMIXDIR/lib/cli:$LD_LIBRARY_PATH
export EDITOR=vi
export ODBCINI=/etc/odbc.ini
if [ "$1" == "l2" ] || [ "$1" == "L2" ]; then
# The migration/update case, use Side B
export ONCONFIG=onconfig.ccmb
export INFORMIXSERVER=ccm1_ccm6_1_4_2000_2
export INFORMIXOLDSERVER=ccm1_ccm6_1_2_1001_4
else
#The Normal Case
export ONCONFIG=onconfig.ccm
export INFORMIXSERVER=ccm1_ccm6_1_4_2000_2
fi
if [ -d $INFORMIXDIR/jdbc/lib ]; then
for J in $INFORMIXDIR/jdbc/lib/*.jar ; do
export CLASSPATH=$J:$CLASSPATH
done
fi
export FET_BUF_SIZE=32767
export OPTOFC=1
export IFX_LOCK_MODE_WAIT=30
export DB_LOCALE=en_us.utf8
export CLIENT_LOCALE=en_us.utf8
export SERVER_LOCALE=en_us.utf8
#export CDRFE_TRACE=1
#export SQLIDEBUG=2:/tmp/sqlidebug.out
Also, the CLASSPATH env variable contains all the directories where the jars are.
I understand this error is generated if calling the DB connection before defining/specifying the Informix SQL driver, but this appears also correct in the /usr/local/cm/conf/dbl/prefs.xml file which is referenced by all the jar classes:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<map>
<entry key="numminutes" value="1440"/>
<entry key="enable" value="1"/>
<entry key="jdbcurl_super" value="jdbc:informix-sqli://CCM1:1500/None:informixserver=ccm1_ccm6_1_4_2000_2;user=informix;IFX_LOCK_MODE_WAIT=10"/>
<entry key="jdbcurl_car" value="jdbc:informix-sqli://CCM1:1500/car:informixserver=ccm1_ccm6_1_4_2000_2;user=dbcarsch;IFX_LOCK_MODE_WAIT=20"/>
<entry key="tracefile" value="/var/log/active/cm/trace/dbl/sdi/dbl.log"/>
<entry key="jdbcurl_power" value="jdbc:informix-sqli://CCM1:1500/None:informixserver=ccm1_ccm6_1_4_2000_2;user=database;IFX_LOCK_MODE_WAIT=10"/>
<entry key="jdbcurl" value="jdbc:informix-sqli://CCM1:1500/None:informixserver=ccm1_ccm6_1_4_2000_2;"/>
<entry key="tracelevel" value="127"/>
<entry key="outputdebugstringflag" value="0"/>
<entry key="jdbcurl2" value="jdbc:informix-sqli://CCM1:1500/None:informixserver=ccm1_ccm6_1_4_2000_2;"/>
<entry key="compressionenabled" value="0"/>
<entry key="numfiles" value="50"/>
<entry key="numlines" value="10000"/>
</map>
What could be causing the error if the informix-sqli jdbc driver is properly defined? Possibly some other file which got corrupted?
Checked env variables, jars, .env definition files, xml files for any corruption.
This is the $CLASSPATH (I previously checked and it does contain all the references to the jar paths - also it is identical to it's "twin" or "SUB" machine which is currently functional but read only as it's a cluster)
CLASSPATH=/usr/local/cm/db/informix/jdbc/lib/ifxtools.jar:/usr/local/cm/db/informix/jdbc/lib/ifxsqlj.jar:/usr/local/cm/db/informix/jdbc/lib/ifxlsupp.jar:/usr/local/cm/db/informix/jdbc/lib/ifxlang.jar:/usr/local/cm/db/informix/jdbc/lib/ifxjdbcx.jar:/usr/local/cm/db/informix/jdbc/lib/ifxjdbc.jar:/usr/local/cm/jar/typetables.jar:/usr/local/cm/jar/taps.jar:/usr/local/cm/jar/risquery.jar:/usr/local/cm/jar/risbean.jar:/usr/local/cm/jar/reporter.jar:/usr/local/cm/jar/providerutil.jar:/usr/local/cm/jar/perfutil.jar:/usr/local/cm/jar/pd.jar:/usr/local/cm/jar/multipartrequest.jar:/usr/local/cm/jar/log4j-1.2.8.jar:/usr/local/cm/jar/licenseccm.jar:/usr/local/cm/jar/ldapsyncplugable.jar:/usr/local/cm/jar/ldapbp.jar:/usr/local/cm/jar/jtapi.jar:/usr/local/cm/jar/jsafe.jar:/usr/local/cm/jar/jprefs.jar:/usr/local/cm/jar/JPIWriter.jar:/usr/local/cm/jar/JavaNcsClient.jar:/usr/local/cm/jar/ipmamigrator.jar:/usr/local/cm/jar/IMS.jar:/usr/local/cm/jar/fscontext.jar:/usr/local/cm/jar/fappender.jar:/usr/local/cm/jar/emutil.jar:/usr/local/cm/jar/dnaServer.jar:/usr/local/cm/jar/dirsync.jar:/usr/local/cm/jar/dhcpMon.jar:/usr/local/cm/jar/dbl2j.jar:/usr/local/cm/jar/commons-logging.jar:/usr/local/cm/jar/cmutil.jar:/usr/local/cm/jar/cmplatform-realm.jar:/usr/local/cm/jar/cmdbutil.jar:/usr/local/cm/jar/cisco-platform-realm.jar:/usr/local/cm/jar/cisco-ccm-realm.jar:/usr/local/cm/jar/cdrdlv.jar:/usr/local/cm/jar/CCMScheduler.jar:/usr/local/cm/jar/ccm-realm.jar:/usr/local/cm/jar/CCMEncryption.jar:/usr/local/cm/jar/CCMAuthentication.jar:/usr/local/cm/jar/ccmadmin_common.jar:/usr/local/cm/jar/bps.jar:/usr/local/cm/jar/amc.jar:/usr/local/cm/jar/alarmutil.jar:/usr/local/cm/jar/ac.jar:
Upvotes: 0
Views: 69
Reputation: 11
I found that the prefs.xml file was misconfigured. This file is recreated by a start script at every service (re)start and probably due to the powerfail (I guess it must have been multiple, I cannot be sure) the process was forcefully interrupted. At subsequent reboot/restart it was incorrectly considered valid (if it exists it is referenced, if it is missing it is re-created from other ambient vars). After adding the correct dbname (instead of /None) and the jdbc driver definition and restarted the DB service and Tomcat the db was again accessible.
Upvotes: 1