OGGMON-20272:OGG Monitor Instance Is Unable To Register The OGG Instance Due To Null

Symptoms

Oracle Goldengate monitor instance is not able to register with the Jagent with the below error:


[2025-09-23T17:11:01.063+10:00] [JAGENT] [ERROR] [OGGMON-20272] [com.goldengate.monitor.jagent.jmx.MBeansContainerImpl] [tid: StatusCollector] [ecid: 0000P_WUnVbF^64_zTO5yW1cnElJ000003,0] unable to register the OGG instance. Due to null
[2025-09-23T17:11:11.063+10:00] [JAGENT] [ERROR] [OGGMON-20498] [com.goldengate.monitor.jagent.comm.ws.NotificationsCollector] [tid: StatusCollector] [ecid: 0000P_WUnVbF^64_zTO5yW1cnElJ000003,0] Exception thrown is: [[
java.lang.NullPointerException
at com.goldengate.monitor.jagent.comm.impl.ManagerFacadeImpl.getCachedInstances(ManagerFacadeImpl.java:299)
at com.goldengate.monitor.jagent.comm.ws.NotificationsCollector.checkAndDeleteProcess(NotificationsCollector.java:162)
at com.goldengate.monitor.jagent.comm.ws.NotificationsCollector.checkAndPublishRegisteredAndDeletedProcess(NotificationsCollector.java:150)
at com.goldengate.monitor.jagent.comm.ws.NotificationsCollector.run(NotificationsCollector.java:80)
at java.lang.Thread.run(Thread.java:750)

]]

Solution

  1. Check Jagent config file as per “GGMON-20272:OGG Monitor Instance Is Unable To Register The OGG Instance Due To Null (Doc ID 2618440.1)”
  2. If step 1 is not working and the Monitor Agent is used by Enterprise Manager (OEM).

    Make sure to bounce the Manager, then restart JAGENT and PMSRVR.
GGSCI > stop JAGENT
GGSCI > stop PMSRVR
GGSCI > stop *
GGSCI > stop manager
GGSCI > info all # all should be stopped
GGSCI > start manager
GGSCI > info all # all are up running
GGSCI > start JAGENT
GGSCI > info all # PMSRVR should be running as well

How to Skip Long Running Transaction in Oracle Goldengate using SKIPTRANS

We always see the similar WARNING in ggserr.log:

2024-07-14T20:33:15.697+1000  WARNING OGG-01027  Oracle GoldenGate Capture for Oracle, EXTDB.prm:  Long Running Transaction: XID 3708191792.181.17.473582, Items 0, Extract EXTDB, Redo Thread 2, SCN 1447.4108855138 (6218926532450), Redo Seq #38608, Redo RBA 88457232.

Check the transaction in GGSCI:

GGSCI  > send extract EXTDB, showtrans

OR show transactions lasting for more than 1200 minutes already.

GGSCI >  send extract EXTDB, showtrans duration 1200 MIN TABULAR

Check the transaction in database:

SQL> select INST_ID,ADDR,XIDUSN,XIDSLOT,XIDSQN,STATUS,START_TIME,START_DATE from  gv$transaction where XIDUSN=181 and XIDSLOT=17 and XIDSQN=473582;

   INST_ID ADDR                 XIDUSN    XIDSLOT     XIDSQN STATUS           START_TIME           START_DATE
---------- ---------------- ---------- ---------- ---------- ---------------- -------------------- --------------------
         2 000000021236DA28        181         17     473582 ACTIVE           07/05/24 18:37:56    07-May-2024 18:37:59

Skip the transaction:

GGSCI > send extract EXTDB,skiptrans 3708191792.181.17.473582

Sending SKIPTRANS request to EXTRACT EXTDB ...
Are you sure you sure you want to skip transaction XID 3708191792.181.17.473582, Redo Thread 2, Start Time 2024-05-07:18:37:56, SCN 1447.4108855138 (6218926532450)? (y/n)y

Sending SKIPTRANS request to EXTRACT EXTDB ...
Skiptrans operation successfully processed. Transaction XID 3708191792.181.17.473582, Redo Thread 2, Start Time 2024-05-07:18:37:56, SCN 1447.4108855138 (6218926532450) skipped


OGG: Not Able To Register Extract After DB Refresh

After database is refreshed, the following errors occur:

GGSCI> register extract DTCAP database

2024-05-16 01:12:23 ERROR OGG-08221 Cannot register or unregister EXTRACT DTCAP because of the following SQL error: OCI Error ORA (status = 26668-ORA-26668: GoldenGate process OGG$DTCAP exists
ORA-06512: at "SYS.DBMS_XSTREAM_GG_ADM", line 145
ORA-06512: at "SYS.DBMS_XSTREAM_GG_ADM", line 186
ORA-06512: at line 1
).

This is because dictionary tables were not cleaned up properly when OGG process was removed.

set linesize 130
col session_name format a20
col global_db_name format a45

SQL> select SESSION#,CLIENT#,SESSION_NAME,DB_ID,GLOBAL_DB_NAME 
     from system.LOGMNR_SESSION$;

  SESSION# CLIENT# SESSION_NAME DB_ID GLOBAL_DB_NAME
---------- ------- ------------ ---------- ---------
         1      0 OGG$CAP_DTCAP 576966795  PROD     <----OLD PROD DB

Because current DB ID is different from old PROD database one:

SQL> select name, dbid from v$database;

NAME DBID
--------- ----------
TEST 2095324014

Drop the Extract

SQL>SELECT CAPTURE_NAME, CAPTURE_TYPE, STATUS, to_char(REQUIRED_CHECKPOINT_SCN,'999999999999999')as REQ_SCN ,to_char(OLDEST_SCN,'999999999999999')as OLDEST_SCN FROM DBA_CAPTURE;


CAPTURE_NAME                                                                                                                     CAPTURE_TY STATUS   REQ_SCN          OLDEST_SCN
-------------------------------------------------------------------------------------------------------------------------------- ---------- -------- ---------------- ----------------
OGG$CAP_DTCAP                                                                                                                    LOCAL      DISABLED    6217502668722    6215549732638

SQL> exec DBMS_CAPTURE_ADM.DROP_CAPTURE('OGG$CAP_DTCAP');

PL/SQL procedure successfully completed.

SQL> SELECT CAPTURE_NAME, CAPTURE_TYPE, STATUS, to_char(REQUIRED_CHECKPOINT_SCN,'999999999999999')as REQ_SCN ,to_char(OLDEST_SCN,'999999999999999')as OLDEST_SCN FROM DBA_CAPTURE;


no rows selected

Drop queue tables from log miner.

 set linesize 100
col owner format a20
col name format a25
col queue_table format a20
select owner, name, queue_table from dba_queues where owner = 'C##OGGADMIN';

OWNER NAME QUEUE_TABLE
-------------------- ------------------------- --------------------
C##OGGADMIN OGG$Q_DTCAP OGG$Q_TAB_DTCAP
C##OGGADMIN AQ$_OGG$Q_TAB_DTCAP_E OGG$Q_TAB_DTCAP

SQL> exec DBMS_AQADM.DROP_QUEUE_TABLE(queue_table =>'C##OGGADMIN.OGG$Q_TAB_DTCAP', force => TRUE);

PL/SQL procedure successfully completed.

SQL> select queue_table, owner from dba_queues where owner ='C##OGGADMIN';

no rows selected

OR

Stop and clean the queues.

set linesize 100
col owner format a20
col name format a25
col queue_table format a20
select owner, name, queue_table from dba_queues where owner = 'C##OGGADMIN';

OWNER NAME QUEUE_TABLE
-------------------- ------------------------- --------------------
C##OGGADMIN OGG$Q_DTCAP OGG$Q_TAB_DTCAP
C##OGGADMIN AQ$_OGG$Q_TAB_DTCAP_E OGG$Q_TAB_DTCAP

BEGIN
DBMS_AQADM.STOP_QUEUE(queue_name => 'C##OGGADMIN.OGG$Q_DTCAP');
DBMS_AQADM.STOP_QUEUE(queue_name => 'C##OGGADMIN.AQ$_OGG$Q_TAB_DTCAP_E');
DBMS_AQADM.DROP_QUEUE(queue_name => 'C##OGGADMIN.OGG$Q_DTCAP');
DBMS_AQADM.DROP_QUEUE(queue_name => 'C##OGGADMIN.AQ$_OGG$Q_TAB_DTCAP_E');
END;

BEGIN
EXEC DBMS_STREAMS_ADM.REMOVE_QUEUE(
  queue_name => C##OGGADMIN.OGG$Q_DTCAP',
  cascade => true,
  drop_unused_queue_table => true);
END;
/

BEGIN
EXEC DBMS_STREAMS_ADM.REMOVE_QUEUE(  queue_name => 'C##OGGADMIN.AQ$_OGG$Q_TAB_DTCAP_E', 
cascade => true, 
drop_unused_queue_table => true); 
END;
/

SQL> select queue_table, owner from dba_queues where owner ='C##OGGADMIN';

no rows selected


SQL> select SESSION#,CLIENT#,SESSION_NAME,DB_ID,GLOBAL_DB_NAME
from system.LOGMNR_SESSION$;
no rows selected

Not Able To Register Extract After DB Refresh (Doc ID 2593741.1)

Oracle Golden Gate Missing Archive Log Files

OGG extract process is abended due to the missing archive logs as showing in GG error log:

2023-01-21T01:19:23.197+1100  ERROR   OGG-01028  Oracle GoldenGate Capture for Oracle, CAP01.prm:  Could not find archived log for sequence 99 thread 2 under default destinations SQL <SELECT  name   FROM v$archived_log   WHERE sequence# = :1 AND         thread# = :2 AND         resetlogs_id = :3 AND         archived = 'YES' AND         deleted = 'NO'         AND standby_dest = 'NO'         order by name DESC>, error retrieving redo file name for sequence 99, archived = 1, use_alternate = 0.

You can restore the missing archive logs using RMAN from tape backup if they are still available, then restart the extract process.

Otherwise we have to skip the archive log, certainly the data might be missed due to skipping the log files. In this case, let OGG to skip logfile by issuing following command:

GGSCI >ALTER EXTRACT CAP01, extseqno 100

Sometimes we can skip the transactions based on date and time, like :

GGSCI> ALTER EXTRACT CAP01 BEGIN 2024-02-24 15:00

ERROR OGG-01172 Discard file (/home/oracle/ggs/dirrpt/REP01.dsc) exceeded max bytes (3000000)

The replicate process ABENDING due to the following errors exist in replicate process report:

ERROR   OGG-01172  Discard file (/home/oracle/ggs/dirrpt/REP01.dsc) exceeded max bytes (3000000).

SOLUTION

Increase the discardfile maximum size in replicate parameter file from default 3M to 100M:

discardfile /home/oracle/ggs/dirrpt/REP01.dsc, purge, megabytes 100