• 1
  • 3
  • 4
  • 5
  • 6
  • 7(current)
Solved [JAPAN only] HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins
#91
Image

Unclosed again - world wide problem solved.
For the record when mirrorbits is completely down but nginx is running, everyone gets a 502 (which makes sense)
#92
unfortunately the worldwide fix didn't do anything for the Japanese problem :-(
Still getting 502s here.

Checking for proxies using the two above links shows no proxies in play here - transparent or otherwise.
happy to help out with some testing but haven't used irc since the 90s so might need some babysitting on getting that going.
#93
Yeah so the new idea I have is that it must be a bug in mirrorbits itself, or maybe something is wrong in the geoiplite database.
I'm going to ask the guy who wrote it, and @wsnipex might have an idea as well since he studied the code quite a bit.
#94
Guys, just to remind you, I wrote it here before and repeating myself - this issue is not Japan only. I live on Russia's Sakhalin island - very close to Japan and keep getting this 502 error. So the statement in the brackets in the topic title isn't 100% true Smile

http://pastebin.com/kzxJt8Kt
#95
Yeah, same ASN. Same issue.
#96
Thanks Kib for interesting information. It's helpful as I'm not familiar with Kodi site system.

Here is my humble thoughts seeing new info.

Kodi site successfully detect my server is in Japan.
Code:
$ wget -q -O - "http://mirrors.kodi.tv/addons/isengard/context.artwork.downloader.auto/context.artwork.downloader.auto-1.0.1.zip?mirrorlist" | egrep "You are connecting|We " | sed 's/<[a-z/ ]*>//g'
You are connecting with IP address 52.192.61.254, which belongs to autonomous system Amazon.com, Inc. (ASN16509).
We believe you are near Tokyo in Japan and have selected mirrors based on this.

And when I added "X-Forwarded-For", Kodi site failed to detect my site. (Maybe geoip consider proxy-ed connection is unable to detect source IP.)
Code:
$ wget --header="X-Forwarded-For: unknown" -q -O - "http://mirrors.kodi.tv/addons/isengard/context.artwork.downloader.auto/context.artwork.downloader.auto-1.0.1.zip?mirrorlist" | egrep "You are connecting|We " | sed 's/<[a-z/ ]*>//g'
You are connecting with IP address unknown, which belongs to autonomous system  (ASN0).
We were not able to use your IP to approximate your location, so have chosen the mirrors at random.

I checked multiple machine in different location, and this symptom is same.

Considering the fact that adding "X-Forwarded-For" avoid the problem, I now think;
(a) the code to detect client region by IP source location does not have problem
(b) the code to select one mirror to redirect have a problem when "Japan" is supplied to the code


Also, as for farcus's finding -- some URL succeed and some is not.
This is also same at my place, and adding "X-Forwarded-For" resolved the issue too.
So I guess Kib's trick to add "X-Forwarded-For" is applied only to some particular URLs (not applied to all URLs).


Hope this helps some.
#97
thanks for this info, this helped me reproduce the issue.
Can you please try again and see if it now works for you?
#98
I am also near Tokyo. I tried four URLs that were consistently giving me a 502 before and they all work now. Tested on Softbank fiber and Docomo LTE - both work fine. Yes!

-Ray Mercer
#99
(2016-02-05, 12:54)wsnipex Wrote: thanks for this info, this helped me reproduce the issue.
Can you please try again and see if it now works for you?

It worked!! The issue is gone now! Thank you!!!Nod
thanks for the feedback and for having patience with us Smile
All credits go to wsnipex for figuring out what it was. Still weird it was mostly affecting users in that part of the world though!
closed as solved.
  • 1
  • 3
  • 4
  • 5
  • 6
  • 7(current)

Logout Mark Read Team Forum Stats Members Help
[JAPAN only] HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins1