LoginSignup
2
0

ODI Marketplace版のエージェントを起動と停止する方法

Last updated at Posted at 2022-03-29

初めに
冒頭ですが、この記事の位置付けは、次のシリーズ記事の1つです。
Data Integration (ODI On-P, ODI MP, OCI DI)

前回の記事で、OCI MarketplaceからODIインスタンスを起動する方法を紹介しました。インスタンスの起動後、以下のように1個のスタンドアロン・エージェントが既にインストールされている状態です。手動でのインストール作業は必要ないので、手間を省きます。
image.png

ODI On-Pの場合、agent.sh/agentstop.sh(Linux OSの場合)を使用してODIスタンドアロン・エージェントを起動/停止することができますが、ODI Marketpalceの場合、どうすればよいですか?

ODI Marketplaceのバージョンは、12.2.1.4.200618より前
ODI Marketplaceのバージョンは、12.2.1.4.200618以降

ODI Marketplaceのバージョンは、12.2.1.4.200618より前

サービス agentodi.service を使用して、エージェントの起動/停止を実施します。

サービスのステータスを確認

sudo systemctl status agentodi.service

エージェントを起動

sudo systemctl start agentodi.service

エージェントを停止

sudo systemctl stop agentodi.service

ODI Marketplaceのバージョンは、12.2.1.4.200618以降

この例では、ODI Marketplace 12.2.1.4.220112 を使用します。以下のように、agentodi.serviceが存在しないことを確認できます。

[opc@oracle-odi-inst-oqxx ~]$ systemctl list-unit-files --type=service |grep odi
manageappsodi.service                              enabled
mysqlodi.service                                   enabled
opcvncodi.service                                  disabled
oraclevncodi.service                               enabled
[opc@oracle-odi-inst-oqxx ~]$

エージェントを起動/停止するには、manageOdiApps.pyを使用する必要があります。
スクリプトを実行する前に、サービスの状態を確認しておくことをお勧めします。 (これはオプションです。)

サービスのステータスを確認
コマンド: sudo systemctl status manageappsodi.service

