Skip to main content
GoldenGate

Golden Gate Replicat Process Abended due to Unknown Trail File location

By March 2, 2022August 28th, 2022No Comments7 min read

After configuring the replicat process, started the replicat process. As soon as started the replicat process got abended.

2021-08-07 15:19:53 ERROR OGG-01091 Unable to open file "/dirdat/" (error 2, No such file or directory).

Source Context :
SourceModule : [gglib.ggtrail.TrailDataSource]
SourceID : [ggtrail/TrailDataSource.cpp]
SourceMethod : [findFirstTrailFileImpl]
SourceLine : [1616]
ThreadBacktrace : [15] elements
: [/u01/app/oracle/product/OGG_19.1.0/ogghome_1/libgglog.so(CMessageContext::AddThreadContext())]
: [/u01/app/oracle/product/OGG_19.1.0/ogghome_1/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...))]
: [/u01/app/oracle/product/OGG_19.1.0/ogghome_1/libgglog.so(_MSG_String(CSourceContext*, int, char const*, CMessageFactory::MessageDisposition))]
: [/u01/app/oracle/product/OGG_19.1.0/ogghome_1/replicat(ggs::gglib::ggtrail::TrailDataSource::findFirstTrailFileImpl(long))]
: [/u01/app/oracle/product/OGG_19.1.0/ogghome_1/replicat(ggs::gglib::ggtrail::TrailDataSource::findFirstTrailFile(long))]
: [/u01/app/oracle/product/OGG_19.1.0/ogghome_1/replicat(ggs::gglib::ggtrail::TrailDataSource::establishStartPoint(char))]
: [/u01/app/oracle/product/OGG_19.1.0/ogghome_1/replicat(ggs::gglib::ggapp::ReplicationContext::establishStartPoints(char, ggs::gglib::ggdatasource::DataSourceParam
s const&))]
: [/u01/app/oracle/product/OGG_19.1.0/ogghome_1/replicat(ggs::gglib::ggapp::ReplicationContext::initializeDataSources(ggs::gglib::ggdatasource::DataSourceParams&))]
: [/u01/app/oracle/product/OGG_19.1.0/ogghome_1/replicat()]
: [/u01/app/oracle/product/OGG_19.1.0/ogghome_1/replicat(ggs::gglib::MultiThreading::MainThread::ExecMain())]
: [/u01/app/oracle/product/OGG_19.1.0/ogghome_1/replicat(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*))]
: [/u01/app/oracle/product/OGG_19.1.0/ogghome_1/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
: [/u01/app/oracle/product/OGG_19.1.0/ogghome_1/replicat(main)]
: [/lib64/libc.so.6(__libc_start_main)]
: [/u01/app/oracle/product/OGG_19.1.0/ogghome_1/replicat()]

2021-08-07 15:19:53 ERROR OGG-01091 Unable to open file "/dirdat/" (error 2, No such file or directory).

2021-08-07 15:19:53 ERROR OGG-01668 PROCESS ABENDING.

Let’s take a close look at the report on the replicat process. The major issue is found with “OGG-01091 Unable to open file “/dirdat/” (error 2, No such file or directory).” The location seems to be correct, and also Oracle user does have proper permissions on the folder. Still strange why Golden Gate can’t be able to read the files.

Replicat information points to the correct trail file and also observed the source pump process sent the trail file to the target location, but the issue is only with the replicat process.

GGSCI (ORA-X2 as ggadmin@PRODT) 39> info inrep1

REPLICAT INREP1 Initialized 2021-08-07 15:18 Status STOPPED
INTEGRATED
Checkpoint Lag 00:00:00 (updated 00:03:34 ago)
Log Read Checkpoint File /dirdat/rt000000000
2021-08-07 15:18:33.000000


GGSCI (ORA-X2 as ggadmin@PRODT) 40> exit
(oracle):PRODT@ORA-X2:/u01/app/oracle/product/OGG_19.1.0/ogghome_1> cd dirdat
(oracle):PRODT@ORA-X2:/u01/app/oracle/product/OGG_19.1.0/ogghome_1/dirdat> ls
ft old_trail rt000000000 st
(oracle):PRODT@ORA-X2:/u01/app/oracle/product/OGG_19.1.0/ogghome_1/dirdat> ls -ltr
total 8
drwxr-x--- 2 oracle oinstall 6 Jun 5 22:49 st
drwxr-x--- 2 oracle oinstall 6 Jun 5 22:49 ft
drwxr-x--- 2 oracle oinstall 4096 Aug 7 14:36 old_trail
-rw-r----- 1 oracle oinstall 2078 Aug 7 15:02 rt000000000
(oracle):PRODT@ORA-X2:/u01/app/oracle/product/OGG_19.1.0/ogghome_1/dirdat>

After a bit more troubleshooting, I identified the replicat exttrail location was added earlier as “./dirdat/rt,” but the location should be “dirdat/rt”. Because the location we provide to the replicat is considered automatically under the $OGG_HOME. Upon providing the “/dirdat/rt” it may consider as the mount point, and that’s why Golden Gate replicat failed to read the files from an unknown location.

Now delete the replicat and again add the replicat with the correct location as below.

 

GGSCI (ORA-X2 as ggadmin@PRODT) 24> add replicat inrep1, integrated exttrail dirdat/rt, checkpointtable GGADMIN.CKPT
REPLICAT (Integrated) added.

After adding replicat, let’s start the replicat and check the status.

GGSCI (ORA-X2 as ggadmin@PRODT) 25> info inrep1

REPLICAT INREP1 Initialized 2021-08-07 15:33 Status STOPPED
INTEGRATED
Checkpoint Lag 00:00:00 (updated 00:00:03 ago)
Log Read Checkpoint File dirdat/rt000000000
First Record RBA 0

GGSCI (ORA-X2 as ggadmin@PRODT) 26> start inrep1

Sending START request to MANAGER ...
REPLICAT INREP1 starting

GGSCI (ORA-X2 as ggadmin@PRODT) 27>

Now seems to be good. Also, let’s start reading the replicat report file whether. Was the replicat able to read the trail file?

2021-08-07 15:33:55 INFO OGG-06604 Database PRODT CPU info: CPU Count 4, CPU Core Count 4, CPU Socket Count 1.

2021-08-07 15:33:55 INFO OGG-02545 Parameter GROUPTRANSOPS is ignored by Integrated Replicat when parallelism is greater than 1.

2021-08-07 15:33:55 INFO OGG-02527 Integrated Replicat does not populate a trace table.

2021-08-07 15:33:56 INFO OGG-02528 REPLICAT INREP1 successfully registered with database as inbound server OGG$INREP1.

2021-08-07 15:33:56 INFO OGG-06627 Replicat sets the key columns for each table replicated by inbound server OGG$INREP1.

2021-08-07 15:33:57 INFO OGG-02530 Integrated replicat successfully attached to inbound server OGG$INREP1.

***********************************************************************
** Run Time Messages **
***********************************************************************


2021-08-07 15:33:57 INFO OGG-02243 Opened trail file /u01/app/oracle/product/OGG_19.1.0/ogghome_1/dirdat/rt000000000 at 2021-08-07 15:33:57.233697.

2021-08-07 15:33:57 WARNING OGG-02760 ASSUMETARGETDEFS is ignored because trail file /u01/app/oracle/product/OGG_19.1.0/ogghome_1/dirdat/rt000000000 contains table definitions.

2021-08-07 15:33:57 INFO OGG-03506 The source database character set, as determined from the trail file, is we8mswin1252.

2021-08-07 15:33:57 INFO OGG-06505 MAP resolved (entry ggadmin.persons): MAP "GGADMIN"."PERSONS", target ggadmin.persons, Comparecols (on update all, on delete all), Resolveconflict ( u
pdaterowexists, (default, Discard)), Resolveconflict ( insertrowexists, (default, Discard)), Resolveconflict ( deleterowexists, (default, Discard)), Resolveconflict ( deleterowmissing, (defa
ult, Discard)), Resolveconflict ( updaterowmissing, (default, Discard)).

2021-08-07 15:33:58 INFO OGG-02756 The definition for table GGADMIN.PERSONS is obtained from the trail file.

2021-08-07 15:33:58 INFO OGG-06511 Using following columns in default map by name: PERSON_ID, FIRST_NAME, LAST_NAME.

2021-08-07 15:33:58 INFO OGG-10155 Instantiation CSN filtering is enabled on table GGADMIN.PERSONS at CSN 172,859,484,808.

2021-08-07 15:33:58 INFO OGG-06510 Using the following key columns for target table GGADMIN.PERSONS: PERSON_ID.


2021-08-07 15:33:59 INFO OGG-06505 MAP resolved (entry ggadmin.persons): MAP "GGADMIN"."PERSONS" TARGET GGADMIN.EXCEPTIONS , COLMAP ( rep_name = @GETENV('GGENVIRONMENT', 'GROUPNAME') , 
TABLE_NAME = @GETENV ('GGHEADER', 'TABLENAME') , ERRNO = @GETENV ('LASTERR', 'DBERRNUM') , DBERRMSG = @GETENV ('LASTERR', 'DBERRMSG') , OPTYPE = @GETENV ('LASTERR', 'OPTYPE') , ERRTYPE = @GE
TENV ('LASTERR', 'ERRTYPE') , LOGRBA = @GETENV ('GGHEADER', 'LOGRBA') , LOGPOSITION = @GETENV ('GGHEADER', 'LOGPOSITION') , COMMITTIMESTAMP = @GETENV ('GGHEADER', 'COMMITTIMESTAMP') , GGS_FI
LENAME = @GETENV('GGFILEHEADER', 'FILENAME') , CDRFAIL = @GETENV('DELTASTATS','CDR_RESOLUTIONS_FAILED') , CDRSUC = @GETENV('DELTASTATS','CDR_RESOLUTIONS_SUCCEEDED') , CDRDETECT = @GETENV('DE
LTASTATS','CDR_CONFLICTS')) , INSERTALLRECORDS , EXCEPTIONSONLY.

2021-08-07 15:33:59 INFO OGG-06510 Using the following key columns for target table GGADMIN.EXCEPTIONS: LOGRBA, LOGPOSITION, COMMITTIMESTAMP.

2021-08-07 15:33:59 INFO OGG-06074 Unique constraint columns used in dependency calculation for table GGADMIN.EXCEPTIONS: LOGRBA, LOGPOSITION, COMMITTIMESTAMP.

2021-08-07 15:33:59 INFO OGG-10188 Instantiation CSN filtering on table GGADMIN.PERSONS has ended, now passing transactions starting at CSN 183,151,442,026.

Check the Statistics of the replicat Process

GGSCI (ORA-X2 as ggadmin@PRODT) 29> stats inrep1

Sending STATS request to REPLICAT INREP1 ...

Start of Statistics at 2021-08-07 15:34:26.


Integrated Replicat Statistics:

Total transactions 1.00
Redirected 0.00
Replicated procedures 0.00
DDL operations 0.00
Stored procedures 0.00
Datatype functionality 0.00
Operation type functionality 0.00
Event actions 0.00
Direct transactions ratio 0.00%

Replicating from GGADMIN.PERSONS to GGADMIN.PERSONS:

*** Total statistics since 2021-08-07 15:33:58 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 1.00

*** Daily statistics since 2021-08-07 15:33:58 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 1.00

*** Hourly statistics since 2021-08-07 15:33:58 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 1.00

*** Latest statistics since 2021-08-07 15:33:58 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 1.00

Replicating from GGADMIN.PERSONS to GGADMIN.EXCEPTIONS:

*** Total statistics since 2021-08-07 15:33:58 ***

No database operations have been performed.

*** Daily statistics since 2021-08-07 15:33:58 ***

No database operations have been performed.

*** Hourly statistics since 2021-08-07 15:33:58 ***

No database operations have been performed.

*** Latest statistics since 2021-08-07 15:33:58 ***

No database operations have been performed.

End of Statistics.


GGSCI (ORA-X2 as ggadmin@PRODT) 30>

From the replicat statistics, we can see the insert operations were received on the target.

 

Leave a Reply