pillone / usntssearch

NZB Metasearch engine
pillone.github.io/usntssearch
263 stars 79 forks source link

Sickbeard Error loading NZBmegasearcH URL / No data returned #85

Closed ghost closed 10 years ago

ghost commented 10 years ago

I'm not sure if this is a configuration mistake on my end, but I'm still seeing these randomly.

2013-10-22 10:53:48 SEARCHQUEUE-RSS-SEARCH :: Error loading NZBmegasearcH URL: http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-22 10:53:48 SEARCHQUEUE-RSS-SEARCH :: No data returned from http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-22 09:53:46 SEARCHQUEUE-RSS-SEARCH :: Error loading NZBmegasearcH URL: http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-22 09:53:46 SEARCHQUEUE-RSS-SEARCH :: No data returned from http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-22 08:53:45 SEARCHQUEUE-RSS-SEARCH :: Error loading NZBmegasearcH URL: http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-22 08:53:45 SEARCHQUEUE-RSS-SEARCH :: No data returned from http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030

They randomly happen on the hour, there are no issues in nzbmega's logs. Its almost like nzbmega goes to sleep.

pillone commented 10 years ago

hi,

thanks. That is rather strange. I guess typing that url works and return results right?

ghost commented 10 years ago

Yes

steeef commented 10 years ago

I get this error as well. Attempting to load it manually in my browser gives a "Bad Request" error.

In the log:

TERMINAL - INFO - ImmutableMultiDict([('apikey', myapikey'), ('t', u'tvsearch'), ('cat', u'5040,5030')])
ghost commented 10 years ago
2013-10-22 09:53:41,543:INFO:TERMINAL:ImmutableMultiDict([('apikey', u'123'), ('t', u'tvsearch'), ('cat', u'5040,5030')])
2013-10-22 10:53:42,220:INFO:TERMINAL:ImmutableMultiDict([('apikey', u'123'), ('t', u'tvsearch'), ('cat', u'5040,5030')])
pillone commented 10 years ago

That's not an error. It just says what is the detailed request done to nzbmega.

Bad request?! It is likely that some server responds in a bizarre manner. It seems that mega catches an exception. I am running a deep debug for this here.

thanks

pillone commented 10 years ago

I think I found the issue.

pillone commented 10 years ago

guys,

branch 046RC_bugfix should solve the issue

steeef commented 10 years ago

Seems to have. I updated/restarted, and restarted Sick Beard, which usually performs this query when it starts, and didn't see any errors. Running it manually in my browser returns results too! Thanks!

On Thu, Oct 24, 2013 at 3:05 PM, pillone notifications@github.com wrote:

guys, 046RC_bugfix should solve the issue

— Reply to this email directly or view it on GitHubhttps://github.com/pillone/usntssearch/issues/85#issuecomment-27035621 .

Stephen Price

Riz0 commented 10 years ago

I too get these SB errors. I haven't tried the 046RC fix to confirm, but just for reference this is what I see in nzbm logs:

2013-10-24 20:49:56,484 - TERMINAL - INFO - 2013-10-24 20:49 1675 1675 2013-10-24 20:49:56,484 - ApiModule - INFO - 2013-10-24 20:49 1675 1675 2013-10-24 20:49:56,573 - TERMINAL - INFO - ---------------------------------------- 2013-10-24 20:49:56,575 - TERMINAL - INFO - Exception happened during processing of request from 2013-10-24 20:49:56,575 - TERMINAL - INFO - ('127.0.0.1', 1444) 2013-10-24 20:49:56,575 - TERMINAL_ERR - ERROR - Traceback (most recent call last): 2013-10-24 20:49:56,575 - TERMINAL_ERR - ERROR - File "C:\Python27\lib\SocketServer.py", line 284, in _handle_request_noblock 2013-10-24 20:49:56,575 - TERMINAL_ERR - ERROR - self.process_request(request, client_address) 2013-10-24 20:49:56,575 - TERMINAL_ERR - ERROR - File "C:\Python27\lib\SocketServer.py", line 310, in process_request 2013-10-24 20:49:56,575 - TERMINAL_ERR - ERROR - self.finish_request(request, client_address) 2013-10-24 20:49:56,575 - TERMINAL_ERR - ERROR - File "C:\Python27\lib\SocketServer.py", line 323, in finish_request 2013-10-24 20:49:56,575 - TERMINAL_ERR - ERROR - self.RequestHandlerClass(request, client_address, self) 2013-10-24 20:49:56,575 - TERMINAL_ERR - ERROR - File "C:\Python27\lib\SocketServer.py", line 641, in init 2013-10-24 20:49:56,575 - TERMINAL_ERR - ERROR - self.finish() 2013-10-24 20:49:56,575 - TERMINAL_ERR - ERROR - File "C:\Python27\lib\SocketServer.py", line 694, in finish 2013-10-24 20:49:56,575 - TERMINAL_ERR - ERROR - self.wfile.flush() 2013-10-24 20:49:56,575 - TERMINAL_ERR - ERROR - File "C:\Python27\lib\socket.py", line 303, in flush 2013-10-24 20:49:56,575 - TERMINAL_ERR - ERROR - self._sock.sendall(view[write_offset:write_offset+buffer_size]) 2013-10-24 20:49:56,575 - TERMINAL_ERR - ERROR - error: [Errno 10053] An established connection was aborted by the software in your host machine 2013-10-24 20:49:56,575 - TERMINAL - INFO - ----------------------------------------

pillone commented 10 years ago

@Riz0 that msg means that the source (SB/CP or whatever) got tired of waiting for a response and killed the connection. Even though in their source code they say that 30s is the max timeout (nzmega has 20s), sometimes they kill the connection earlier.

Anyways, try the 046_bugfix

ghost commented 10 years ago

Updated last night, got these today...

2013-10-25 12:13:14 SEARCHQUEUE-RSS-SEARCH :: Error loading NZBmegasearcH URL: http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-25 12:13:14 SEARCHQUEUE-RSS-SEARCH :: No data returned from http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-25 11:13:07 SEARCHQUEUE-RSS-SEARCH :: Error loading NZBmegasearcH URL: http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-25 11:13:07 SEARCHQUEUE-RSS-SEARCH :: No data returned from http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-25 10:13:11 SEARCHQUEUE-RSS-SEARCH :: Error loading NZBmegasearcH URL: http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-25 10:13:11 SEARCHQUEUE-RSS-SEARCH :: No data returned from http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-25 09:13:07 SEARCHQUEUE-RSS-SEARCH :: Error loading NZBmegasearcH URL: http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-25 09:13:07 SEARCHQUEUE-RSS-SEARCH :: No data returned from http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030

I'll dig through the SB logs when I get a chance and see if there is any further info.

pillone commented 10 years ago

it is weird that it happens on each hour. The other SB reqs during the 1h period are fine.

pillone commented 10 years ago

What do you have in the logs at that time?

ghost commented 10 years ago

There is a ton in the debug logs, and since updating to .46 bugfix, i've seen way more issues.

2013-10-27 15:19:34 SEARCHQUEUE-RSS-SEARCH :: Error while searching NZBmegasearcH, skipping: invalid literal for int() with base 10: 'XXXXXXVIII'
2013-10-27 14:18:22 SEARCHQUEUE-RSS-SEARCH :: Error while searching NZBmegasearcH, skipping: invalid literal for int() with base 10: 'XXXXXXVIII'
2013-10-27 11:17:03 SEARCHQUEUE-RSS-SEARCH :: Error loading NZBmegasearcH URL: http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-27 11:17:03 SEARCHQUEUE-RSS-SEARCH :: No data returned from http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-27 10:17:08 SEARCHQUEUE-RSS-SEARCH :: Error loading NZBmegasearcH URL: http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-27 10:17:08 SEARCHQUEUE-RSS-SEARCH :: No data returned from http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-27 09:17:01 SEARCHQUEUE-RSS-SEARCH :: Error loading NZBmegasearcH URL: http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030
2013-10-27 09:17:01 SEARCHQUEUE-RSS-SEARCH :: No data returned from http://127.0.0.1:5000/api?apikey=123&t=tvsearch&cat=5040%2C5030

Where can I dump these logs as I don't want to post them publicly.

pillone commented 10 years ago

@duckduckquack thx for the logs: 'the invalid literal ' error is a sb error. He just does not know how to handle some specific nzb names (he has a parse error) for the others I am in the dark, I would need the nzbmega logs for that period. Damn I do not have any problems with my rather large provider conf

ghost commented 10 years ago

I have debug turned on now, so I'll clear the logs and give it 24 hours to see what it comes up with.

I don't have a ton of providers, and most are starting to lock down what they offer, so that might be part of the problem. :(

pillone commented 10 years ago

@duckduckquack debug is turned on by default since 0.45. My money is on data transmission. Do you have SB on another machine of mega? If the data link is not fast enough would throw a timeout error.

I keep tuned.

ghost commented 10 years ago

Nah, they are both on the same machine. The only problem might be memory. I only have 8GB installed right now.

Are you sure about debug? I have to start mega with the debug switch to get the debugging log to show up. What I sent you was without it.

pillone commented 10 years ago

yes I am very sure. the additional command line debug option just does minor debugging things now.

8GB? that's an immense amount of memory for mega

pillone commented 10 years ago

I close this for now I have further developed to reduce those weaknesses.

This happens if web-based providers respond very slowly thus they hit timeout during their login phase and SB cuts connection off. I suggest to play with selector for API/Manual search in the new config (>0.46)