[opc@oracle-odi-inst-oqxx ~]$ sudo systemctl status manageappsodi.service
● manageappsodi.service - Multi Apps for ODI - instance
   Loaded: loaded (/usr/lib/systemd/system/manageappsodi.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2022-03-28 08:47:56 GMT; 1s ago
 Main PID: 6749 (python)
    Tasks: 24
   Memory: 233.7M
   CGroup: /system.slice/manageappsodi.service
           tq6749 /bin/python /u01/oracle/mwh/odi/common/scripts/manageOdiApps.py start
           mq6753 java -Drepo.props=odi-setup.properties -Doracle.jdbc.fanEnabled=FALSE -cp ../../sdk/lib/oracle.odi-sdk-jse.j...

Mar 28 08:47:56 oracle-odi-inst-oqxx systemd[1]: Started Multi Apps for ODI - instance .
Mar 28 08:47:56 oracle-odi-inst-oqxx python[6749]: Mar 28, 2022 8:47:56 AM oracle.security.jps.internal.config.xml.XmlCon...ation
Mar 28 08:47:56 oracle-odi-inst-oqxx python[6749]: INFO: JPS Config: /u01/oracle/mwh/odi/common/scripts/jps-config-jse.xml
Mar 28 08:47:56 oracle-odi-inst-oqxx python[6749]: Mar 28, 2022 8:47:56 AM oracle.security.jps.JpsStartup startWithRetry
Mar 28 08:47:56 oracle-odi-inst-oqxx python[6749]: INFO: Jps initializing.
Mar 28 08:47:57 oracle-odi-inst-oqxx python[6749]: Mar 28, 2022 8:47:57 AM oracle.security.jps.JpsStartup startWithRetry
Mar 28 08:47:57 oracle-odi-inst-oqxx python[6749]: INFO: Jps started.
Mar 28 08:47:57 oracle-odi-inst-oqxx python[6749]: Mar 28, 2022 8:47:57 AM oracle.odi.internal.util.OdiLogger info
Mar 28 08:47:57 oracle-odi-inst-oqxx python[6749]: INFO: New data source: [ODIMP_ODI_REPO/*******@jdbc:oracle:thin:@adw01...DW01]
Hint: Some lines were ellipsized, use -l to show in full.
[opc@oracle-odi-inst-oqxx ~]$

注意
ODI Marketplaceのドキュメントに、書き間違いがあります。
サービス名は、manageodiapps.serviceではなく、manageappsodi.service です。

Pythonスクリプトのディレクトリに移動
oracleユーザーに切り替えて、Pythonスクリプトのディレクトリに移動します。

[opc@oracle-odi-inst-oqxx ~]$ sudo su - oracle
Last login: Fri Mar 25 03:09:18 GMT 2022 on pts/2
[oracle@oracle-odi-inst-oqxx ~]$ cd /u01/oracle/mwh/odi/common/scripts
[oracle@oracle-odi-inst-oqxx scripts]$ ll manageOdiApps.py
-rw-r-----. 1 oracle oracle 5920 Jan 13 03:26 manageOdiApps.py
[oracle@oracle-odi-inst-oqxx scripts]$

エージェントを停止
コマンド: python manageOdiApps.py shutdown

[oracle@oracle-odi-inst-oqxx scripts]$ python manageOdiApps.py shutdown
Mar 28, 2022 8:43:10 AM oracle.odi.setup.util.ODIMPJettyServerAppsHelper shutdownProcess
INFO: ODI app server shutdown succesfully.
[oracle@oracle-odi-inst-oqxx scripts]$

エージェントの停止後に、「テスト」ボタンをクリックすると、以下のようなメッセージが表示されます。
image.png

エージェントを起動
コマンド: python manageOdiApps.py start

[oracle@oracle-odi-inst-oqxx scripts]$ python manageOdiApps.py start
Mar 28, 2022 8:29:23 AM oracle.security.jps.internal.config.xml.XmlConfigurationFactory validateFileLocation
INFO: JPS Config: /u01/oracle/mwh/odi/common/scripts/jps-config-jse.xml
Mar 28, 2022 8:29:24 AM oracle.security.jps.JpsStartup startWithRetry
INFO: Jps initializing.
Mar 28, 2022 8:29:24 AM oracle.security.jps.JpsStartup startWithRetry
INFO: Jps started.
......
2022-03-28 08:29:56.255:INFO:oejs.Server:main: Started @22441ms
2022-03-28 08:29:57.122 NOTIFICATION ODI-1137 Scheduler started for work repository WORKREP on Agent OracleDIAgent1.
2022-03-28 08:30:06.974 NOTIFICATION Inside cleanStaleSessions ::::::::::::::::::::::::::::::::::::
2022-03-28 08:30:07.097 NOTIFICATION Not an InternatlAgent ::::::::::::::::startContinueLoadPlansThread:::::::::::::::

エージェントの起動後に、「テスト」ボタンをクリックすると、以下のような成功メッセージが表示されます。
image.png

エージェントを再起動
コマンド: python manageOdiApps.py restart

注意
上記の起動・再起動のコマンドを実施した後、なぜセッションが終了しないのかと思われるかもしれません。ODI MPのドキュメントからの説明は次のとおりです。

「前述のpython manageOdiApps.pyコマンドのいずれかを実行すると、端末にjettyサーバーを実行するためのセッションが保持されます。他の操作を実行する場合は、新しい端末を開きます。 」

ということで、これは予想される動作です。他の操作を実行するには、新しいターミナルを開く必要があります。ちなみに、stopコマンドはセッションが保持されません。

以上


関連記事
オラクル・クラウドの個人シリーズ・ブログ
ODI On-PとODI MarketplaceとOCI Data Integrationの比較
OCIマーケットプレイスからODIインスタンスを作成する方法
Autonomous DBにODIレポジトリの作成方法

ドキュメント
ODI設定の管理

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0