Cannot send Django regions to XRAY on aws

0

I have a EC2 instance, with XRAY daemon installed in it. Also, policy AWSXRayDaemonWriteAccess is attached to the role.

Simple Django application deployed to EC2, with default xray configuration.

In the application logs I see:

File "/usr/local/lib/python3.9/site-packages/botocore/httpsession.py", line 352, in send raise EndpointConnectionError(endpoint_url=request.url, error=e) botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:2000/GetSamplingRules"

I have the following configurations in django app:

XRAY_RECORDER = {
'AWS_XRAY_CONTEXT_MISSING': 'LOG_ERROR',
'AWS_XRAY_TRACING_NAME': 'My application',
'PLUGINS': ('EC2Plugin', 'ECSPlugin'),
}
Why the application fails to connect to Xray daemon?

PS issuing the following command in EC2 terminal results in error:
curl "http://127.0.0.1:2000/GetSamplingRules"
error:
<AccessDeniedException>
<Message>Invalid operation: null</Message>
</AccessDeniedException>

voipp
已提問 3 年前檢視次數 215 次
1 個回答
0

managed to connect through curl

voipp
已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南