- Newest
- Most votes
- Most comments
Hello,
Generally speaking, this error - Connection was closed before we received a valid response from endpoint URL:...
can happen due to several reasons such as -
- Network Connectivity issues
- Firewall block
- Packet filtering
- The remote API you called takes very long to respond or it is unreachable.
- Internet access issue in VPC etc
To summarize - This type of issue usually happens when there is a network issue from the client side.
Now for a deeper dive into the issue, you can run commands such as -
- time telnet greengrass.us-east-1.amazonaws.com 443
-
This command, will tell you how much time does your server keeps the connection open while a query response is sent by greengrass.
-
If you don’t have “time” and “telnet” installed on your system. Please install using following commands, if it is an Amazon Linux Image.
-
yum install time -y
-
yum install telnet -y
-
-
- route print
- The route print command will fetch us the route table on your instance which will give us an idea if there is anything on the instance blocking the subnet.
- You can also perform a nslookup or dig on the endpoint to check if there are any DNS issues.
- Finally, if you are still facing issues, as mentioned by Greg, you can run the debug parameter [3] to check the logs.
For example if I had an sts endpoint issue, I could run the --debug parameter like -
aws sts get-caller-identity --endpoint-url https://sts.eu-west-1.amazonaws.com --debug
References:
[1] https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/nslookup
[2] https://digwebinterface.com/
[3] https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-troubleshooting.html#general-debug
As you stated it happened to be a network issue at my side. It is working fine when I switched to a different network.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 2 years ago
Please run the publish command with the
--debug
switch so we may get a little more insight.