執行階段記錄檔

使用執行階段記錄檔,協助診斷 apigee-runtime Pod 的問題。每個執行階段 Pod 都包含訊息處理器,負責處理 API Proxy 流量、執行政策、轉送要求等。

使用執行階段記錄

記錄是排解安裝問題的好方法。詳情請參閱「記錄」。

使用 logs 指令

您可以使用 kubectl logs 指令查看執行階段系統記錄。例如:

kubectl logs -f -n hybrid apigee-runtime-apigee-gcp-prod1-test-blue-hd77q

查看檔案系統中的記錄檔

您可以在 apigee-runtime Pod 的檔案系統中找到訊息處理器記錄檔。如要查看檔案,請在 apigee-runtime Pod 中開啟殼層:

kubectl exec -it -n namespace apigee-runtime-pod-name bash

例如:

kubectl exec -it -n hybrid apigee-runtime-apigee-gcp-prod1-test-blue-cnj5x bash

開啟 Pod Shell 後,您可以在 /opt/apigee/var/log/apigee-runtime/config.log 下方找到混合式訊息處理器記錄。

合約版本資訊

下表簡要說明與從管理平面載入合約相關的記錄項目:

記錄檔項目 意義
hybrid-runtime Apigee-Timer-9 INFO RUNTIME-SYNC-SERVICE - RuntimeSyncServiceImpl.updateToVersion() : Switched to newer version 750 from version null MP 已改用新版設定合約。
hybrid-runtime Apigee-Timer-6 INFO RUNTIME-SYNC-SERVICE - RuntimeSyncServiceImpl.loadLatestVersionIfAvailable() : Found a newer version 750 MP 已從 version.properties載入最新合約設定版本。
hybrid-runtime Apigee-Timer-6 INFO RUNTIME-SYNC-SERVICE - RuntimeSyncServiceImpl.updateToVersion() : Attempting to update to a newer version 750 MP 正在更新至較新版本的設定合約。
hybrid-runtime Apigee-Timer-6 INFO RUNTIME-SYNC-SERVICE - RuntimeSyncServiceImpl.updateToVersion() : Switched to newer version 751 from version 750 MP 已從 version.properties載入最新合約設定版本。

部署錯誤

下列執行階段錯誤與 Proxy 部署作業有關:

記錄檔項目 意義
hybrid-runtime org:hybrid env:prod Apigee-Main-6 ERROR i.a.h.e.i.HermesEngineImpl - HermesEngineImpl.handleHermesException() : Keyspace cache_hybrid_hybrid does not exist Cassandra 中未佈建鍵空間「cache_orgname_hybrid」。
hybrid-runtime org:hybrid Apigee-Timer-9 ERROR c.a.s.e.k.HybridEncryptionKeyServiceImpl - HybridEncryptionKeyServiceImpl.getEncryptionKey() : Encryption key does not exist for organization hybrid and type KmsKey Cassandra 中未佈建鍵空間「kms_orgname_hybrid」。

訊息處理工具部署錯誤記錄

在訊息處理器記錄中,尋找下列部署錯誤項目:

記錄項目 說明
hybrid-runtime org:hybrid env:prod Apigee-Main-6 ERROR i.a.h.e.i.HermesEngineImpl - HermesEngineImpl.handleHermesException() : Keyspace cache_hybrid_hybrid does not exist 鍵空間 cache_orgname_hybrid is not provisioned in Cassandra.
hybrid-runtime org:hybrid Apigee-Timer-9 ERROR c.a.s.e.k.HybridEncryptionKeyServiceImpl - HybridEncryptionKeyS erviceImpl.getEncryptionKey() : Encryption key does not exist for organization hybrid and type KmsKey Cassandra 中未佈建鍵空間「kms_orgname_hybrid」。

訊息處理工具錯誤代碼

訊息處理工具的錯誤代碼開頭為 runtime.sync.error-name。 例如:

記錄項目 意義
runtime.sync.ContractLoadFailedMessage: Error loading spec file 原因:錯誤可能是因為架構無效、合約規格檔案毀損或合約無效所致。上述任何問題都可能導致訊息處理工具無法載入規格檔案。

解決方法:確認合約規格檔案可用、檔案系統未損毀,或結構定義/合約有效。