報表逾時

您正在查看 Apigee Edge 說明文件。
查看 Apigee X 說明文件
資訊

問題

apigee-provision 指令碼建立新機構時,指令碼有時會結束,並顯示錯誤訊息。這個錯誤之後,如果您在嘗試查看 Edge UI 資訊主頁或任何數據分析資訊主頁,就會在新建機構看到「報表逾時」的錯誤訊息。

錯誤訊息

當您執行 apigee-provision 指令碼來建立新機構時,可能會看到以下錯誤訊息:

!!!! Error !!!! 
HTTP STATUS CODE: 400 
{ 
"code" : "dataapi.service.PGFoundInMultipleGroups", 
"message" : "dataapi.service.PGFoundInMultipleGroups", 
"contexts" : [ ] 
} 

即使收到這則錯誤訊息,您也可以在佈建指令碼結束後對新建立的機構執行操作。但是,當您嘗試查看 Edge UI 資訊主頁時,您會發現新建機構的錯誤訊息如下:

The report timed out
Try again with a smaller date range or a larger aggregation interval.

以下為顯示錯誤訊息的螢幕截圖:

可能原因

原因 說明 適用的疑難排解操作說明
多個 AX 群組設定 已建立多個數據分析群組,使用同一組 Postgres 伺服器。 Edge Private Cloud 使用者

原因:多個 AX 群組設定

診斷

  1. 執行下列 Analytics Groups Management API,判斷輸出結果是否顯示多個已定義的數據分析群組。例如:

    curl -u adminEmail:adminPwd http://<ms_ip>:8080/v1/analytics/groups/ax
    

    顯示兩個數據分析群組的範例輸出內容

    {  
     "name":"axgroup-001",
     "properties":{  
     },
     "scopes":[  
     ],
     "uuids":{  
        "qpid-server":[  
           "5c1e9690-7b58-499a-a4bb-d54454474b8f",
           "7794c428-e553-4ed2-843d-69f93bbec8a3"
        ],
        "postgres-server":[  
           "3b28b790-ec4e-45c5-a8d0-6d6f2088da65:750cd8ba-1799-4dfb-8c74-548010e95e5e"
        ]
     },
     "consumer-groups":[  
        {  
           "name":"consumer-group-001",
           "consumers":[  
              "5c1e9690-7b58-499a-a4bb-d54454474b8f",
              "7794c428-e553-4ed2-843d-69f93bbec8a3"
           ],
           "datastores":[  
              "3b28b790-ec4e-45c5-a8d0-6d6f2088da65:750cd8ba-1799-4dfb-8c74-548010e95e5e"
           ],
           "properties":{
           }
        }
     ],
     "data-processors":{  
     }
    },
    {  
     "name":"axgroup001",
     "properties":{  
        "consumer-type":"ax"
     },
     "scopes":[  
        "017pdspoint~dev",
        "010test~dev",
        "019charmo~dev",
        "009gcisearch1~dev",
        "000fj~trial-fjwan",
        "009dekura~dev",
        "008pisa~dev",
        "004fjadrms~dev",
        "018k5billing~dev",
        "004study14~dev",
        "001teama~dev",
        "005specdb~dev",
        "test~dev",
        "000fj~prod-fjwan",
        "012pjweb~dev",
        "020workflow~dev",
        "007ikou~prod-fjwan",
        "003asano~dev",
        "013mims~dev",
        "006studyhas~dev",
        "006efocus~dev",
        "002wfproto~dev",
        "008murahata~dev",
        "016mediaapi~dev",
        "015skillnet~dev",
        "014aclmanager~dev",
        "010fjppei~dev",
        "000fj~trial",
        "003esupport~dev",
        "000fj~prod",
        "005ooi~dev",
        "test~elb1",
        "007fjauth~dev",
        "011osp~dev",
        "002study~dev",
        "999test~dev"
     ],
     "uuids":{  
        "qpid-server":[  
           "5c1e9690-7b58-499a-a4bb-d54454474b8f",
           "7794c428-e553-4ed2-843d-69f93bbec8a3"
        ],
        "aries-datastore":[  
        ],
        "postgres-server":[  
           "3b28b790-ec4e-45c5-a8d0-6d6f2088da65:750cd8ba-1799-4dfb-8c74-548010e95e5e"
        ],
        "dw-server":[  
        ]
     },
     "consumer-groups":[  
        {  
           "name":"consumer-group-001",
           "consumers":[  
              "5c1e9690-7b58-499a-a4bb-d54454474b8f",
              "7794c428-e553-4ed2-843d-69f93bbec8a3"
           ],
           "datastores":[  
              "3b28b790-ec4e-45c5-a8d0-6d6f2088da65:750cd8ba-1799-4dfb-8c74-548010e95e5e"
           ],
           "properties":{  
           }
        }
     ],
     "data-processors":{  
     }
    }
    

    這個輸出結果顯示有兩個數據分析群組 axgroup-001axgroup001

  2. 確認所有數據分析群組都已定義範圍。

    在上述分析群組輸出的範例中,分析群組 axgroup-001 未定義任何範圍,但仍有將 Postgres 伺服器定義為資料儲存庫。

  3. 在 Qpid 伺服器上執行下方的 Qpid 佇列統計資料指令,確認步驟 2 中指定的特定分析群組是否沒有任何訊息。

    qpid-stat -q
    

    Qpid 佇列統計資料範例

    下列 Qpid 佇列統計資料指出上方引用範例 (axgroup-001) 的特定數據分析群組佇列沒有任何訊息:

    佇列 dur autoDel excl msg msgIn msgOut 位元組 bytesIn bytesOut cons bind
    140995fe-71a7-4000-a1f4-71b7a951da7f:0.0 0 0 0 0 0 0 1 2
    ax-q-axgroup-001-consumer-group-001 0 0 0 0 0 0 12 2
    ax-q-axgroup-001-consumer-group-001-dl 0 0 0 0 0 0 0 2
    ax-q-axgroup001-consumer-group-001 0 24.1 萬 24.1 萬 0 21.7 公克 21.7 公克 12 2
    ax-q-axgroup001-consumer-group-001-dl 323 323 0 52.4 公尺 52.4 公尺 0 0 2

    由於特定分析群組 axgroup-001 沒有任何訊息/流量,因此您在 Edge UI 資訊主頁或數據分析資訊主頁中觀察到「報表逾時」錯誤。

解析度

如要解決這個問題,請刪除沒有任何範圍的 axgroup,而且不能取得任何流量。

請按照下列步驟刪除 axgroup

步驟 1:刪除特定 Axgroup 的取用端。

  1. 請使用下列 Management API 從 axgroup 移除每個取用端:

    curl -v -u admin@email.com:password -X DELETE -H 'Accept:application/json' -H 'Content-Type:application/json' 'http://{mgmt-server-host}:8080/v1/analytics/groups/ax/{axgroup-name}/consumer-groups/{consumer-group-name}/consumers/{uuid-of the consumer}'
    
  2. 如有多個取用者,請重複執行上述 API 呼叫,並在個別的 API 呼叫中提及每個消費者的 UUID。

    以上例來說,下列 API 會移除 UUID 5c1e9690-7b58-499a-a4bb-d54454474b8f: 的消費者

    curl -v -X DELETE -H 'Accept:application/json' -H 'Content-Type:application/json' 'http://localhost:8080/v1/analytics/groups/ax/axgroup-001/consumer-groups/consumer-group-001/consumers/5c1e9690-7b58-499a-a4bb-d54454474b8f'
    
    {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ ],
      "uuids" : {
        "qpid-server" : [ "5c1e9690-7b58-499a-a4bb-d54454474b8f", "7794c428-e553-4ed2-843d-69f93bbec8a3" ],
        "postgres-server" : [ "3b28b790-ec4e-45c5-a8d0-6d6f2088da65:750cd8ba-1799-4dfb-8c74-548010e95e5e" ]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "7794c428-e553-4ed2-843d-69f93bbec8a3" ],
        "datastores" : [ "3b28b790-ec4e-45c5-a8d0-6d6f2088da65:750cd8ba-1799-4dfb-8c74-548010e95e5e" ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
    * Connection #0 to host localhost left intact
    * Closing connection #0
    }
    
  3. 重新執行相同的 API,以刪除目前範例中 UUID 為 7794c428-e553-4ed2-843d-69f93bbec8a3 的其他取用端。

步驟 2:移除消費者群組

  1. 請使用下列管理 API 將消費者群組從特定 axgroup 中移除:

    curl -v -u admin@email.com:password -X DELETE 'http://{mgmt-server-host}:8080/v1/analytics/groups/ax/{axgroup-name}/consumer-groups/{consumer-group-name}'
    

    範例:

    下列 API 會刪除消費性群組名稱 consumer-group-001:

    curl -v -X DELETE 'http://localhost:8080/v1/analytics/groups/ax/axgroup-001/consumer-groups/consumer-group-001'
    {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ ],
      "uuids" : {
        "qpid-server" : [ "5c1e9690-7b58-499a-a4bb-d54454474b8f", "7794c428-e553-4ed2-843d-69f93bbec8a3" ],
        "postgres-server" : [ "3b28b790-ec4e-45c5-a8d0-6d6f2088da65:750cd8ba-1799-4dfb-8c74-548010e95e5e" ]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ ],
        "datastores" : [ "3b28b790-ec4e-45c5-a8d0-6d6f2088da65:750cd8ba-1799-4dfb-8c74-548010e95e5e" ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
    * Connection #0 to host localhost left intact
    * Closing connection #0
    }
    

步驟 3:從 axgroup 刪除 qpid-servers

  1. 使用下列管理 API 從特定 axgroup 刪除 qpid-servers

    curl -X DELETE -u admin@email.com "http://localhost:8080/v1/analytics/groups/ax/{axgroup-name}/servers?uuid={qpid-server-uuid}type=qpid-server" -H "Content-type: application/json"
    
  2. 如果有多個 Qpid 伺服器,重新執行相同的 API 呼叫。

    範例:

    使用以下 API 刪除目前範例中具有 UUID 7794c428-e553-4ed2-843d-69f93bbec8a3 的 Qpid 伺服器:

    curl -X DELETE "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/servers?uuid=7794c428-e553-4ed2-843d-69f93bbec8a3&type=qpid-server" -H "Content-type: application/json"
    
    {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ ],
      "uuids" : {
        "qpid-server" : [ "5c1e9690-7b58-499a-a4bb-d54454474b8f" ],
        "postgres-server" : [ "3b28b790-ec4e-45c5-a8d0-6d6f2088da65:750cd8ba-1799-4dfb-8c74-548010e95e5e" ]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ ],
        "datastores" : [ "3b28b790-ec4e-45c5-a8d0-6d6f2088da65:750cd8ba-1799-4dfb-8c74-548010e95e5e" ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
    }
    

步驟 4:從 axgroup 刪除 postgres 伺服器

  1. 如果只有一個 Postgres 伺服器,請使用下列管理 API 刪除 Postgres 伺服器:

    curl -v -X DELETE -H 'Accept:application/json'  "http://{mgmt-server-host}:8080/v1/analytics/groups/ax/{axgroup-name}/servers?uuid={postgres-server-uuid}&type=postgres-server&force=true"
    
  2. 如果您已設定主節點和 Postgres 從屬伺服器,請使用下列管理 API 刪除 Postgres 伺服器

    curl -v -X DELETE -H 'Accept:application/json'  "http://{mgmt-server-host}:8080/v1/analytics/groups/ax/{axgroup-name}/servers?uuid={postgres-master-uuid,postgres-slave-uuid}&type=postgres-server&force=true"
    

    範例:

    上例中,有主伺服器和從屬 Postgres 伺服器,因此您可以使用下列 API 來刪除 Postgres 伺服器:

    curl -v -X DELETE -H 'Accept:application/json'  "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/servers?uuid=3b28b790-ec4e-45c5-a8d0-6d6f2088da65,750cd8ba-1799-4dfb-8c74-548010e95e5e&type=postgres-server&force=true"
    
    {
    "name" : "axgroup-001",
    "properties" : {
    },
    "scopes" : [ ],
    "uuids" : {
    "qpid-server" : [ ],
    "postgres-server" : [ ]
    },
    "consumer-groups" : [ ],
    "data-processors" : {
    }
    * Connection #0 to host localhost left intact
    * Closing connection #0
    }
    
    

