メインコンテンツへスキップ

REST呼び出しでHTTP 502エラーが返される

Views:
321
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
CORE
Last Updated:

環境

  • ONTAP 9
  • /API / SnapMirrorへのパッチの適用

問題

  • SnapMirror <relationship-id> に対してREST APIコールPATCH が実行され<relationship-id>、関係quiesce試行されます。指定したreturn_timeout が渡されると、ONTAPは想定されるHTTP/200 またはHTTP/202 ではなくHTTP/502 エラーを返します。
> curl -ik -s -u <username>:<password> -X PATCH "https://<cluster_mgmt_lif>/api/snapmirror/relationships/<relationship-id>?failover=false&force-failover=false&force=false&failback=false&return_timeout=120" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"state\": \"paused\"}"
HTTP/1.1 502 Proxy Error
Date: Wed, 03 Aug 2022 10:13:41 GMT
Server: Apache
X-Content-Type-Options: nosniff
Cache-Control: no-cache,no-store,must-revalidate
Content-Length: 341
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request<p>Reason: <strong>Error reading from remote server</strong></p></p>
</body></html>
注:上記の例では10:11:41return_timeout120秒(ONTAP RESTがサポートする最大数)で実行しています。
  • apache_access.logHTTP/502 エラーを示していますが、周辺のログエントリのコンテキストでは5min + return_timeout によって遅延が発生しています。

[Wed Aug 03 10:18:38.554471 2022 +0000] "POST /servlets/netapp.servlets.admin.XMLrequest_filer HTTP/1.0" 200 190360 1537002 - 0 - 127.0.0.1 name-mapping-get-iter
[Wed Aug 03 10:13:41.088515 2022 +0000] "PATCH /api/snapmirror/relationships/<relationship-id>?failover=false&force-failover=false&force=false&failback=false&return_timeout=120 HTTP/1.1"502 341 300034196 - 0 + 127.0.0.1 -
[Wed Aug 03 10:18:40.333797 2022 +0000] "POST /servlets/netapp.servlets.admin.XMLrequest_filer HTTP/1.0" 200 191798 1701289 - 0 - 127.0.0.1 name-mapping-get-iter

  • audit.log に、return_timeout エラーとHTTP/502 エラーの長い時間後に要求が正常に返されたことを示します。

Wed Aug 03 2022 10:13:41 +00:00 [kern_audit:info:2561] 8503e80000a75342 :: <cluster_name>:http :: <REST-client-IP-address>:53495 :: <cluster_name>:<user_name> :: PATCH /api/snapmirror/relationships/<relationship-id>?failover=false&force-failover=false&force=false&failback=false&return_timeout=120 : { "state": "paused"} :: Pending
Wed Aug 03 2022 10:13:41 +00:00 [kern_audit:info:3229] 8503e80000a75342 :: <cluster_name>:http :: <REST-client-IP-address>:53495 :: <cluster_name>:<user_name> :: PATCH /api/snapmirror/relationships/<relationship-id>?failover=false&force-failover=false&force=false&failback=false&return_timeout=120 HTTP/1.1 :: Error: 502 Proxy Error
Wed Aug 03 2022 11:14:39 +00:00 [kern_audit:info:2561] 8503e80000a75342 :: <cluster_name>:http :: <REST-client-IP-address>:53495 :: <cluster_name>:<user_name> :: PATCH /api/snapmirror/relationships/<relationship-id>?failover=false&force-failover=false&force=false&failback=false&return_timeout=120 : { "state": "paused"} :: Success:

  • apache_error.log 元の要求がタイムアウトしてから5分後にREST APIサービス127.0.0.1:936 からのレポートタイムアウトが発生しました。
[Wed Aug 03 10:18:41.122493 2022 +0000] [proxy_http:error] [pid 12297:tid 34379805440] (70007)The timeout specified has expired: [client <REST-client-IP-address>:53495] AH01102: error reading status line from remote server 127.0.0.1:936
[Wed Aug 03 10:18:41.122529 2022 +0000] [proxy:error] [pid 12297:tid 34379805440] [client <REST-client-IP-address>:53495] AH00898: Error reading from remote server returned by /api/snapmirror/relationships/<relationship-id>
 
  • mgwd.logでは return_timeout の後にZSM エラーが表示されsnapmirror_relationship_rest が正常に返されるのは後になります。
Wed Aug 03 2022 10:13:41 +00:00 [kern_mgwd:info:2561] ZSM: parse error=Document is empty  {na_zapi_get_elem_from_raw_xml:1009}
Wed Aug 03 2022 11:13:30 +00:00 [kern_mgwd:info:2561]    snapmirror_relationship_rest.get_imp() returns: success (latency: 961.568391s) [<relationship-id>,<source_vserver>:<source_volume>,-,-,-,-,-,-,-,<destination_vserver>:<volume>,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,/api/snapmirror/relationships/<relationship-id>/,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-] (memory: -7188440 net, 7902568 max, 2199422456 allocated, 2206610896 freed, 14421787 allocations)
 

 

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.

 

  • この記事は役に立ちましたか?