構成の問題例

次に、RAC環境のGoldenGateで発生する可能性がある構成の問題と、それらの診断および解決方法を示します。

mount-dbfs.confファイルの不適切なパラメータ設定

XAGがDBFSのマウントに失敗すると、コマンドライン(手動のagctlコマンドを実行している場合)かXAGログ・ファイルのいずれかで、失敗が報告されます。

$ agctl start goldengate <instance_name> --node exadb-node1

CRS-2672: Attempting to start 'dbfs_mount' on 'exadb-node1'
CRS-2674: Start of 'dbfs_mount' on 'exadb-node1' failed
CRS-2679: Attempting to clean 'dbfs_mount' on 'exadb-node1'
CRS-2681: Clean of 'dbfs_mount' on 'exadb-node1' succeeded
CRS-4000: Command Start failed, or completed with errors.

XAGログ・ファイル(agctl_goldengate_grid.trc)には、他のログ・ファイルやトレース・ファイルの参照時に使用できるタイムスタンプが表示されるという利点があります。

2022-04-19 15:32:16: executing cmd: /u01/app/19.0.0.0/grid/bin/crsctl start resource xag.<INSTANCE_NAME>.goldengate -f -n exadb-node1
2022-04-19 15:32:19: Command output:
>  CRS-2672: Attempting to start 'dbfs_mount' on 'exadb-node1'
>  CRS-2674: Start of 'dbfs_mount' on 'exadb-node1' failed
>  CRS-2679: Attempting to clean 'dbfs_mount' on 'exadb-node1'
>  CRS-2681: Clean of 'dbfs_mount' on 'exadb-node1' succeeded
>  CRS-4000: Command Start failed, or completed with errors.
>End Command output
2022-04-19 15:32:19: start resource failed rc=1

次に、CRSトレース・ファイル(crsd_scriptagent_oracle.trc)を確認します。これにはDBFSがマウントに失敗した理由が示されています。次に、mount-dbfs.confファイルの誤ったパラメータ設定によって発生するエラーの例を示します。

  • 不適切なDBNAME
    2022-04-19 15:32:16.679 :    AGFW:1190405888: {1:30281:17383} dbfs_mount
     1 1 state changed from: UNKNOWN to: STARTING
    2022-04-19 15:32:16.680 :CLSDYNAM:1192507136: [dbfs_mount]{1:30281:17383} [start]
     Executing action script: /u01/oracle/scripts/mount-dbfs.sh[start]
    2022-04-19 15:32:16.732 :CLSDYNAM:1192507136: [dbfs_mount]{1:30281:17383} [start]
     mount-dbfs.sh mounting DBFS at /mnt/dbfs from database ggdg
    2022-04-19 15:32:17.883 :CLSDYNAM:1192507136: [dbfs_mount]{1:30281:17383} [start]
     ORACLE_SID is
    2022-04-19 15:32:17.883 :CLSDYNAM:1192507136: [dbfs_mount]{1:30281:17383} [start]
     No running ORACLE_SID available on this host, exiting
    2022-04-19 15:32:17.883 :    AGFW:1192507136: {1:30281:17383} Command: start for
     resource: dbfs_mount 1 1 completed with invalid status: 2
  • 不適切なMOUNT_POINT
    2022-04-19 16:45:14.534 :    AGFW:1734321920: {1:30281:17604} dbfs_mount
     1 1 state changed from: UNKNOWN to: STARTING
    2022-04-19 16:45:14.535 :CLSDYNAM:1736423168: [dbfs_mount]{1:30281:17604} [start]
     Executing action script: /u01/oracle/scripts/mount-dbfs.sh[start]
    2022-04-19 16:45:14.586 :CLSDYNAM:1736423168: [dbfs_mount]{1:30281:17604} [start]
     mount-dbfs.sh mounting DBFS at /mnt/dbfs from database ggdgs
    2022-04-19 16:45:15.638 :CLSDYNAM:1736423168: [dbfs_mount]{1:30281:17604} [start]
     ORACLE_SID is ggdg1
    2022-04-19 16:45:15.738 :CLSDYNAM:1736423168: [dbfs_mount]{1:30281:17604} [start]
     spawning dbfs_client command using SID ggdg1
    2022-04-19 16:45:20.745 :CLSDYNAM:1736423168: [dbfs_mount]{1:30281:17604} [start]
     fuse: bad mount point `/mnt/dbfs': No such file or directory
    2022-04-19 16:45:21.747 :CLSDYNAM:1736423168: [dbfs_mount]{1:30281:17604} [start]
     Start - OFFLINE
    2022-04-19 16:45:21.747 :    AGFW:1736423168: {1:30281:17604} Command: start for
     resource: dbfs_mount 1 1 completed with status: FAIL
  • 不適切なDBFS_USERまたはDBFS_PASSWD
    2022-04-19 16:47:47.855 :    AGFW:1384478464: {1:30281:17671} dbfs_mount
     1 1 state changed from: UNKNOWN to: STARTING
    2022-04-19 16:47:47.856 :CLSDYNAM:1386579712: [dbfs_mount]{1:30281:17671} [start]
     Executing action script: /u01/oracle/scripts/mount-dbfs.sh[start]
    2022-04-19 16:47:47.908 :CLSDYNAM:1386579712: [dbfs_mount]{1:30281:17671} [start]
     mount-dbfs.sh mounting DBFS at /mnt/dbfs from database ggdgs
    2022-04-19 16:47:48.959 :CLSDYNAM:1386579712: [dbfs_mount]{1:30281:17671} [start]
     ORACLE_SID is ggdg1
    2022-04-19 16:47:49.010 :CLSDYNAM:1386579712: [dbfs_mount]{1:30281:17671} [start]
     spawning dbfs_client command using SID ggdg1
    2022-04-19 16:47:55.118 :CLSDYNAM:1386579712: [dbfs_mount]{1:30281:17671} [start]
     Fail to connect to database server. Error: ORA-01017: invalid username/password;
     logon denied
    2022-04-19 16:47:55.118 :CLSDYNAM:1386579712: [dbfs_mount]{1:30281:17671} [start]
    2022-04-19 16:47:56.219 :CLSDYNAM:1386579712: [dbfs_mount]{1:30281:17671} [start]
     Start - OFFLINE
    2022-04-19 16:47:56.220 :    AGFW:1386579712: {1:30281:17671} Command: start for
     resource: dbfs_mount 1 1 completed with status: FAIL
  • 不適切なORACLE_HOME
    2022-04-19 16:50:38.952 :    AGFW:567502592: {1:30281:17739} dbfs_mount
     1 1 state changed from: UNKNOWN to: STARTING
    2022-04-19 16:50:38.953 :CLSDYNAM:569603840: [dbfs_mount]{1:30281:17739} [start]
     Executing action script: /u01/oracle/scripts/mount-dbfs.sh[start]
    2022-04-19 16:50:39.004 :CLSDYNAM:569603840: [dbfs_mount]{1:30281:17739} [start]
     mount-dbfs.sh mounting DBFS at /mnt/dbfs from database ggdgs
    2022-04-19 16:50:39.004 :CLSDYNAM:569603840: [dbfs_mount]{1:30281:17739} [start]
     /u01/oracle/scripts/mount-dbfs.sh: line 136:
     /u01/app/oracle/product/19.0.0.0/rdbms/bin/srvctl: No such file or directory
    2022-04-19 16:50:39.004 :CLSDYNAM:569603840: [dbfs_mount]{1:30281:17739} [start]
     /u01/oracle/scripts/mount-dbfs.sh: line 139:
     /u01/app/oracle/product/19.0.0.0/rdbms/bin/srvctl: No such file or directory
    2022-04-19 16:50:39.004 :CLSDYNAM:569603840: [dbfs_mount]{1:30281:17739} [start]
     ORACLE_SID is
    2022-04-19 16:50:39.004 :CLSDYNAM:569603840: [dbfs_mount]{1:30281:17739} [start]
     No running ORACLE_SID available on this host, exiting
    2022-04-19 16:50:39.004 :    AGFW:569603840: {1:30281:17739} Command: start for
     resource: dbfs_mount 1 1 completed with invalid status: 2

これらの構成の問題を解決するには、mount-dbfs.confに適切なパラメータ値を設定します。

DBFSのファイル・ロックの問題

Oracle Database 12cリリース2 (12.2)を使用している場合にnolock DBFSマウント・オプションを使用しないと、GoldenGateプロセスがチェックポイントまたは証跡ファイルをロックしようとすると問題が発生する可能性があります。バグ22646150のパッチを適用したOracle Database 11gリリース2 (11.2.0.4)または12cリリース1 (12.1)を使用している場合も、同じ問題が発生します。このパッチは、Oracle Database 12cリリース2 (12.2)に合わせて、DBFSがファイルのロックを処理する方法を変更します。nolock DBFSマウント・オプションを追加するには、データベースにバグ27056711のパッチを適用する必要があります。データベースにバグ22646150のパッチが適用されていない場合は、バグ27056711のパッチとnolockマウント・オプションは必要ありません。

次に、GoldenGate Microservices Architectureのロック問題を診断する例を示します。

XAGを使用してデプロイメントを開始すると、1つ以上のファイルでロック競合が検出されたために、1つ以上のプロセスが開始されないことがあります。これは、デプロイメントが正常に停止する機会を得られなかったRACノードのフェイルオーバー後に頻発します。

デプロイメント・サーバーのプロセスの1つの起動に失敗した場合(管理サーバー、パフォーマンス・メトリック・サーバー、分散サーバー、レシーバ・サーバーまたはサービス・マネージャ)は、そのデプロイメントのvar/logディレクトリにある特定のサーバーのログ・ファイルを確認します。

たとえば、ログ・ファイル/mnt/dbfs/goldengate/deployments/<INSTANCE_NAME>/var/log/pmsrvr.logでは、起動時に次のエラーが表示されます。

2022-04-11T12:41:57.619-0700 ERROR| SecureStore failed on open after
 retrying due to extended file lock. (main)
2022-04-11T12:41:57.619-0700 ERROR| SecureStore failed to close (28771). (main)
2022-04-11T12:41:57.619-0700 INFO | Set network configuration. (main)
2022-04-11T12:41:57.619-0700 INFO | Asynchronous operations are enabled with default
 synchronous wait time of 30 seconds (main)
2022-04-11T12:41:57.619-0700 INFO | HttpServer configuration complete. (main)
2022-04-11T12:42:07.674-0700 ERROR| Unable to lock process file, Error is [1454]
 - OGG-01454 (main)
2022-04-11T12:42:07.675-0700 ERROR| Another Instance of PM Server is Already Running
 (main)

Extractプロセスは、デプロイメント・ログ・ファイル・ディレクトリにあるER-events.logログ・ファイルで、起動の失敗を報告します。

たとえば、/mnt/dbfs/goldengate/deployments/<instance_name>/var/log/ER-events.logは次のエラーを示します。

2022-04-11T00:14:56.845-0700  ERROR   OGG-01454  Oracle GoldenGate Capture for
 Oracle, EXT1.prm:  Unable to lock file
 "/mnt/dbfs/goldengate/deployments/<instance_name>/var/run/EXT1.pce" (error 11, Resource
 temporarily unavailable).  Lock currently held by process id (PID) 237495.
2022-04-11T00:14:56.861-0700  ERROR   OGG-01668  Oracle GoldenGate Capture for Oracle,
 EXT1.prm:  PROCESS ABENDING.

次に、起動に失敗するプロセスが、どのRACノードでも実行されていないことを確認します。

例:

$ ps -ef|grep EXT1|grep -v grep

プロセスが実行されていないと判断したら、デプロイメントを正常に停止し、ファイル・システムをアンマウントして、正しいDBFSパッチを適用する必要があります。

例:

$ agctl stop goldengate <INSTANCE_NAME>
$ crsctl stop resource dbfs_mount

DBFSマウント・オプションを確認します。

$ ps -ef|grep dbfs_client

oracle   204017      1  0 14:37 ? 
       00:00:00 /u01/app/oracle/product/19.1.0.0/dbhome_1/bin/dbfs_client dbfs@dbfs.local
 -o allow_other,failover,direct_io /mnt/dbfs

明らかにnolockマウント・オプションが使用されていないため、これがロック・エラーの原因になります。

前述のガイドラインを使用して、DBFSパッチが必要かどうかを判断します。その後、デプロイメントの一部である、すべてのOracle RACノードのmount-dbfs.confファイルに、nolockマウント・オプションを追加します。

例:

MOUNT_OPTIONS=allow_other,direct_io,failover,nolock

最後に、デプロイメントを再起動します。

$ agctl start goldengate <INSTANCE_NAME>