「重複する名前または sys_id がある MID サーバーを接続できませんでした (MID Server with a duplicate name or sys_id was prevented from connecting)」の問題をデバッグして解決する方法Description<!-- div.margin{ padding: 10px 40px 40px 30px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:2; } table.internaltable { white-space:nowrap; text-align:left; border-width: 1px; border-collapse: collapse; font-size:14px; width: 85%; } table.internaltable th { border-width: 1px; padding: 5px; border-style: solid; border-color: rgb(245, 245, 245); background-color: rgb(245, 245, 245); } table.internaltable td { border-width: 1px; padding: 5px; border-style: solid; border-color: #E0E0E0; color: #000000; } .title { color: #D1232B; font-weight:normal; font-size:28px; } h1{ color: #D1232B; font-weight:normal; font-size:21px; margin-bottom:-5px } h2{ color: #646464; font-weight:bold; font-size:18px; } h3{ color: #000000; font-weight:BOLD; font-size:16px; text-decoration:underline; } h4{ color: #646464; font-weight:BOLD; font-size:15px; text-decoration:; } h5{ color: #000000; font-weight:BOLD; font-size:13px; text-decoration:; } h6{ color: #000000; font-weight:BOLD; font-size:14px; text-decoration:; } ul{ list-style: disc outside none; margin-left: 0; } li { padding-left: 1em; } --> 症状 MID サーバーの問題テーブル [ecc_agent_issue] に、次のようなレコードが表示されることがあります。 A MID Server with a duplicate name or sys_id was prevented from connecting. Install path: C:\MID_SERVER\Prod_Disco_MID\agent. This issue must be manually resolved. 次の内容が表示される場合もあります。 The home directory changed from C:\MID_SERVER\Prod_Disco_MID\agent to C:\MID_SERVER\Prod_Disco_MID - Copy\agent. This issue must be manually resolved. 他の症状には以下のようなものがあります。 ログの取得時など、ECC キュー内で各出力に対して 2 つの入力が返されるエージェントのログが以下のいずれかを報告する SEVERE *** ERROR *** Failed to rename ECC enqueued item from ecc_queue.<番号>.tmp to ecc_queue.<番号>.xmlStartupSequencer WARNING *** WARNING *** Encountered error: [An active MID Server with a duplicate name detected.] in ensuring agent record on the instance."ECCSender.1 SEVERE *** ERROR *** Comparison method violates its general contract! スレッドが 1 つだけ期待される場合に複数のスレッドが表示される (例:2 つの「ECCSender.1」) リリース すべて。 原因 インストールした MID サーバーには、それぞれ一意の名前と sys_id が必要です。MID サーバーは、ECC キューでは名前で参照され、他のほとんどの場所では sys_id で参照されます。 インストールフォルダーがコピーされるか、同じフォルダーに対して 2 番目のサービスが作成されると、このルールが破綻する可能性があります。 既存の MID サーバーのインストールフォルダーが別のホストサーバーにコピーされ、そのサーバー上でも開始された。既存の MID サーバーのインストールフォルダーが同じホストサーバーの別のフォルダーにコピーされ、開始された。 既存の MID サーバーのインストールフォルダーに、そのフォルダーを指して実行されている複数の Windows サービスがある 同じ config.xml ファイルが使用されるため、すべてのケースで同じ MID サーバー名と Sys ID パラメーターが使用されます。 ケース 1 と 2 は、通常、追加の MID サーバーを簡単にインストールできるよう、インストール済みの MID サーバーを手動でコピーしたことが原因です。 ケース 1 は、サーバーのフェイルオーバー構成で、誤って両方のホストが同時に稼働している場合にも確認されています。これは、一方のホストが起動したときに、もう一方のホストが確実にオフラインになるように設定することで解決できます。 ケース 2 では、2 番目のサービスをインストールするためにフォルダーをコピーした後に、複製の wrapper-override.conf 内の Windows サービス名を変更する必要があります。 ケース 3 では、wrapper-override.conf 内の Windows サービス名を変更してから starts.bat を再度実行するか、または installer.bat の前に start.bat を実行する必要があります。次を参照してください。PRB1330396/KB0743123 別のサービスを作成する前に、インストールフォルダーの Windows サービスがすでに存在しているかどうかを MID サーバーの start.bat が確認しない (MID Server start.bat fails to check if a Windows Service already exists for the installation folder before creating another service) PRB1380840/KB0792539 MID サーバーの start.bat がインストーラーの実行中状態を確認せずに「snc_mid」Windows サービスを作成し、同時に config.xml/wrapper-override.conf ファイルに意味のない値が含まれているため、同じインストールフォルダーに対してサービスが重複する可能性がある (MID Server start.bat will create a "snc_mid" Windows Service without checking that the installer has been run yet, while the config.xml/wrapper-override.conf files still have nonsensible values, leading to duplicate services for the same install folder) 解決策 調査 既存の MID サーバーのインストールフォルダーが別のホストサーバーにコピーされる MID サーバーフォームには、関連するホストサーバーの 1 つが表示されます。もう 1 つのサーバーが何であるかを調べるには、各MID サーバーから 10分ごとにインスタンスに送信される XML 統計情報の入力を使用できます。 [ECC] -> [キュー (Queue)] を選択し、ECC キュー [ecc_queue] テーブルを開きます 以下のフィルターをかけます Topic IS queue.statsAgent IS mid.server.<MID Server name> ソース別にグループ化しますリストに、重複する MID サーバーがインストールされている各ホスト名別にグループ化されて表示されます。 これで、調査が必要なホスト サーバーが分かりました。次のセクションでは、もう 1 つのホスト上のフォルダーとサービスを見つけることができます。 既存の MID サーバーのインストールフォルダーが同じホストサーバーの別のフォルダーにコピーされる 「ホームディレクトリが変更されました... (The home directory changed...)」という問題レコードも表示されている場合は、該当するインストールフォルダーについての有益な情報になります。情報が確認できない場合は、以下のようにします。 ローカルアドミニストレーターとしてコマンドプロンプトを開きます。次を実行します。 wmic service get | findstr /c:"\conf\wrapper.conf" /c:"DisplayName" これによって、以下のような行が出力されます (分かりやすくするために多数の列を削除し、多少並べ替えています)。 DisplayName Name StartMode State PathName ServiceNow MID Server_Prod_Disco_MID snc_mid_Prod Disco MID Auto Running C:\MID_SERVER\Prod_Disco_MID\agent\bin\wrapper-windows-x86-64.exe -s C:\MID_SERVER\Prod_Disco_MID\agent\conf\wrapper.conf wrapper.console.flush=true wrapper.internal.namedpipe=1065211260 ServiceNow MID Server snc_mid Auto Running "C:\MID_SERVER\Prod_Disco_MID - Copy\agent\bin\wrapper-windows-x86-64.exe" -s "C:\MID_SERVER\Prod_Disco_MID - Copy\agent\conf\wrapper.conf" wrapper.console.flush=true wrapper.internal.namedpipe=0356311188 または、ecc_queue 出力レコードを作成して、同じコマンドの「Command」トピックジョブを実行し、インスタンスを介して同じ情報を取得することもできます。 DisplayName:MMC/コントロールパネルの [サービス (Services)] リストに表示される名前 Name:実際のサービス名StartMode:サービスの開始方法Auto は、ホストサーバーの起動時に実行されることを意味します。State:実行中/停止中 PathName:インストールされる場所 既存の MID サーバーのインストールフォルダーに、そのフォルダーを指している複数の Windows サービスがある このケースは上記と似ていますが、2 つのサービスのインストールフォルダーは同じです。 DisplayName Name StartMode State PathName ServiceNow MID Server_Prod_Disco_MID MID1 snc_mid_Prod Disco MID Auto Running C:\MID_SERVER\Prod_Disco_MID\agent\bin\wrapper-windows-x86-64.exe -s C:\MID_SERVER\Prod_Disco_MID\agent\conf\wrapper.conf wrapper.console.flush=true wrapper.internal.namedpipe=1065211260 ServiceNow MID Server_Prod_Disco_MID MID1xxx snc_mid Auto Running C:\MID_SERVER\Prod_Disco_MID\agent\bin\wrapper-windows-x86-64.exe -s C:\MID_SERVER\Prod_Disco_MID\agent\conf\wrapper.conf wrapper.console.flush=true wrapper.internal.namedpipe=0258404434 この場合は、\agent\conf\wrapper-override.conf ファイルをチェックして、正しいサービス名を確認する必要があります。以下に例を挙げます。 ################################################################################# Windows Service################################################################################# The following properties must be unique per MID installed on the same system.## REQUIRED: Name token of the servicewrapper.name=snc_mid_Prod Disco MID# REQUIRED: Display name of the servicewrapper.displayname=ServiceNow MID Server_Prod Disco MID もう 1 つのサービス名は複製です。 既存の MID サーバーのインストールフォルダーに、そのフォルダーを対象に実行されている 1 つ以上の Linux プロセスがある ディスカバリーは Linux ホストで次のコマンドを使用して実行中のプロセスを確認するため、同じコマンドを使用してこれを確認できます。 ps awwxo pid,ppid,command | sed -n '/<defunct>/!p' また、出力には、MID サーバーのエージェントフォルダーごとの Java プロセスとラッパープロセスのみが含まれています。この例では、3 つのペアが表示されています。 12225 1 /var/opt/mid/1d/agent/bin/./wrapper-linux-x86-64 /var/opt/mid/1d/agent/bin/../conf/wrapper.conf wrapper.syslog.ident=mid wrapper.pidfi... 12311 12225 /var/opt/mid/1d/agent/jre/bin/java -Djava.util.logging.config.file=properties/glide.properties -Dsun.net.maxDatagramSockets=65535 -Dco... 28126 1 /var/opt/mid/1d/agent/bin/./wrapper-linux-x86-64 /var/opt/mid/1d/agent/bin/../conf/wrapper.conf wrapper.syslog.ident=mid wrapper.pidfi... 28140 28126 /var/opt/mid/1d/agent/jre/bin/java -Djava.util.logging.config.file=properties/glide.properties -Dsun.net.maxDatagramSockets=65535 -Dco... 33456 1 /var/opt/mid/1d/agent/bin/./wrapper-linux-x86-64 /var/opt/mid/1d/agent/bin/../conf/wrapper.conf wrapper.syslog.ident=mid wrapper.pidfi... 33569 33456 /var/opt/mid/1d/agent/jre/bin/java -Djava.util.logging.config.file=properties/glide.properties -Dsun.net.maxDatagramSockets=65535 -Dco... 修復プロセス ここまでで、サービス名とインストールフォルダーの場所、維持するフォルダーと削除が必要なフォルダーが判明しています。 ローカルアドミニストレーターとしてコマンドプロンプトを開きます。このコマンドを使用して、複製のサービスを停止します。 net stop <名前>例:net stop "snc_mid_Prod_Disco_MID MID1xxx" このコマンドを使用して、サービスを削除します。 sc delete <名前>例:sc delete "snc_mid_Prod_Disco_MID MID1xxx" 同じ MID サーバーに 2 つのフォルダーが存在する場合は、今後同様の問題が発生しないように、インストールフォルダーをアーカイブしてから削除します。警告:誤ってバックアップ/複製のフォルダーから start.bat が実行されると、PRB1330396 の問題が発生して元に戻る可能性があります。維持している MID サーバーの Windows サービスを停止し、開始して、サービスがまだ正しく機能しているか確認すること、また古い ecc_queue 出力を取得することをお勧めします。 Linux サーバーに対して同様の作業を実施する必要があります。