Problem description
The "Connect to oss failed: [Errno -2] Name or service not known" error message appears when you upload resources to OSS.
Causes
The error is reported due to one of the following reasons:
The endpoint that you specify is invalid.
The DNS server cannot work as expected.
Solutions
Check whether the endpoint that you specify is valid. For more information, see Regions and endpoints.
Check whether domain name resolution is normal. You can
pingthe OSS domain name on the server for testing, such asping shj-test.oss-cn-hangzhou.aliyuncs.com. You can also run thenslookupcommand to view the resolution details.
Applicable scope
OSS