Kodi Community Forum
Solved [JAPAN only] HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Website and Forum Issues or Suggestions (https://forum.kodi.tv/forumdisplay.php?fid=35)
--- Thread: Solved [JAPAN only] HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins (/showthread.php?tid=237874)

Pages: 1 2 3 4 5 6 7


RE: Keep getting HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - woomg - 2015-11-08

"Korea Users" have still problem to use mirrors.kodi.tv site for install addons. Early September, it was solved. But from end of October this problem issued again and still have problem.

When I try to install addon via other country's proxy, I can install without problem.

Please help on this issue....

woomg


RE: Keep getting HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - Kib - 2015-11-08

We need more information, what does your debug log say? Where are you being redirected to?


RE: Keep getting HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - woomg - 2015-11-10

(2015-11-08, 10:38)Kib Wrote: We need more information, what does your debug log say? Where are you being redirected to?

Here is log when I install addon from KODI default repository.
=======
11:44:23 T:123145303990272 NOTICE: Thread FileCache start, auto delete: false
11:44:24 T:123145321775104 ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 502
11:44:24 T:123145321775104 ERROR: CCurlFile::Open failed with code 502 for http://mirrors.kodi.tv/addons/gotham/script.games.rom.collection.browser/script.games.rom.collection.browser-2.1.2.zip
11:44:24 T:123145321775104 ERROR: CAddonInstallJob[script.games.rom.collection.browser]: failed to download special://home/addons/packages/script.games.rom.collection.browser-2.1.2.zip
11:44:24 T:123145303990272 NOTICE: Thread BackgroundLoader start, auto delete: false
11:44:30 T:123145303990272 NOTICE: Thread LanguageInvoker start, auto delete: false
=======

If I try to download addon files using web browser.

http://mirrors.kodi.tv/addons/isengard/resource.language.ko_kr/resource.language.ko_kr-1.0.3.zip
This file can be downloaded. (I found download log from browser, it was actually downloaded from http://trumpetti.atm.tut.fi/xbmc/addons/isengard/resource.language.ko_kr/resource.language.ko_kr-1.0.3.zip ) It is really strange. I lived in Korea(East Asia), but download redirect to Finland(?) in Europe.

http://mirrors.kodi.tv/addons/isengard/resource.language.ko_kr/resource.language.ko_kr-1.0.5.zip
"502 Bad Gateway" error issued.

What is different between two files?

When I try to install addon via other country's proxy, I can install without problem (only have speed issue).

Regards,
woomg

PS] I think you are one of server admin of KODI.tv, so could you create mirror site at http://ftp.kaist.ac.kr which is one of BIG mirror site in Korea (contact to ftp at http://ftp.kaist.ac.kr)?


RE: Keep getting HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - Ragebond - 2015-11-10

I have the same issue (I live in Japan).

Log from Kodi
======
11:53:05 T:11596 DEBUG: CCurlFile::Open - effective URL: <http://trumpetti.atm.tut.fi/xbmc/addons/gotham/service.subtitles.subscenter/icon.png>
11:53:05 T:11620 ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 502
11:53:05 T:11620 ERROR: CCurlFile::Open failed with code 502 for http://mirrors.kodi.tv/addons/gotham/metadata.common.movieposterdb.com/metadata.common.movieposterdb.com-1.1.2.zip
11:53:05 T:11620 ERROR: CAddonInstallJob[metadata.common.movieposterdb.com]: failed to download special://home/addons/packages/metadata.common.movieposterdb.com-1.1.2.zip
11:53:05 T:11620 ERROR: CAddonInstallJob[metadata.universal]: failed to install dependency metadata.common.movieposterdb.com
======

I tried directly from Chrome to access http://mirrors.kodi.tv/addons/gotham/metadata.common.movieposterdb.com/metadata.common.movieposterdb.com-1.1.2.zip same issue.
I tried with a VPN (IP from France) and it worked.

DNS request to mirrors.kodi.tv points to 89.16.176.16.
I tried with my ISP's DNS and with the google's DNS (8.8.8.8),same result.

Here is the wireshark trace between my computer and 89.16.176.16:

========
GET /addons/gotham/metadata.common.movieposterdb.com/metadata.common.movieposterdb.com-1.1.2.zip HTTP/1.1
Host: mirrors.kodi.tv
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36
Accept-Encoding: gzip, deflate
Accept-Language: fr,en-US;q=0.8,en;q=0.6,ja;q=0.4
Cookie: mybb[lastvisit]=1447121061; mybb[threadread]=a%3A4%3A%7Bi%3A237787%3Bi%3A1447116117%3Bi%3A194545%3Bi%3A1447118260%3Bi%3A183114%3Bi%3A1447121061%3Bi%3A237874%3Bi%3A1447123932%3B%7D; mybb[lastactive]=1447124127; loginattempts=1; mybbuser=71319_eGKj3QkPh1jTpv4Tdul7zwn3dsgJP7gZARwCwJDj5QxbFlkBd8; sid=554e3b5616a9a54a88a89821ab16dfc6; _ga=GA1.2.1030180076.1447036983

HTTP/1.1 502 Bad Gateway
Server: nginx/1.8.0
Date: Tue, 10 Nov 2015 02:58:09 GMT
Content-Type: text/html
Content-Length: 574
Connection: keep-alive

<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.8.0</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

=======


RE: Keep getting HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - woomg - 2015-11-13

Does anyone help to solve this issue?
Thanks,
woomg


RE: Keep getting HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - wsnipex - 2015-11-13

we still didn't see a full Debug Log. Please also turn on curl component logging.


RE: Keep getting HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - Kib - 2015-11-14

And don't paste the log in to the forum but use pastebin, as explained in debug log (wiki)


RE: Keep getting HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - woomg - 2015-11-14

Here is full Debug Log when In try to install NHL Game Center addon, and I got install error for dependancies.

http://xbmclogs.com/ppocrndhg

http://xbmclogs.com/ptksirhtt (libCURL enabled log)

If you want any more information, please let me know.
Currently, I installed PVR and some skins, addons manually. So if you want log from scratch, I will try it.

Thanks,
woomg


RE: Keep getting HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - Kib - 2015-11-16

hmm interesting, the mirror redirector itself is giving a 502 error on that file.
Normally when this happens you get redirected to a specific mirror (because of IP) when the redirector thinks the file is there, but that mirror than fails.

In this case, the redirector seems to not be redirecting you just when there is that one file. It could be related to the referer, because all the other requests seem to pass through correctly.
This needs more investigation.


RE: Keep getting HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - marius37bv - 2015-12-05

Hello guys!i just installed kodi on my nexus 7 2013 and i have issue with error 502 and other issue with data library

ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 502
16:10:03 T:18446744072051834240 ERROR: CCurlFile::Open failed with code 502 for http://mirrors.kodi.tv/addons/gotham/script.module.simplejson/script.module.simplejson-3.3.0.zip|Referer=service.library.data.provider-0.1.3.zip
16:10:03 T:18446744072051834240 ERROR: CAddonInstallJob[script.module.simplejson]: failed to download special://home/addons/packages/script.module.simplejson-3.3.0.zip
ERROR: CAddonInstallJob[service.library.data.provider]: failed to install dependency script.module.simplejson
ERROR: Unable to find plugin service.library.data.provider
16:10:10 T:18446744072051834240 ERROR: static bool XFILE::CDirectory::GetDirectory(const CURL&, CFileItemList&, const XFILE::CDirectory::CHints&, bool) - Error getting plugin://service.library.data.provider/?type=+&reload=
Please can anyone help me with this issues?Thank You!


RE: Keep getting HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - msfc - 2015-12-13

I have been having this problem ever since installing 15.0 when it was first released (I am now on 15.2) and have lots of add-ons not installed because of it.

Example:

Code:
12:25:28 T:123145310507008   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 502
12:25:28 T:123145310507008   ERROR: CCurlFile::Open failed with code 502 for http://mirrors.kodi.tv/addons/gotham/metadata.common.movieposterdb.com/metadata.common.movieposterdb.com-1.1.2.zip|Referer=metadata.universal-2.7.0.zip
12:25:28 T:123145310507008   ERROR: CAddonInstallJob[metadata.common.movieposterdb.com]: failed to download special://home/addons/packages/metadata.common.movieposterdb.com-1.1.2.zip
12:25:28 T:123145310507008   ERROR: CAddonInstallJob[metadata.universal]: failed to install dependency metadata.common.movieposterdb.com

I am in Japan. I have had the problem on both Linux and OS X. I am about to try a VPN server in the US to see if I have better luck.

I have not reported this before because of the effort it takes and because something is clearly broken in the Kodi infrastructure that I felt others were sure to notice. I am astonished that this is still going a full year after the first posting.


RE: Keep getting HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - msfc - 2015-12-13

I just tried via a VPN server in the US and I was able to install all the add-ons and dependencies I wanted with only a few temporary failures, timeouts and one instance of error 404. Trying again on those add-ons worked.

If anyone wants to try a VPN server in the US, checkout VPNBook (http://www.vpnbook.com/).

Nevertheless the mirrors for Asia need to be fixed.


Re: Keep getting HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - Wintermute0110 - 2015-12-13

Yesterday I had this problem again, as reported several weeks ago. The only way of downloading addons was to manually force an specific mirror and then install from ZIP file. I'm in Tokyo.


RE: Keep getting HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - Kib - 2015-12-15

I am in <location> is not helping me at all to troubleshoot.
I need to know which mirror you were hitting, and what your IP was.
This first is reported in the Debug Log when debugging is enabled, the second you can find out via whatismyip.com


RE: Keep getting HTTP 502 Bad Gateway error for most of add-ons, scripts, and skins - Kib - 2015-12-15

(2015-12-13, 05:54)msfc Wrote: I have not reported this before because of the effort it takes and because something is clearly broken in the Kodi infrastructure that I felt others were sure to notice. I am astonished that this is still going a full year after the first posting.

We have not fixed it before because it is clearly affecting a small minority of users, who do not report it.
We do 5300 successful redirects per SECOND on average every day. (450 million per day)

So far only one user who was affected has given any decent information other than 'i can not download from <country>' and this was not enough to find the root cause.