Thumbnails not being pulled

AI-generated summary

The discussion revolves around Thumbnails not being pulled in a Discourse migration. RubyRhod is migrating a 15-year-old community and experiencing issues with thumbnails not being generated for images hosted on an external server. The images are accessible, but thumbnails are not being created.

RubyRhod suspects a firewall problem due to the servers being in private IP space. Stephen suggests using an internal DNS server to resolve the issue.

Upon further investigation, RubyRhod discovers that the issue is due to the container resolving the asset server’s IP to an external IP instead of an internal one. Stephen recommends using ./launcher enter app to troubleshoot the issue.

RubyRhod resolves the issue by adding the internal IP to the container’s /etc/hosts file. However, Stephen notes that this solution may not persist between rebuilds and recommends troubleshooting the DNS chain instead. RubyRhod acknowledges this concern but points out that once the file has been brought into Discourse, the original will no longer be referenced.

I’m migrating a 15 year old community to discourse, and we’ve decided not to migrate the hundred thousand plus posts, rather selected ones of lasting value.

On the old board, images are saved as https://static.xxx/uploads/xxx.jpg. and we’ll keep that server alive post-migration.

When moving posts with images, it’s not grabbing and making the thumbnail, no matter whether I wrap the images in () or not. It does it for the current session but when I force-reload the page or another user looks at it, we get the broken picture icon:

The icon links directly to the picture on the static server, which is working fine. But thumbnails would be ‘nice’.

The only thing I can think of is a firewall problem - both servers are in private IP space, and the firewall prevents an internal server from accessing another via an external IP. I believe I’ve set this correctly in the host’s /etc/hosts file, but am NOT a docker expert. When I ping the static image server I get the correct internal IP address from regular command prompt. (note to self, enter the container and test from there)

Is there something else I need to do to force static.xx to be the internal IP? External images when wrapped with () are working as expected with the lightbox.

You could have it talk to an internal DNS server? It depends on your layer 3 topology but that would stop all loopback chatter.

when i ping the asset server i get the internal ip is docker using an alternate host file?

Use ./launcher enter app to find out.

aha thats the issue. resolves to external ip.
root@discourse-app:/var/www/discourse# cat /etc/hosts

127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.17.0.2 discourse-app

Added, and… success!

Altering the hosts file in the container won’t persist between rebuilds. Better to troubleshoot your DNS chain than bodge it.

That’s an issue… although once the file has been brought into discourse, the original will no longer be referenced, right?