版本:

Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1.2 OGGCORE_11.1.1.1.2_PLATFORMS_111004.2100 
Linux, x64, 64bit (optimized), Oracle 10g on Oct  4 2011 23:50:20

 

ogg在配置monitor agent时报错:

2014-06-18 14:38:59  INFO    OGG-00983  Oracle GoldenGate Manager for Oracle, mgr.prm:  Manager started (port 7809).
2014-06-18 14:38:59  INFO    OGG-01227  Oracle GoldenGate Manager for Oracle, mgr.prm:  Waiting for connection on port 7809 ..
2014-06-18 14:38:59  INFO    OGG-01338  Oracle GoldenGate Manager for Oracle, mgr.prm:  mgr: The Network Server service was started successfully.
2014-06-18 14:38:59  INFO    OGG-01338  Oracle GoldenGate Manager for Oracle, mgr.prm:  mgr: The Java VM service was started successfully.
2014-06-18 14:38:59  INFO    OGG-01338  Oracle GoldenGate Manager for Oracle, mgr.prm:  mgr: The ProcessManager service was started successfully.
2014-06-18 14:38:59  INFO    OGG-01338  Oracle GoldenGate Manager for Oracle, mgr.prm:  mgr: The Watchdog service was started successfully.
2014-06-18 14:38:59  INFO    OGG-00975  Oracle GoldenGate Manager for Oracle, mgr.prm:  Manager service started successfully.
2014-06-18 14:39:00  ERROR   OGG-01122  Oracle GoldenGate Manager for Oracle, mgr.prm:  Error opening module jvm - Success].
2014-06-18 14:39:00  ERROR   OGG-01668  Oracle GoldenGate Manager for Oracle, mgr.prm:  PROCESS ABENDING.
2014-06-18 14:39:00  INFO    OGG-00975  Oracle GoldenGate Manager for Oracle, mgr.prm:  Stopping Network Server service..
2014-06-18 14:39:01  INFO    OGG-00975  Oracle GoldenGate Manager for Oracle, mgr.prm:  Stopping Network Server service..
2014-06-18 14:39:01  INFO    OGG-00975  Oracle GoldenGate Manager for Oracle, mgr.prm:  The Network Server service was stopped successfully.
2014-06-18 14:39:01  INFO    OGG-00975  Oracle GoldenGate Manager for Oracle, mgr.prm:  Stopping Dispatcher service..
2014-06-18 14:39:02  INFO    OGG-00975  Oracle GoldenGate Manager for Oracle, mgr.prm:  The Dispatcher service was stopped successfully.
2014-06-18 14:39:02  INFO    OGG-00975  Oracle GoldenGate Manager for Oracle, mgr.prm:  Stopping Watchdog service..
2014-06-18 14:39:02  INFO    OGG-00975  Oracle GoldenGate Manager for Oracle, mgr.prm:  The Watchdog service was stopped successfully.
2014-06-18 14:39:02  INFO    OGG-00975  Oracle GoldenGate Manager for Oracle, mgr.prm:  Stopping JavaVMService service..
2014-06-18 14:39:02  INFO    OGG-00975  Oracle GoldenGate Manager for Oracle, mgr.prm:  JavaVMService::stop() shutdownClass.
2014-06-18 14:39:02  ERROR   OGG-01123  Oracle GoldenGate Manager for Oracle, mgr.prm:  Error loading function jvm from JNI_GetCreatedJavaVMs - ./mgr: undefined symbol: JNI_GetCreatedJavaVMs].
2014-06-18 14:39:02  ERROR   OGG-01668  Oracle GoldenGate Manager for Oracle, mgr.prm:  PROCESS ABENDING.

看错误是jvm起不来报的错,通过查找资料,基本是JAVA_HOME的问题

1.JAVA_HOME 没有配置或者配置目录不对

2.jvm的lib目录没有配置,如操作系统是64位的,jvm也必须为64位的

 

官方解决方案:

In case of the 64 bit Monitor Jagent, your LD_LIBRARY_PATH must be pointing to the 64-bit libjvm.so, not the 32-bit libjvm.so.

To locate the correct one, check each of the libjvm.so using 'file' to determine which is 64-bit:

In the following example we are running on SPARC Solaris:



1. Find the correct Java directory 

 

echo $JAVA_HOME
/usr/jdk/jdk1.6.0_18





2. Search for available libjvm.so files 

 

cd $JAVA_HOME
find ./ -name libjvm.so
/usr/jdk/jdk1.6.0_18/jre/lib/sparcv9/server/libjvm.so
/usr/jdk/jdk1.6.0_18/jre/lib/sparc/client/libjvm.so
/usr/jdk/jdk1.6.0_18/jre/lib/sparc/server/libjvm.so
/usr/jdk/jdk1.6.0_18/jre/lib/sparc/libjvm.so



3. Verify with 'file' if those files are 32 bit or 64 bit libraries:

 

file /usr/jdk/jdk1.6.0_18/jre/lib/sparcv9/server/libjvm.so
/usr/jdk/jdk1.6.0_18/jre/lib/sparcv9/server/libjvm.so: ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped, no debugging information available
file /usr/jdk/jdk1.6.0_18/jre/lib/sparc/server/libjvm.so
/usr/jdk/jdk1.6.0_18/jre/lib/sparc/server/libjvm.so: ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped, no debugging information available



4. Then set your JAVA_HOME, PATH with JAVA_HOME/bin and LD_LIBRARY_PATH pointing to the correct 64-bit libjvm.so:

 

export JAVA_HOME=/usr/jdk/jdk1.6.0_18
export PATH=$JAVA_HOME/bin:$PATH
export LD_LIBRARY_PATH=/usr/jdk/jdk1.6.0_18/jre/lib/sparcv9/server:$LD_LIBRARY_PATH



5. Then, after the environment variables are set, using the same session, go to GGSCI and start the MANAGER with ENABLEMONITORAGENT set in the GLOBALS file.