Ask Your Question

CDN for image urls giving 504 error

asked 2021-12-20 12:18:19 -0600

Images are failing to load on our feed processing server. CloudFront, the CDN Paragon is using, is saying that it can't establish a connection. We can receive the images when using a computer with a different IP address.

504 Error
The request Could not be satisfied.
Cloudfront attempted to establish a connection with origin, but either the attempt failed or the origin closed the connection. We can't connect to the server for this app or website at this time ...

edit retag flag offensive close merge delete


What RETS URL and account name are you using (NO PASSWORDS).
Can you provide one of the failing photo URLs?

bwolven gravatar imagebwolven ( 2021-12-20 13:36:13 -0600 )edit

We dug more into the issue. It's an issue when the image domain resolves to IPs in the subnet.

For the computer that we use to process images, resolves to On other computers it resolves to

bryce gravatar imagebryce ( 2021-12-20 15:24:59 -0600 )edit

Not sure why you are getting that error.
The URL you included displays the image without issue.
The "" resolves to for me.

bwolven gravatar imagebwolven ( 2021-12-20 17:13:08 -0600 )edit

Since it's CDN it should resolve to different servers based on location.

bryce gravatar imagebryce ( 2021-12-20 17:25:01 -0600 )edit

So your image download server is in a different location than the other computers?

bwolven gravatar imagebwolven ( 2021-12-21 09:54:10 -0600 )edit

I'm in Arizona, my office is in California. Our image server is in a colocation separate from the office.

A quick google of "CloudFront 504" shows that they often come up from a config or firewall issue on your end.

bryce gravatar imagebryce ( 2021-12-21 11:59:43 -0600 )edit

Are there any rules on image pulling that blocks IP addresses on repeated requests to access the same resource?

bryce gravatar imagebryce ( 2021-12-21 12:27:41 -0600 )edit

The only ones I know of are listed here but I thought it returned a 403 error:

bwolven gravatar imagebwolven ( 2021-12-21 13:48:49 -0600 )edit

I have the same 504 error when trying to download images (CentOS server)... It times out... We installed XAMMP on a local PC and connected to our CentOS grabber server's DB and using the same exact script we are able to download. We ran the script on another CentOS server we have and it also got the 504 error...

MauiMLS gravatar imageMauiMLS ( 2021-12-21 15:18:15 -0600 )edit

Any blocking that is done would be by IP address.
Is your second CentOS box resolving the CDN ip to the same 13.* address?

bwolven gravatar imagebwolven ( 2021-12-21 15:24:30 -0600 )edit

Here is an older screen cap from last week...I will get a screen cap from server 2 for you today... Any other things you would like me to test and share?

MauiMLS gravatar imageMauiMLS ( 2021-12-21 15:50:48 -0600 )edit

Have you tried one of the failing URLs in a browser on the CentOS boxes?

bwolven gravatar imagebwolven ( 2021-12-21 15:54:24 -0600 )edit

I don't have any GUI setup on those machines... terminals only... :)

MauiMLS gravatar imageMauiMLS ( 2021-12-21 16:00:54 -0600 )edit

I have been grabbing data for 5 years.. never had this problem... until last week...

MauiMLS gravatar imageMauiMLS ( 2021-12-21 16:03:39 -0600 )edit

I don't know if it would be helpful, but if you give me a list of the domains you'd like me to query to compare I can do that... The 13.35 network is the wrong dns resolving?

MauiMLS gravatar imageMauiMLS ( 2021-12-21 16:30:47 -0600 )edit

"I have been grabbing data for 5 years.. never had this problem... until last week..." Same here. Bruce, I think you're going to see this issue popping up much more frequently. It seems like timeout is between CloudFront and Paragons image server. Maybe some CloudFront CDN servers can't access the Paragon server? Whats odd too is that I was able to get these images on my local machine yesterday but now I'm seeing the 504 error.

bryce gravatar imagebryce ( 2021-12-21 17:07:00 -0600 )edit

Bruce, this might be useful for reproducing the issue.

  1. If I take this example image:

  2. Then I nslookup the domain on it:
    $ nslookup
    Server: Address:

Non-authoritative answer: canonical name = Name: Address: ...

bryce gravatar imagebryce ( 2021-12-21 19:15:35 -0600 )edit

You can see the IP address I get for that domain. If you use curl to get image and have the domain resolve to the same IP address I get for the domain, then you can get the same timeout issue.

  • $ curl '' --resolve
bryce gravatar imagebryce ( 2021-12-21 19:21:03 -0600 )edit

The curl command outputs:

  • <title>ERROR: The request could not be satisfied</title> </head><body>

    504 ERROR

    The request could not be satisfied.

    CloudFront attempted to establish a connection with the origin, but either the attempt failed or the origin closed the connection. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. Generated by cloudfront (CloudFront)
bryce gravatar imagebryce ( 2021-12-21 19:27:34 -0600 )edit

I tried your image same result: # wget --2021-12-21 18:38:56-- Resolving (,,, ... Connecting to (||:443... connected. HTTP request sent, awaiting response... 504 Gateway Time-out 2021-12-21 18:39:26 ERROR 504: Gateway Time-out.

MauiMLS gravatar imageMauiMLS ( 2021-12-21 20:40:25 -0600 )edit

2nd server same result: # wget --2021-12-21 18:42:28-- Resolving (,,, ... Connecting to (||:443... connec

MauiMLS gravatar imageMauiMLS ( 2021-12-21 20:44:46 -0600 )edit

Can you try the same image using HTTP instead of HTTPS?

bwolven gravatar imagebwolven ( 2021-12-22 04:43:54 -0600 )edit

I heard from my MLS that Paragon made some mods on their end.. I tested a few images on my 2 servers and they are downloading... Paragon needs an official support channel... This forum is really unacceptable for official support... Please pass on my thanks for addressing the issue.. Some details would be nice but probably beyond the scope of this organization... Merry Christmas!

MauiMLS gravatar imageMauiMLS ( 2021-12-22 18:19:21 -0600 )edit


Thanks for the update. I am able to get photos now as well.


Thanks for the response.

bryce gravatar imagebryce ( 2021-12-23 14:53:36 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-12-22 15:57:34 -0600

updated 2021-12-22 16:03:11 -0600

Is this a consistent error that happens every time you try to download an image? Is there a way like with the hosts file on windows to temporarily force to resolve to a non 13.* IP address such as the one that works on your computer.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2021-12-20 12:18:19 -0600

Seen: 505 times

Last updated: Dec 20 '21