AWS CloudWatch:EndpointConnectionError:无法连接到终端节点 URL

2024-04-11

我只是按照这些说明进行操作(Link http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/QuickStartEC2Instance.html%5D)以在我的 EC2 实例上安装 AWS CloudWatch。

  1. 我更新了我的存储库: sudo yum update -y
  2. 我安装了 awslogs 软件包: sudo yum install -y awslogs
  3. 我编辑了 /etc/awslogs/awscli.conf,确认我的 AZ 是 EC2 页面上的 us-west-2b
  4. 我保留了 /etc/awslogs/awslogs.conf 文件的默认配置,确认默认路径确实有日志写入其中
  5. 我检查了 /var/log/awslogs.log 文件,它反复显示错误: EndpointConnectionError:无法连接到端点 URL:“https://logs.us-west-2b.amazonaws.com/ https://logs.us-west-2b.amazonaws.com/"

    • 我没有按预期在 CloudWatch 控制台中看到任何新创建的日志组和日志流。我在这里缺少什么?

我应该指向除https://logs.us-west-2b.amazonaws.com/ https://logs.us-west-2b.amazonaws.com/?如果是的话,在哪里配置的?

提前致谢,

Graham


awscli.conf 需要区域而不是可用区。

将区域指定为 us-west-2。

这是参考页面的文档

Edit the /etc/awslogs/awscli.conf file and in the [default] section, specify the region where you want to view log data and add your credentials.

region = us-east-1
aws_access_key_id = <YOUR ACCESS KEY>
aws_secret_access_key = <YOUR SECRET KEY>

错误EndpointConnectionError: Could not connect to the endpoint URL: "https://logs.us-west-2b.amazonaws.com/"可能归因于区域指定错误。

US-WEST-2 中 cloudwatch 日志服务的正确端点是logs.us-west-2.amazonaws.com.

有关 aws 服务端点,请参阅以下文档http://docs.aws.amazon.com/general/latest/gr/rande.html#cwl_region http://docs.aws.amazon.com/general/latest/gr/rande.html#cwl_region

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

AWS CloudWatch:EndpointConnectionError:无法连接到终端节点 URL 的相关文章

随机推荐