XRegionサービスの起動

XRSTARTコマンドにJSON構成ファイルの完全パスを指定して、各リージョンでXRegionサービスを起動する必要があります。このサービスは長時間実行されるプロセスであるため、コマンドの最後に&を付加することで、バックグラウンド・プロセスとして起動することをお薦めします。

注意:

XRegionサービスを起動する前に、ローカルのKVStoreを起動する必要があります。ローカル・リージョンのKVStoreが起動していないか、アクセスできない場合、XRegionサービスは起動しません。

ステップ:

XRegionサービスを起動するには、次の手順を実行します。

  1. 各KVStoreで個別にxrstartコマンドを実行します。
    nohup java -Xms256m -Xmx2048m -jar $KVHOME/lib/kvstore.jar xrstart \
    -config <complete path to the json.config file> > \
    <complete path to the home directory for the XRegion Service>/nohup.out &

    ここで、各パラメータの詳細は次のとおりです。

  2. オプションで、nohup.outの内容を読み取ることで、xrstartコマンド実行のステータスを表示できます。
    cat <complete path to the home directory for the XRegion Service>/nohup.out
  3. サービス・ログで詳細なログも確認することもできます。このログは、前にXRegionサービスの構成ファイル(json.config)に指定したXRegionサービスのホーム・ディレクトリにあります。

次に例を示します。

フランクフルトとロンドンの両リージョンでXRegionサービスを起動します。

# Start the XRegion Service in the 'fra' Region
[oracle@host1 xrshome]$nohup java -Xms256m -Xmx2048m -jar $KVHOME/lib/kvstore.jar xrstart \
-config <path to the json config file> > \
<path to the home directory of the xregion service>/nohup.out &

[1] 24356
[oracle@host1 xrshome]$ nohup: ignoring input and redirecting stderr to stdout

# View the status of the xrstart command in the 'fra' Region
[oracle@host1 xrshome]$ cat nohup.out
Cross-region agent (region=fra,store=mrtstore, helpers=[host1:5000, host2:5000, host3:5000]) 
starts up from config file=/home/oracle/xrshome/ json.config at 2019-11-07 08:57:34 UTC
# Start the XRegion Service in the 'lnd' Region
[oracle@host4 xrshome]$ nohup java -Xms256m -Xmx2048m -jar $KVHOME/lib/kvstore.jar xrstart \ 
-config <path to the json config file> > \
<path to the home directory of the xregion service>/nohup.out & 

[1] 17587
[oracle@host4 xrshome]$ nohup: ignoring input and redirecting stderr to stdout

# View the status of the xrstart command in the 'lnd' Region
[oracle@host4 xrshome]$ cat nohup.out
Cross-region agent (region=lnd,store=mrtstore, helpers=[host4:5000, host5:5000, host6:5000]) 
starts up from config file=/home/oracle/xrshome/ json.config at 2019-11-07 08:57:34 UTC