Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Create and access a list of your products

NetWorker:如何啟用 RabbitMQ 偵錯

Summary: 本 KB 概述 rabbitmq 服務、關聯的記錄檔,以及可應用的其他偵錯。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

RabbitMQ

RabbitMQ 由 NetWorker 伺服器作為 Message Broker 代理程式服務使用,在 NetWorker 伺服器程序 (nsrd) 和 NetWorker 使用的其他服務之間提供訊息佇列機制,例如 authc、NetWorker Management Console (NMC)、NetWorker Web 使用者介面 (NWUI) 等。RabbitMQ 服務問題導致 NetWorker 伺服器服務關閉;一般訊息會記錄在 NetWorker 伺服器的 daemon.raw:

  • Linux: /nsr/logs/daemon.raw
  • Windows: ..\Program Files\EMC NetWorker\nsr\logs\daemon.raw
    137911 YYYY-MM-DD HH:mm:SS AM/PM  5 5 0 313919296 1615791 0 NW_SERVER-NAME nsrctld NSR critical Aborting startup sequence: Process /opt/nsr/rabbitmq-server-3.8.18/bin/rabbitmq-server exited in less than 10 seconds at startup: exit code 0
    127108 YYYY-MM-DD HH:mm:SS AM/PM  5 5 0 313919296 1615791 0 NW_SERVER-NAME nsrctld NSR critical Failed to start all daemons; shutting down...
  • 如何顯示 daemon.raw:https://www.dell.com/support/kbdoc/000022793/

 

記錄檔:

記錄路徑會依使用的 rabbitmq-server 版本而有所不同。NetWorker 版本可能包含較新版本的 RabbitMQ。您可以在 NetWorker 安裝和 NetWorker 管理指南中找到特定版本的詳細資料,網址為: https://www.dell.com/support/home/en-us/product-support/product/networker/docs

Linux 記錄位置:
/nsr/logs/daemon.raw NetWorker 服務記錄
/opt/nsr/rabbitmq-server*/var/log/rabbitmq/log/crash.log RabbitMQ 當機記錄,此目錄包含 crash.log#,視記錄輪替而定。
/opt/nsr/rabbitmq-server*/var/log/rabbitmq/rabbit@localhost.log RabbitMQ 一般記錄
/opt/nsr/rabbitmq-server*/var/log/rabbitmq/rabbit@localhost_upgrade.log RabbitMQ 升級記錄
/nsr/tmp/rabbitmq/cores/erl_crash.dump 當機堆疊追蹤記錄

 

Windows 記錄位置 (預設安裝位置)
C:\Program Files\EMC NetWorker\nsr\logs\daemon.raw NetWorker 服務記錄
C:\Program Files\EMC NetWorker\nsr\tmp\RabbitMQ\log\log\crash.log RabbitMQ 當機記錄,此目錄包含 crash.log#,視記錄輪替而定。
C:\Program Files\EMC NetWorker\nsr\tmp\RabbitMQ\log\rabbit@HOSTNAME.log RabbitMQ 一般記錄
C:\Program Files\EMC NetWorker\nsr\tmp\RabbitMQ\log\rabbit@HOSTNAME_upgrade.log RabbitMQ 升級記錄
C:\Program Files\EMC NetWorker\nsr\tmp\RabbitMQ\cores\erl_crash.dump 當機堆疊追蹤記錄

 

偵錯:

