Consultor Eletrônico



Kbase P5893: Linux - Database not started (8933) and SQL dies with (8841)
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/6/2009
Status: Verified

SYMPTOM(s):

Error 8841 or 8933 when connecting via ODBC, JDBC or SQL explorer

SQL server process terminated. (8841)

Error: <command name | SQL Exception message>. (8933)

Error: [JDBC Progress Driver]:Database not started. (8933)

[DataDirect-Technologies][ODBC PROGRESS driver][PROGRESS] Database not started

java.sql.SQLException: [JDBC Progress Driver]:Database not started

Database not started

Running following commands

. $DLC/bin/slib_env
. $DLC/bin/java_env
ldd $DLC/bin/_sqlsrv2

produces these errors

libjvm.so => not found
libhpi.so => not found

FACT(s) (Environment):

Database is started from proserve script
Permissions for executables under $DLC/bin are set correctly
JRE is installed and used
Correct version of JRE is installed
Progress 9.1X
Linux Intel

CAUSE:

JRE is installed, but JDK is not installed. Progress expects a JRE subdirectory in the Java installation directory,but when JRE is installed, there is no such directory and the LD_LIBRARY_PATH environment variable set in $DLC/bin/java_env is not correct any more.

_sqlsrv2 executable is dynamically linked with libjvm.so and libhpi.so which are shipped with either JDK or JRE installation. LD_LIBRARY_PATH needs to include the correct directory patches for _sqlsrv2 to load correctly.

With JDK installation, these libraries are in $JDKHOME/jre/lib's subdirectories ($JDKHOME/jre/lib/i386/classic/ for libjvm.so and $JDKHOME/jre/lib
ative_threads/ for libhpi.so). With JRE installation, these libraries are in $JREHOME/lib's subdirectories ($JREHOME/lib
ative_threads and $JREHOME/lib/i386/classic).

However, $DLC/bin/java_env incorrectly sets LD_LIBRARY_PATH, it assumes JDK is always installed.

FIX:

Option 1: With (only) JRE installed

Modify $DLC/bin/java_env under "Linux" section, ie replace all instances of '$JREHOME/jre' with '$JREHOME' including within LD_LIBRARY_PATH section following way:

"Linux")
THREADS_FLAG=native
JVMARGS="-ms8m ${JVMARGS}"
JDKHOME=/usr/jre131
JREHOME=$JDKHOME
JAVAHOME=$JREHOME
export JAVAHOME
JDKCP=$JDKHOME/lib/tools.jar
JRECP=$JDKCP
VMTYPE=classic
ARCH=i386
LD_LIBRARY_PATH=$JREHOME/lib/$ARCH:$JREHOME/lib/$ARCH/${THREADS_FLAG}_threads:$JREHOME/bin:$JREHOME/lib/$ARCH/$VMTYPE:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
PROLIBPATH=$LD_LIBRARY_PATH; export PROLIBPATH

Note: If using JRE 1.4, then copy libjvm.so from $JREHOME/lib/i386/server/libjvm.so to $JREHOME/lib/i386
ative_threads/libjvm.so .

After this change restart the database.


Option 2: Install JDK
Install the correct JDK version, modify JDKHOME definition in $DLC/bin/java_env script to point to the new JDK installation.

"Linux")
THREADS_FLAG=native
JVMARGS="-ms8m ${JVMARGS}"
JDKHOME=/usr/jdk131 <=============== This is the new install of jdk
# the given java-home could be either for jdk or jre
if [ -d $JDKHOME/jre ]
then
JREHOME=$JDKHOME/jre
else
JREHOME=$JDKHOME
JDKHOME=$env_jdkhome
fi
JAVAHOME=$JDKHOME
export JAVAHOME
JDKCP=$JDKHOME/lib/tools.jar
JRECP=$JDKCP
VMTYPE=classic
ARCH=i386
LD_LIBRARY_PATH=$JREHOME/lib/$ARCH:$JREHOME/lib/$ARCH/${THREADS_FLAG}_threads:$JREHOME/bin:$JREHOME/lib/$ARCH/$VMTYPE:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
PROLIBPATH=$LD_LIBRARY_PATH; export PROLIBPATH


Note: if using JDK 1.4, then copy libjvm.so from $JDKHOME/jre/lib/i386/server/libjvm.so to $JDKHOME/jre/lib/i386
ative_threads/libjvm.so .
After this change restart the database.