the forums at degreez.net http://forums.degreez.net/ |
|
tracker problems http://forums.degreez.net/viewtopic.php?f=4&t=7138 |
Page 1 of 1 |
Author: | cartman-2000 [ Sun Apr 08, 2007 5:18 am ] |
Post subject: | tracker problems |
I keep on getting this error when I run a tracker. And it crashes like every minute or two. The tracker has about 4000 peers and is running on a machine with python 2.3.3 installed. Code: Traceback (most recent call last):
File "/root/BitTornado-CVS/BitTornado/RawServer.py", line 142, in listen_forever self.sockethandler.handle_events(events) File "/root/BitTornado-CVS/BitTornado/SocketHandler.py", line 319, in handle_events s.handler.data_came_in(s, data) File "/root/BitTornado-CVS/BitTornado/HTTPHandler.py", line 155, in data_came_in if not c.data_came_in(data) and not c.closed: File "/root/BitTornado-CVS/BitTornado/HTTPHandler.py", line 46, in data_came_in self.next_func = self.next_func(val) File "/root/BitTornado-CVS/BitTornado/HTTPHandler.py", line 78, in read_header r = self.handler.getfunc(self, self.path, self.headers) File "/root/BitTornado-CVS/BitTornado/BT1/track.py", line 917, in get rsize = self.add_data(infohash, event, ip, paramslist) File "/root/BitTornado-CVS/BitTornado/BT1/track.py", line 692, in add_data bc[1][myid] = bc[0][myid] KeyError: 'exbc\x01\x01LORDv\xc6\xea\xd7\xfc.\xc6\x7f\xe7\xe6' |
Author: | steveholt [ Sun Apr 29, 2007 5:07 pm ] |
Post subject: | Re: tracker problems |
cartman-2000 wrote: Code: Traceback (most recent call last): File "/root/BitTornado-CVS/BitTornado/RawServer.py", line 142, in listen_forever self.sockethandler.handle_events(events) File "/root/BitTornado-CVS/BitTornado/SocketHandler.py", line 319, in handle_events s.handler.data_came_in(s, data) File "/root/BitTornado-CVS/BitTornado/HTTPHandler.py", line 155, in data_came_in if not c.data_came_in(data) and not c.closed: File "/root/BitTornado-CVS/BitTornado/HTTPHandler.py", line 46, in data_came_in self.next_func = self.next_func(val) File "/root/BitTornado-CVS/BitTornado/HTTPHandler.py", line 78, in read_header r = self.handler.getfunc(self, self.path, self.headers) File "/root/BitTornado-CVS/BitTornado/BT1/track.py", line 917, in get rsize = self.add_data(infohash, event, ip, paramslist) File "/root/BitTornado-CVS/BitTornado/BT1/track.py", line 692, in add_data bc[1][myid] = bc[0][myid] KeyError: 'exbc\x01\x01LORDv\xc6\xea\xd7\xfc.\xc6\x7f\xe7\xe6' I get the same error, though with a different key of course. It only occurs when a peer changes from a downloader to a seed. It also only seemed to start happening when I changed --nat_check to 0 to solve some connection problems I was having. It solved those problems, but created this one. |
Author: | steveholt [ Thu May 10, 2007 6:16 pm ] |
Post subject: | |
I was able to prevent this error using this minor change. Change this (around line 692): Code: for bc in self.becache[infohash]: bc[1][myid] = bc[0][myid] del bc[0][myid] to this: Code: for bc in self.becache[infohash]: if bc[0].has_key(myid): bc[1][myid] = bc[0][myid] del bc[0][myid] to be safe, you can also make a similar change a few lines below (around line 699) from this: Code: for bc in self.becache[infohash]: bc[0][myid] = bc[1][myid] del bc[1][myid] to this: Code: for bc in self.becache[infohash]:
if bc[1].has_key(myid): bc[0][myid] = bc[1][myid] del bc[1][myid] this one will only occur rarely though, when a peer changes from a seed to a downloader. I haven't noticed any side effects of this change (other than the error going away), but maybe theShadow can confirm this. |
Page 1 of 1 | All times are UTC - 7 hours [ DST ] |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |