

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 对 S3 接入点问题进行故障排除
<a name="troubleshooting-access-points-for-fsxn"></a>

本节介绍从 S3 接入点访问 FSx 数据时遇到问题的症状、原因和解决方案。

## 由于文件系统用户身份查询失败，S3 接入点创建失败
<a name="name-mapping"></a>

创建和连接 S3 接入点时，[https://docs.aws.amazon.com/fsx/latest/APIReference/API_OntapFileSystemIdentity.html#FSx-Type-OntapFileSystemIdentity-Type](https://docs.aws.amazon.com/fsx/latest/APIReference/API_OntapFileSystemIdentity.html#FSx-Type-OntapFileSystemIdentity-Type)必须提供。您负责在 ONTAP 中配置提供的 UNIX 或 Windows 用户。

如果提供[https://docs.aws.amazon.com/fsx/latest/APIReference/API_OntapUnixFileSystemUser.html](https://docs.aws.amazon.com/fsx/latest/APIReference/API_OntapUnixFileSystemUser.html)了，则 ONTAP 必须能够将 UnixUser 名称映射到 UNIX U GIDs ID/。ONTAP 使用[名称服务交换机配置](https://docs.netapp.com/us-en/ontap/nfs-admin/ontap-name-service-switch-config-concept.html)来确定如何执行此映射。

```
> vserver services name-service ns-switch show
```

```
Vserver         Database       Order
--------------- ------------   ---------
svm_1           hosts          files,
                               dns
svm_1           group          files,
                               ldap
svm_1           passwd         files,
                               ldap
svm_1           netgroup       nis,
                               files
```

 请确保您在 UnixUser `passwd`和`group`数据库中有使用有效来源（`files``ldap`、等）的条目。可以使用`vserver services name-service unix-user`和`vserver services name-service unix-group`命令配置`files`源。可以使用`vserver services name-service ldap`命令配置`ldap`源。

 如果提供[https://docs.aws.amazon.com/fsx/latest/APIReference/API_OntapWindowsFileSystemUser.html](https://docs.aws.amazon.com/fsx/latest/APIReference/API_OntapWindowsFileSystemUser.html)了，则 ONTAP 必须能够在加入的 Active Directory 域中找到该 WindowsUser 名称。

 要确认提供的 UnixUser 或映射 WindowsUser 是否正确，`fsxadmin`可以使用以下命令（替换为 f `-unix-user-name` o `-win-name` r WindowsUsers）：

```
> vserver services access-check authentication show-creds -node FsxId0fd48ff588b9d3eee-01 -vserver svm_name -unix-user-name root -show-partial-unix-creds true
```

成功输出示例：

```
 UNIX UID: root

 GID: daemon
 Supplementary GIDs:
  daemon
```

不成功的输出示例：

```
Error: Acquire UNIX credentials procedure failed
  [  2 ms] Entry for user-name: unmapped-user not found in the
           current source: FILES. Entry for user-name: unmapped-user
           not found in any of the available sources
**[     3] FAILURE: Unable to retrieve UID for UNIX user
**         unmapped-user

Error: command failed: Failed to resolve user name to a UNIX ID. Reason: "SecD Error: object not found".
```

 不正确的用户映射可能会导致 S3 `Access Denied` 出现错误。请参阅下面的失败原因示例。

**`Entry for user-name not found in the current source: LDAP`**

如果您配置`ns-switch`为使用`ldap`源，请确保 ONTAP 已配置为正确使用您的 LDAP 服务器。有关更多信息 [NetApp，请参阅配置 LDAP 的技术报告](https://www.netapp.com/pdf.html?item=/media/19423-tr-4835.pdf)。

**`RESULT_ERROR_DNS_CANT_REACH_SERVER` 或 `RESULT_ERROR_SECD_IN_DISCOVERY`**

此错误表示 ONTAP 中虚拟服务器的 DNS 配置存在问题。运行以下命令以确保您的虚拟服务器的 DNS 配置正确：

```
> dns check -vserver svm_name
```

**`NT_STATUS_PENDING`**

此错误表示与域控制器通信时出现问题。根本原因可能是由于缺乏中小型企业积分。有关更多信息，请参阅 [NetApp KB](https://kb.netapp.com/on-prem/ontap/da/NAS/NAS-KBs/How_ONTAP_implements_SMB_crediting)。

## 由于未装入卷，S3 接入点创建失败。
<a name="junction"></a>

只能 FSx 为已安装的 ONTAP 卷（具有接合路径）连接到 S3 接入点。这也适用于 DP（数据保护）卷类型。有关更多信息，请参阅 [ONTAP 卷装载文档](https://docs.netapp.com/us-en/ontap/nfs-admin/mount-unmount-existing-volumes-nas-namespace-task.html)。

## 由于 SVM 上已禁用 S3 协议，S3 接入点创建失败
<a name="s3-protocol-not-allowed"></a>

S3 接入点要求在存储虚拟机 (SVM) 上启用 S3 协议。要启用 S3 协议，请使用`fsxadmin`以下命令在 ONTAP CLI 中运行以下命令：

```
> vserver add-protocols -vserver svm_name -protocols s3
```

要验证协议是否已启用，请执行以下操作：

```
> vserver show -vserver svm_name -fields allowed-protocols,disallowed-protocols
```

## 文件系统无法处理 S3 请求
<a name="no-request-handling"></a>

如果特定工作负载的 S3 请求量超过文件系统处理流量的容量，则可能会遇到 S3 请求错误（例如`Internal Server Error``503 Slow Down`、和`Service Unavailable`）。您可以使用 Amazon CloudWatch 指标（例如和`CPU utilization`）主动监控文件系统的性能`Network throughput utilization`并发出警报。如果您发现性能下降，则可以通过增加文件系统的吞吐容量来解决此问题。

## 使用自动创建的服务角色的默认 S3 接入点权限拒绝访问
<a name="ap-arn-format"></a>

某些 S3 集成 AWS 服务将创建自定义服务角色并针对您的特定用例自定义附加权限。将您的 S3 接入点别名指定为 S3 资源时，这些附加的权限可能包括使用存储桶 ARN 格式（例如`arn:aws:s3:::my-fsx-ap-foo7detztxouyjpwtu8krroppxytruse1a-ext-s3alias`）而不是接入点 ARN 格式（例如）的接入点。`arn:aws:s3:us-east-1:1234567890:accesspoint/my-fsx-ap`要解决此问题，请修改策略以使用接入点的 ARN。