简体   繁体   中英

AWS [Errno -2] Name or service not known

I used SSH Secure Shell and run with linux command line and tried to stop and start the Instance. But I got error. Does anyone know how to solve this?

Command as below:

[tomcat@dlap54v ~]$ aws ec2 stop-instances --instance-ids i-e3a2b929

Command Output:

HTTPSConnectionPool(host='ec2.ap-southeast-1a.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)

It's because of region. I used Asia Pacific (Singapore) for the region because I am from Singapore. It keeps show error like "Name or service not known" So, what you can do is choose US East(N.Virgina). It's working for me now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM