您好,登錄后才能下訂單哦!
JAVA 版本大于1.6以上即可
[root@cwogg ~]# rpm -ivh jre-8u65-linux-x64.rpm
Preparing... ########################################### [100%]
1:jre1.8.0_65 ########################################### [100%]
Unpacking JAR files...
plugin.jar...
javaws.jar...
deploy.jar...
rt.jar...
jsse.jar...
charsets.jar...
localedata.jar...
jfxrt.jar...
添加java環(huán)境變量到oracle用戶:(因我用oracle用戶安裝的ogg)
export PATH
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export ORACLE_SID=PHUB
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export DISPLAY=:0.0
umask=022
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias ggsci='rlwrap ggsci'
export PATH=/u01/ogg:$PATH
export LD_LIBRARY_PATH=/u01/ogg:$LD_LIBRARY_PATH
export GGATE=/u01/ogg
export JAVA_HOME=/usr/java/jre1.8.0_65
PATH=$PATH:$HOME/bin:$JAVA_HOME/jre/bin
源端:
GGSCI (cwogg) 6> view params ./GLOBALS
GGSCHEMA ogg
ENABLEMONITORAGENT
目標(biāo)端
GGSCI (ogg1) 3> view params ./GLOBALS
GGSCHEMA ogg
CHECKPOINTTABLE ogg.CKPT_TABLE
ENABLEMONITORAGENT
# cd /u01/ogg
編輯Config.properties,修改如下幾項:
源庫:
vim /u01/ogg/cfg/Config.properties
jagent.host=172.16.30.227
monitor.host=172.16.30.228
monitor.jmx.username=jmxuser
目標(biāo)庫:
vim /u01/ogg/cfg/Config.properties
jagent.host=172.16.30.226
monitor.host=172.16.30.228
monitor.jmx.username=jmxuser
配置ogg wallet
源端配置
[oracle@cwogg ogg]$ ./pw_agent_util.sh -create
Please create a password for Java Agent:
Please confirm password for Java Agent:
Please enter Monitor Server JMX password:
Please confirm Monitor Server JMX password:
Wallet is created successfully.密碼123123,此處密碼和安裝時候設(shè)定JMX密碼一致。
目標(biāo)端配置:
[oracle@ogg1 ogg]$ ./pw_agent_util.sh -create
Please create a password for Java Agent:
Please confirm password for Java Agent:
Please enter Monitor Server JMX password:
Please confirm Monitor Server JMX password:
Wallet is created successfully.
啟動目標(biāo)端JAGETN:
GGSCI (ogg1) 2> start JAGENT
GGCMD JAGENT started
GGSCI (ogg1) 3> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
JAGENT RUNNING
REPLICAT RUNNING REP1 00:00:00 00:00:02
GGSCI (ogg1) 4> view report JAGENT
***********************************************************************
Oracle GoldenGate Command Tool for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
Linux, x64, 64bit (optimized) on Apr 23 2012 04:41:46
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
Starting at 2015-10-28 10:15:23
***********************************************************************
Operating System Version:
Linux
Version #1 SMP Wed Feb 22 17:37:40 EST 2012, Release 2.6.32-300.10.1.el5uek
Node: ogg1
Machine: x86_64
soft limit hard limit
Address Space Size : unlimited unlimited
Heap Size : unlimited unlimited
File Size : unlimited unlimited
CPU Time : unlimited unlimited
Process id: 13462
Parameters...
COMMAND java -jar -Xms64m -Xmx512m dirjar/jagent.jar
Program is 'java', arguments are '-jar -Xms64m -Xmx512m dirjar/jagent.jar'
***********************************************************************
** Run Time Messages **
***********************************************************************
2015-10-28 10:15:23 INFO OGG-00978 GGCMD JAGENT is running.
2015-10-28 10:15:23 INFO OGG-01927 Child process started, process ID 13466, command line 'java -jar -Xms64m -Xmx512m dirjar/jage
nt.jar'
源端啟動JAGENT:
GGSCI (cwogg) 2> start JAGENT
GGCMD JAGENT started
GGSCI (cwogg) 3> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
JAGENT RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:05
GGSCI (cwogg) 4> view report JAGENT
***********************************************************************
Oracle GoldenGate Command Tool for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
Linux, x64, 64bit (optimized) on Apr 23 2012 04:41:46
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
Starting at 2015-10-28 10:16:58
***********************************************************************
Operating System Version:
Linux
Version #1 SMP Wed Feb 22 17:37:40 EST 2012, Release 2.6.32-300.10.1.el5uek
Node: cwogg
Machine: x86_64
soft limit hard limit
Address Space Size : unlimited unlimited
Heap Size : unlimited unlimited
File Size : unlimited unlimited
CPU Time : unlimited unlimited
Process id: 26094
Parameters...
COMMAND java -jar -Xms64m -Xmx512m dirjar/jagent.jar
Program is 'java', arguments are '-jar -Xms64m -Xmx512m dirjar/jagent.jar'
***********************************************************************
** Run Time Messages **
***********************************************************************
2015-10-28 10:16:58 INFO OGG-00978 GGCMD JAGENT is running.
2015-10-28 10:16:58 INFO OGG-01927 Child process started, process ID 26114, command line 'java -jar -Xms64m -Xmx512m
dirjar/jagent.jar'.
完成后發(fā)現(xiàn)界面上一直不顯示:
jagent.log報錯如下:
2015-10-28 11:21:22 [main] INFO JAgentWSMain - About to call initialize on the WebService
2015-10-28 11:21:22 [main] INFO AgentInfoImpl - Using IP address 172.16.30.226 to connect to the Manager Web Service
2015-10-28 11:21:22 [main] INFO AgentInfoImpl - Reading Manager port 7500 from mgr.prm file.
2015-10-28 11:21:23 [main] INFO ManagerFacadeImpl - Metadata initialized
2015-10-28 11:21:23 [main] INFO JAgentDigestMD5JmxFactory - Starting JMX connector server on port 5555
2015-10-28 11:21:23 [main] INFO JAgentWSMain - JAgent finished initialization.
2015-10-28 11:21:23 [ManagerConnectionKeeper] INFO ManagerWSApi - Created WSAPI
2015-10-28 11:21:28 [getInstanceList] ERROR ManagerWSAdapter - com.goldengate.monitor.model.AgentCommunicationException: Failed to get Registry.
2015-10-28 11:21:28 [getInstanceList] ERROR ManagerFacadeImpl - Instance List returned from JNI call is null
2015-10-28 11:21:28 [getInstanceList] ERROR MBeansContainerImpl - Unexpected behavior, no agent object found! JAgent will exit!
2015-10-28 11:21:28 [getInstanceList] INFO MBeansContainerImpl - Jagent Mode: Monitor-Integrated
2015-10-28 11:21:28 [main] WARN JAgentWSMain - No Agent Mbean found, exit with error code 1
2015-10-28 11:21:28 [main] INFO JAgentWSMain - JAgentWSMain is about to terminate its operation
2015-10-28 11:21:28 [agentRegistration] WARN MBeansContainerImpl - AgentMBean is null
對于11.2.1版本的Jagent需要在部署監(jiān)控代理的服務(wù)器上的OGG下創(chuàng)建本地datastore,否則在啟動Jagent后即使在ggsci里提示jagent啟動成功,并且狀態(tài)是running的,但是在服務(wù)器端的WEB界面里看不到該HOST加入到了監(jiān)控中,并且在ogg安裝目錄下的jagent.log中會報類似以上錯誤:
導(dǎo)致這個問題的原因就是代理端沒有建立本地datastore,在代理端創(chuàng)建datastore
GGSCI (ogg1) 2> create datastore
Datastore created
GGSCI (ogg1) 3> stop jagent
JAgent process is required by other GGS processes.
Are you sure you want to stop it (y/n)? y
Sending STOP request to GGCMD JAGENT ...
Request processed.
JAgent stopped.
GGSCI (ogg1) 7> start JAGENT
GGCMD JAGENT started
GGSCI (ogg1) 8> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
JAGENT RUNNING
REPLICAT RUNNING REP1 00:00:00 00:00:10
web監(jiān)控頁面上就能顯示了:
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。