远程服务器返回错误:(401) unauthorized
适用场景
- ONTAP 9
- ONTAP AV连接器1.0.6
问题描述
ONTAP AV连接器1.0.6无法连接到管理LIF
REST API call to <ip-address> using account "<account>" failed. The remote server returned an error: (401) Unauthorized
ONTAP AV Connector log
- ONTAP或ASUP日志:
APACHE-ERROR.log
[dot:error] [client <ip-address>:x] [vserver ID x] [service rest] Denied access to role 'vsadmin' for user '<account>'
[authz_core:error] [client <ip-address>:x] user encrypt: authorization failure for "/api/network/ip/interfaces":
[dot:error] [client <ip-address>:x] [vserver ID x] [service rest] Denied access to role 'vsadmin' for user '<account>'
[authz_core:error] [client <ip-address>:x] user encrypt: authorization failure for "/api/cluster":
ONTAP AV connector log (e.g. avshim.log)
Curl request to <ip-address> failed with http error code 401
Error 22: HTTP response code said error
Failed to fetch data LIF(s) from <ip-address>
Problem fetching vserver LIFs from mgmt-lif <ip-address>
vserver services web show
表示没有为名称条目列出任何角色rest
、security
(角色:无):
示例:
::> vserver services web show -vserver <vserver> -name rest
- 此角色无权访问API
/api/cluster
和/api/network/ip/interfaces
::> security login show -user-or-group-name <account> -vserver <vserver> -instance
::> security login show -vserver <vserver> -role <role>
::> security login role show -vserver <vserver> -role <role> -cmddirname "network interface"
::> security login rest-role show -vserver <vserver> -role <role> -api /api/cluster
::> security login rest-role show -vserver <vserver> -role <role> -api /api/network/ip/interfaces