- Newest
- Most votes
- Most comments
I figured out what was wrong.
- nginx only resolves proxy_pass DNS hostnames on startup
- awstrack.me IP addresses rotate on a regular basis, apparently every couple of days
This means when awstrack IPs change, nginx proxies requests to old IP addresses. Every time we restarted our nginx it would work for a couple of days and then stop working again. The solution is to force nginx to re-resolve the awstrack host regularly. This has to be done in an awkward manner by storing the awstrack.me hostname in a variable, and adding a resolver clause to the nginx config. Here are some posts describing this
Hello.
Are there any logs output in the Nginx access log or error log that could lead to troubleshooting?
Also, I'm concerned about the fact that it was functioning for several days.
By the way, does it improve if I restart Nginx?
Yes there are logs. We are using a custom log format:
log_format proxy_log
'[$time_local] a $remote_addr u $remote_user h "$host$request_uri" r $request '
's $status b $body_bytes_sent ref "$http_referer" h "$http_host" '
'ua "$http_user_agent" xfor "$http_x_forwarded_for"'
' Proxy: $proxy_host $proxy_port $upstream_addr $upstream_http_host us $upstream_status';
Here is an excerpt of some working requests, to show how the logs should look like. The line from 20:03:53 is the last 200 we got in the night of Sunday, after that it's only 403s. I just noticed that there are lots and lots of 403s even before that. Which means it wasn't even properly working before. Anyway, the 403s are the upstream_status, which means they come from AWS.
[18/Aug/2024:20:03:00 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/REDACTED" r GET /CI0/REDACTED HTTP/2.0 s 200 b 43 ref "-" h "click.chordify.net" ua "Mozilla/5.0 (Linux; Android 14; SM-S901W Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/127.0.6533.66 Mobile Safari/537.36" xfor "-" Proxy: r.us-east-1.awstrack.me 443 34.238.100.36:443 - us 200
[18/Aug/2024:20:03:00 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/REDACTED" r GET /CI0/REDACTED HTTP/2.0 s 499 b 0 ref "-" h "click.chordify.net" ua "Mozilla/5.0" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.72.15.49:443 - us -
[18/Aug/2024:20:03:05 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/REDACTED" r GET /CI0/REDACTED HTTP/2.0 s 403 b 45 ref "-" h "click.chordify.net" ua "Mozilla/5.0 (Linux; Android 8.0.0; SM-A320FL Build/R16NW; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.165 Mobile Safari/537.36" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.71.132.198:443 - us 403
[18/Aug/2024:20:03:18 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/REDACTED" r GET /CI0/REDACTED HTTP/2.0 s 200 b 43 ref "-" h "click.chordify.net" ua "Mozilla/5.0 (Linux; Android 8.0.0; SM-A320FL Build/R16NW; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.165 Mobile Safari/537.36" xfor "-" Proxy: r.us-east-1.awstrack.me 443 34.238.100.36:443 - us 200
[18/Aug/2024:20:03:19 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/REDACTED" r GET /CI0/REDACTED HTTP/2.0 s 403 b 45 ref "-" h "click.chordify.net" ua "Mozilla/5.0" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.71.132.198:443 - us 403
[18/Aug/2024:20:03:22 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/REDACTED" r GET /CI0/REDACTED HTTP/1.1 s 200 b 43 ref "-" h "click.chordify.net" ua "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)" xfor "-" Proxy: r.us-east-1.awstrack.me 443 34.238.100.36:443 - us 200
[18/Aug/2024:20:03:26 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/REDACTED" r GET /CI0/REDACTED HTTP/2.0 s 403 b 45 ref "-" h "click.chordify.net" ua "Mozilla/5.0" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.71.132.198:443 - us 403
[18/Aug/2024:20:03:29 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CL0/REDACTED" r GET /CL0/REDACTED HTTP/2.0 s 302 b 0 ref "-" h "click.chordify.net" ua "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.72.15.49:443, 34.238.100.36:443 - us 504, 302
[18/Aug/2024:20:03:43 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/REDACTED" r GET /CI0/REDACTED HTTP/2.0 s 403 b 45 ref "-" h "click.chordify.net" ua "Mozilla/5.0" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.71.132.198:443 - us 403
[18/Aug/2024:20:03:45 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/REDACTED" r GET /CI0/REDACTED HTTP/2.0 s 499 b 0 ref "-" h "click.chordify.net" ua "Mozilla/5.0" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.72.15.49:443 - us -
[18/Aug/2024:20:03:53 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/REDACTED" r GET /CI0/REDACTED HTTP/1.1 s 200 b 43 ref "-" h "click.chordify.net" ua "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)" xfor "-" Proxy: r.us-east-1.awstrack.me 443 34.238.100.36:443 - us 200
After 20:03:53 it's only 403s. There are some 499s, not sure where they are coming from, but they don't seem to come from AWS since there is no upstream_status.
[18/Aug/2024:20:06:20 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CL0/redacted" r GET /CL0/redacted HTTP/2.0 s 403 b 45 ref "-" h "click.chordify.net" ua "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36 Edg/127.0.0.0" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.71.132.198:443 - us 403
[18/Aug/2024:20:06:23 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/redacted" r GET /CI0/redacted HTTP/1.1 s 403 b 45 ref "-" h "click.chordify.net" ua "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.72.15.49:443, 52.71.132.198:443 - us 504, 403
[18/Aug/2024:20:06:27 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/redacted" r GET /CI0/redacted HTTP/2.0 s 499 b 0 ref "-" h "click.chordify.net" ua "Mozilla/5.0" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.72.15.49:443 - us -
[18/Aug/2024:20:06:31 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/redacted" r GET /CI0/redacted HTTP/1.1 s 499 b 0 ref "-" h "click.chordify.net" ua "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.72.15.49:443 - us -
[18/Aug/2024:20:06:34 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/redacted" r GET /CI0/redacted HTTP/2.0 s 499 b 0 ref "-" h "click.chordify.net" ua "Mozilla/5.0" xfor "-" Proxy: r.us-east-1.awstrack.me 443 34.238.100.36:443 - us -
[18/Aug/2024:20:06:42 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/redacted" r GET /CI0/redacted HTTP/1.1 s 403 b 45 ref "-" h "click.chordify.net" ua "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.71.132.198:443 - us 403
[18/Aug/2024:20:06:45 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/redacted" r GET /CI0/redacted HTTP/1.1 s 403 b 45 ref "-" h "click.chordify.net" ua "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.71.132.198:443 - us 403
[18/Aug/2024:20:06:46 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/redacted" r GET /CI0/redacted HTTP/2.0 s 499 b 0 ref "-" h "click.chordify.net" ua "Mozilla/5.0" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.72.15.49:443 - us -
[18/Aug/2024:20:06:51 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CI0/redacted" r GET /CI0/redacted HTTP/1.1 s 403 b 45 ref "-" h "click.chordify.net" ua "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.71.132.198:443 - us 403
[18/Aug/2024:20:06:51 +0200] a ZZZ.ZZZ.ZZZ.ZZZ u - h "click.chordify.net/CL0/redacted" r GET /CL0/redacted HTTP/2.0 s 403 b 45 ref "-" h "click.chordify.net" ua "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" xfor "-" Proxy: r.us-east-1.awstrack.me 443 52.71.132.198:443 - us 403
Relevant content
- asked 3 years ago
- asked 10 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
