First time here? Check out the FAQ!

CDN for image urls giving 504 error

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 ...

bryce's avatar
asked 2021-12-20 12:18:19 -0500
edit flag offensive 0 remove flag close merge delete


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

bwolven's avatar bwolven (2021-12-20 13:36:13 -0500) 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's avatar bryce (2021-12-20 15:24:59 -0500) edit

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

bwolven's avatar bwolven (2021-12-20 17:13:08 -0500) edit

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

bryce's avatar bryce (2021-12-20 17:25:01 -0500) edit

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

bwolven's avatar bwolven (2021-12-21 09:54:10 -0500) 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's avatar bryce (2021-12-21 11:59:43 -0500) edit

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

bryce's avatar bryce (2021-12-21 12:27:41 -0500) edit

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

bwolven's avatar bwolven (2021-12-21 13:48:49 -0500) 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's avatar MauiMLS (2021-12-21 15:18:15 -0500) 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's avatar bwolven (2021-12-21 15:24:30 -0500) 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's avatar MauiMLS (2021-12-21 15:50:48 -0500) edit

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

bwolven's avatar bwolven (2021-12-21 15:54:24 -0500) edit

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

MauiMLS's avatar MauiMLS (2021-12-21 16:00:54 -0500) edit

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

MauiMLS's avatar MauiMLS (2021-12-21 16:03:39 -0500) 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's avatar MauiMLS (2021-12-21 16:30:47 -0500) 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's avatar bryce (2021-12-21 17:07:00 -0500) 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's avatar bryce (2021-12-21 19:15:35 -0500) 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's avatar bryce (2021-12-21 19:21:03 -0500) 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's avatar bryce (2021-12-21 19:27:34 -0500) 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's avatar MauiMLS (2021-12-21 20:40:25 -0500) edit

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

MauiMLS's avatar MauiMLS (2021-12-21 20:44:46 -0500) edit

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

bwolven's avatar bwolven (2021-12-22 04:43:54 -0500) 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's avatar MauiMLS (2021-12-22 18:19:21 -0500) edit


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


Thanks for the response.

bryce's avatar bryce (2021-12-23 14:53:36 -0500) edit
add a comment see more comments

1 Answer


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.

bwolven's avatar
answered 2021-12-22 15:57:34 -0500, updated 2021-12-22 16:03:11 -0500
edit flag offensive 0 remove flag delete link


add a comment see more comments

Your Answer

Login/Signup to Answer