The user schungx is trying to use a custom S3 storage via a Flexify.IO server to replace Azure Blob Storage in Discourse but encounters errors. Initially, the error getaddrinfo: Name or service not known occurs because the bucket name (support) is incorrectly appended to the IP address as a subdomain, which is invalid. schleifer clarifies that the DISCOURSE_S3_ENDPOINT should be set to https://s3.flexify.io, not the IP address, and that the bucket name should not be part of the endpoint. Falco recommends following the official documentation for object storage setup. After adjusting the configuration and enabling sub-domain mode in Flexify.IO, schungx successfully resolves the issue and plans to update the wiki.
As I’m constantly frustrated by breakage of the Azure Blob Storage plugin, I’ve run a Flexify.IO server to translate the Azure into S3 protocol.
However, after setting into Discourse, it doesn’t work. The error is:
Failed to open TCP connection to support.xxx.xxx.xxx.xxx:443 (getaddrinfo: Name or service not known)
where xx.xx.xx.xx is the IP address of the S3 gateway and support is the bucket name…
Funny thing is… I’ve used S3 Browser to test the end-point and it just works.
So can some kind soul let me know what it is I’ve done wrong?
I can only see it is potentially due to the region, as the region exposed by the endpoint is eastasia (a valid Azure region) but I can only choose from standard AWS regions in a list. Nevertheless, it is still strange because the error seems to indicate failure to connect to the endpoint itself, and not a region mismatch.
You should try to follow the documentation on Using Object Storage for Uploads (S3 & Clones) for your use case. It’s a lot more flexible. When you get it working you can add it to the wiki too!
The error message says as much. getaddrinfo: Name or service not known is a DNS lookup failure; There will never be a hostname like “support.303.303.303.303”.
It is still trying to access support.??.??.??.??:443
So, I suppose in Discourse the bucket must form a sub-domain?
EDIT 1
Alright, I’ve scrapped the app.yaml settings and created a sub-domain with support on it that points to xx.xx.xx.xx. Now, when I upload, it spins for a long time, and then came back with a generic error: