kuruoujou / XBMal

XBMal - the XBMC MAL Plugin. Update your MyAnimeList based on your XBMC Library!
GNU General Public License v3.0
10 stars 4 forks source link

Possible issue with memcached and passenger #13

Closed kuruoujou closed 10 years ago

kuruoujou commented 10 years ago

xbmal is having issues performing public API calls, like /search, for an unknown reason. Right now the responses are blank. My first thought was something similar to the issue while setting up the api (with my api key), but unfortunately (fortunately?) that is not the case. I'm seeing the following error, it looks like the problem seems to be with memcached, but I'm still working on it. If you have any ideas, please let me know here.

[ 2014-04-28 13:22:15.7447 28630/7fc40ae6a700 Pool2/SmartSpawner.h:301 ]: Preloader for /var/api/myanimelist-api started on PID 28671, listening on unix:/tmp/passenger.1.0.28623/generation-0/backends/preloader.28671
App 28688 stdout: 
App 28688 stdout: I, [2014-04-28T13:22:15.865599 #28688]  INFO -- : localhost:80 failed (count: 0)
App 28671 stderr: cache error: No server available
App 28671 stderr: /var/lib/gems/1.9.1/gems/dalli-2.6.2/lib/dalli/ring.rb:45:in `server_for_key'
App 28671 stderr: /var/lib/gems/1.9.1/gems/dalli-2.6.2/lib/dalli/client.rb:320:in `perform'
App 28671 stderr: /var/lib/gems/1.9.1/gems/dalli-2.6.2/lib/dalli/client.rb:52:in `get'
App 28671 stderr: /var/lib/gems/1.9.1/gems/rack-cache-1.2/lib/rack/cache/metastore.rb:324:in `read'
App 28671 stderr: /var/lib/gems/1.9.1/gems/rack-cache-1.2/lib/rack/cache/metastore.rb:30:in `lookup'
App 28671 stderr: /var/lib/gems/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:169:in `lookup'
App 28671 stderr: /var/lib/gems/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
App 28671 stderr: /var/lib/gems/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
App 28671 stderr: /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
App 28671 stderr: /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
App 28671 stderr: /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
App 28671 stderr: /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:448:in `block (3 levels) in start_threads'
App 28671 stderr: cache: [GET /anime/search?q=haruhi] pass

This results in an empty list being returned ([]). Replacing the dalli configuration for production to be port "11211", the memcached port, does prevent this message but does not change the output. However, it has not been that way since the server's creation, so I'm curious as to what might have changed now to cause the issue.

kuruoujou commented 10 years ago

For reference, when the port is changed, the result is

App 28937 stdout:
App 28920 stderr: cache: [GET /anime/search?q=haruhi] reload, ignore, store
kuruoujou commented 10 years ago

Hmm...actually, it looks like it might only be the /anime/search call that's causing this, was there a change MAL-side?

Affected API calls:

Looks like something may have changed mal-side that's breaking the API. I'm going to look around at a few other groups that I know are using their own copy of the API to see what I see. I did find a more up-to-date fork of it, but unfortunately it doesn't quite work - it always responds "malformed url". Anyway, this looks different from the original issue.

kuruoujou commented 10 years ago

Problem solved! Indeed, there was a change mal-side. It looks like the results page now returns relative links instead of absolute links (e.g. /anime/18679/Kill_la_Kill instead of http://myanimelist.net/anime/18679/Kill_la_Kill), which caused the scrapers to fail. I've made a manual change, since it looks like upstream isn't maintained anymore and the current fork I've found isn't working properly, but hopefully soon I can switch to a more actively maintained fork.

Anyway, this is closed. If you have specific questions, comments, or concerns about the fix, please don't hesitate to let me know.

There is not an update to the addon itself, it should just start working again. It should now be able to locate show names and IDs on MAL again.