偵錯選項可能因 RabbitMQ 版本而有不同。版本顯示於以下位置的 rabbitmq-server 資料夾:

  1. NetWorker 19.6-19.9: 3.8.18
  2. NetWorker 19.10:3.11.16
  1. Linux: /opt/nsr/rabbitmq-server-#.#.#
  2. Windows..\Program Files\EMC NetWorker\nsr\rabbitmq-server-#.#.#
    1. 製作原始 rabbitmq.config 的複本。
      Linux: /opt/nsr/rabbitmq-server-3.8.18/etc/rabbitmq/rabbitmq.config
      Windows: ..\Program Files\EMC NetWorker\nsr\rabbitmq-server-3.8.18\etc\rabbitmq.config
    2. 編輯 rabbitmq.config 檔案,包含下列行:
      Linux:
      %% {log_levels, [{channel, info}, {connection, info}, {federation, info}, {mirroring, info}]},
            {log_levels, [{connection, debug}, {queue, debug}]},
                 {log,
                      [{file, [{level, debug}]},
                      {categories,
                          [{connection,
                              [{level, debug}]
                          },
                          {queue,
                              [{level, debug}]
                          }
                          ]
                      }]
                  },
      注意:註解行 (%%) 已經存在,變更可新增在此行下方。
      Windows:
      在文件上方新增以下醒目顯示的行。
      [  
       {rabbit, 
       [{tcp_listeners, []}, 
       {log_levels, [{connection, debug}, {queue, debug}]},
                 {log,
                      [{file, [{level, debug}]},
                      {categories,
                          [{connection,
                             [{level, debug}]
                          },
                          {queue,
                              [{level, debug}]
                          }
                          ]
                      }]
                  },            
          {ssl_listeners, [5671]}, 
    3. 嘗試啟動 NetWorker 服務:
      Linux: systemctl restart networker
      Windows: net stop nsrd /y && net start nsrd
    4. 監控 rabbit@localhost.log (若是 Linux)、rabbit@NODE.log (若是 Windows) 及 crash.log 是否有可能阻止 RabbitMQ 啟動的錯誤。

 

警告:此偵錯的目的在於主動進行故障診斷。舉例來說,當 RabbitMQ 無法啟動時。它不應在使用中的 NetWorker 伺服器上啟用及自動執行。如果 RabbitMQ 正常運作,此偵錯可能會使用數千個與 java 的連接埠連線,這可能會使其停止回應 NetWorker 伺服器及其使用者介面。完成故障診斷後,透過將 rabbitmq.config 檔案回復到其預設設定,或回復到新增偵錯行之前建立的 rabbitmq.config 檔副本來移除偵錯。停用偵錯後,RabbitMQ 需要重新啟動 NetWorker 服務,才能重新載入組態檔案。

 

RabbitMQ 執行時,NetWorker 伺服器應讓連接埠 5671 (SSL) 進行接聽。

nsrports -t localhost -p 5671

您可以使用以下命令取得接聽 5671 上程序的程序 ID (PID)。與連接埠 5671 相關聯的程序應來自 rabbitmq-server。

Linux:

netstat -apno | grep 5671
ps -ef | grep PID

範例:

nve:~ # netstat -apno | grep 5671
tcp        0      0 192.168.9.101:52676     192.168.9.101:5671      ESTABLISHED 2607/gstd           keepalive (5922.75/0/0)
tcp        0      0 :::5671                 :::*                    LISTEN      5238/beam.smp       off (0.00/0/0)
tcp        0      0 192.168.9.101:52654     192.168.9.101:5671      ESTABLISHED 2128/java           off (0.00/0/0)
tcp        0      0 ::1:5671                ::1:50974               ESTABLISHED 5238/beam.smp       off (0.00/0/0)
tcp        0      0 ::1:50974               ::1:5671                ESTABLISHED 5519/nsrjobd        keepalive (5922.75/0/0)
tcp        0      0 192.168.9.101:52668     192.168.9.101:5671      ESTABLISHED 2128/java           off (0.00/0/0)
tcp        0      0 192.168.9.101:5671      192.168.9.101:52654     ESTABLISHED 5238/beam.smp       off (0.00/0/0)
tcp        0      0 192.168.9.101:5671      192.168.9.101:52676     ESTABLISHED 5238/beam.smp       off (0.00/0/0)
tcp        0      0 192.168.9.101:5671      192.168.9.101:52668     ESTABLISHED 5238/beam.smp       off (0.00/0/0)

nve:~ # ps -ef | grep 5238
root      5238  5232  0 Jun05 ?        00:02:55 /opt/nsr/rabbitmq-server-3.11.16/erts-13.2.2/bin/beam.smp -W w -MBas ageffcbf -MHas ageffcbf -MBlmbcs 512 -MHlmbcs 512 -MMmcs 30 -P 1048576 -t 5000000 -stbt db -zdbbl 128000 -sbwt none -sbwtdcpu none -sbwtdio none -B i -- -root /opt/nsr/rabbitmq-server-3.11.16 -bindir /opt/nsr/rabbitmq-server-3.11.16/erts-13.2.2/bin -progname erl -- -home /nsr/rabbitmq -- -pa  -noshell -noinput -s rabbit boot -boot start_sasl -syslog logger [] -syslog syslog_error_logger false -kernel prevent_overlapping_partitions false
root      5247  5238  0 Jun05 ?        00:00:00 erl_child_setup 1024
root     26598 26408  0 11:42 pts/0    00:00:00 grep --color=auto 5238

 

Windows:

netstat -ano | findstr 5671
wmic process where "ProcessID='PID'" get ProcessID,ExecutablePath

範例:

PS C:\Users\Administrator.AMER> netstat -ano | findstr 5671
  TCP    0.0.0.0:5671           0.0.0.0:0              LISTENING       356
  TCP    192.168.9.123:5671     192.168.9.123:63097    ESTABLISHED     356
  TCP    192.168.9.123:5671     192.168.9.123:63098    ESTABLISHED     356
  TCP    192.168.9.123:63097    192.168.9.123:5671     ESTABLISHED     6324
  TCP    192.168.9.123:63098    192.168.9.123:5671     ESTABLISHED     6324
  TCP    [::]:5671              [::]:0                 LISTENING       356
  TCP    [::1]:5671             [::1]:63105            ESTABLISHED     356
  TCP    [::1]:5671             [::1]:63106            ESTABLISHED     356
  TCP    [::1]:63105            [::1]:5671             ESTABLISHED     4676
  TCP    [::1]:63106            [::1]:5671             ESTABLISHED     776

PS C:\Users\Administrator.AMER> wmic process where "ProcessID='356'" get ProcessID,ExecutablePath
ExecutablePath                                                         ProcessId
C:\Program Files\EMC NetWorker\nsr\rabbitmq-server-3.8.18\bin\erl.exe  356

 

Additional Information

Affected Products

NetWorker

Products

NetWorker Family, NetWorker Series
Article Properties
Article Number: 000212107
Article Type: How To
Last Modified: 18 Jul 2024
Version:  5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.