本文介绍了AWS CloudWatch:EndpointConnectionError:无法连接到终端URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是按照以下说明进行操作()在我的EC2实例上安装了AWS CloudWatch。

I just followed these instructions (Link) to get AWS CloudWatch installed on my EC2 instance.


  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:


  • 我看不到任何新创建的日志组和日志流在CloudWatch控制台中按预期进行。我在这里想念什么?

我应该指向其他端点吗?比吗?如果是这样,在哪里配置?

Should I be pointing at some other endpoint other than https://logs.us-west-2b.amazonaws.com/ ? If so, where is that configured?

预先感谢

Graham

推荐答案

awscli.conf需要区域而不是AZ。

The awscli.conf expects the region and not the AZ.

将区域指定为我们-west-2。

Specify the region as 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 :无法连接到端点URL: https://logs.us-west-2b.amazonaws.com/
可能归因于错误的区域指定。

The errorEndpointConnectionError: Could not connect to the endpoint URL: "https://logs.us-west-2b.amazonaws.com/"could be attributed to wrong specification of region.

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

The correct endpoint for the cloudwatch logs service in US-WEST-2 islogs.us-west-2.amazonaws.com.

请参阅以下文档,以了解AWS服务端点

Please refer to the following documentation for aws service endpointshttp://docs.aws.amazon.com/general/latest/gr/rande.html#cwl_region

这篇关于AWS CloudWatch:EndpointConnectionError:无法连接到终端URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-17 11:20