步驟 5:移除數據分析群組

  1. 請使用下列管理 API 移除數據分析群組:

    curl -v -X DELETE "http://{mgmt-server-host}:8080/v1/analytics/groups/ax/{axgroup-name}"
    

    範例:

    curl -v -X DELETE "http://localhost:8080/v1/analytics/groups/ax/axgroup-001"
    {
      "properties" : {
      },
      "scopes" : [ ],
      "uuids" : {
      },
      "consumer-groups" : [ ],
      "data-processors" : {
      }
    * Connection #0 to host localhost left intact
    * Closing connection #0
    }
    

步驟 6:檢查群組是否已完全移除

  1. 請使用下列管理 API 檢查特定數據分析群組是否已完全移除:

    curl -v -u admin@email.com -X GET "http://{mgmt-server-host}:8080/v1/analytics/groups/ax 
    

    範例:

    curl localhost:8080/v1/analytics/groups/ax
    [ {
      "name" : "axgroup001",
      "properties" : {
        "consumer-type" : "ax"
      },
      "scopes" : [ "017pdspoint~dev", "010test~dev", "019charmo~dev", "009gcisearch1~dev", "000fj~trial-fjwan", "009dekura~dev", "008pisa~dev", "004fjadrms~dev", "018k5billing~dev", "004study14~dev", "001teama~dev", "005specdb~dev", "test~dev", "000fj~prod-fjwan", "012pjweb~dev", "020workflow~dev", "007ikou~prod-fjwan", "003asano~dev", "013mims~dev", "006studyhas~dev", "006efocus~dev", "002wfproto~dev", "016mediaapi~dev", "015skillnet~dev", "014aclmanager~dev", "010fjppei~dev", "000fj~trial", "003esupport~dev", "000fj~prod", "005ooi~dev", "test~elb1", "007fjauth~dev", "011osp~dev", "002study~dev" ],
      "uuids" : {
        "qpid-server" : [ "5c1e9690-7b58-499a-a4bb-d54454474b8f", "7794c428-e553-4ed2-843d-69f93bbec8a3" ],
        "aries-datastore" : [ ],
        "postgres-server" : [ "3b28b790-ec4e-45c5-a8d0-6d6f2088da65:750cd8ba-1799-4dfb-8c74-548010e95e5e" ],
        "dw-server" : [ ]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "5c1e9690-7b58-499a-a4bb-d54454474b8f", "7794c428-e553-4ed2-843d-69f93bbec8a3" ],
        "datastores" : [ "3b28b790-ec4e-45c5-a8d0-6d6f2088da65:750cd8ba-1799-4dfb-8c74-548010e95e5e" ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
    } ]
    

    請注意,在上述輸出內容中,沒有與 axgroup-001 這個分析群組相關的資訊。確認 axgroup-001 已完全移除。

步驟 7:重新啟動程序

以下在 Qpid 和 Postgres 機器上執行下列程序:

  1. 重新啟動 apigee-qpidd。
  2. 重新啟動 Edge-qpid-server。
  3. 重新啟動 Edge-postgres-server。
  4. 重新啟動 apigee-postgresql。

步驟 8:驗證

確認數據分析資訊主頁中是否顯示了資料。

如果問題仍未解決,請參閱「必須收集診斷資訊」一文。

收集診斷資訊的必要性

如果按照上述指示操作後仍無法解決問題,請收集以下診斷資訊。請與 Apigee Edge 支援團隊聯絡,分享收集到的資訊。

  1. Private Cloud 安裝的架構設定 (安裝的主機數量,以及每個元件的數量)。
  2. 下列指令的輸出內容:

    1. Analytics (分析) 群組

      curl -u sysadminEmail:sysadminPwd   http://{mgmt-server-host}:8080/v1/analytics/groups/ax
      
    2. 每部 Qpid 機器上的 Qpid 佇列統計資料

      qpid-stat -q
      
    3. Analytics (分析) 狀態

      curl -u sysadminEmail:sysadminPwd http://{mgmt-server-host}:8080/v1/organizations/{org-name}/environments/{environment-name}/provisioning/axstatus