Open GoogleCodeExporter opened 8 years ago
В логе Jabberd2 пишет такое при подключении
службы:
Fri Oct 16 12:23:47 2009 [error] Multiple components bound to single component
route
'games.onego.ru'
Fri Oct 16 12:23:47 2009 [error] Multiple components bound to single component
route
'games.onego.ru'
Fri Oct 16 12:23:47 2009 [notice] [78.36.60.82, port=61708] tried to send a
packet
from 'vk.games.onego.ru', but that name is not bound to this component
Указал в поле server: vk.games.onego.ru и подключилось
без ошибок, но не видно в
службах games.onego.ru.
В логе Jabberd2:
Fri Oct 16 12:56:18 2009 [notice] [78.36.60.82, port=54794] authenticated as
vk.games.onego.ru
Fri Oct 16 12:56:18 2009 [notice] [vk.games.onego.ru] online (bound to
78.36.60.82,
port 54794)
Fri Oct 16 12:56:43 2009 [notice] [78.36.60.82, port=54794] disconnect
Fri Oct 16 12:56:43 2009 [notice] [vk.games.onego.ru] offline
Original comment by mro...@gmail.com
on 16 Oct 2009 at 8:59
Заменил значение в поле server на 78.36.60.82 - это IP
games.onego.ru
В логе Jabberd2:
Fri Oct 16 13:01:28 2009 [notice] [78.36.60.82, port=57201] connect
Fri Oct 16 13:01:28 2009 [notice] [78.36.60.82, port=57201] authenticated as
78.36.60.82
Fri Oct 16 13:01:28 2009 [notice] [78.36.60.82] online (bound to 78.36.60.82,
port 57201)
Fri Oct 16 13:01:29 2009 [notice] [78.36.60.82, port=57201] tried to send a
packet
from 'vk.games.onego.ru', but that name is not bound to this component
Fri Oct 16 13:01:54 2009 [notice] [78.36.60.82, port=57201] tried to send a
packet
from 'vk.games.onego.ru', but that name is not bound to this component
Fri Oct 16 13:02:18 2009 [notice] [78.36.60.82, port=57201] disconnect
Fri Oct 16 13:02:18 2009 [notice] [78.36.60.82] offline
Original comment by mro...@gmail.com
on 16 Oct 2009 at 9:03
На пару мин упал инет... и транспорт за ним :-)
* 2009-10-16 11:56:53,929 [ERROR] http error: IO Error, Reason: [Errno 51] Network
is unreachable., URL:http://vkontakte.ru/feed2.php
* 2009-10-16 11:56:58,941 [ERROR] http error: IO Error, Reason: [Errno 51] Network
is unreachable., URL:http://vkontakte.ru/feed2.php
* 2009-10-16 11:57:03,942 [ERROR] http error: IO Error, Reason: [Errno 51] Network
is unreachable., URL:http://vkontakte.ru/feed2.php
* 2009-10-16 11:57:13,941 [ERROR] http error: IO Error, Reason: [Errno 51] Network
is unreachable., URL:http://vkontakte.ru/feed2.php
* 2009-10-16 11:57:13,974 [ERROR] http error: IO Error, Reason: [Errno 51] Network
is unreachable., URL:http://vkontakte.ru/feed2.php
* 2009-10-16 11:57:14,046 [ERROR] http error: IO Error, Reason: [Errno 51] Network
is unreachable., URL:http://vkontakte.ru/feed2.php
* 2009-10-16 11:58:28,274 [CRITICAL] stream error
Traceback (most recent call last):
File "/usr/local/lib/jabber/pyvk/comstream.py", line 89, in recvLoop
s=self.getPacket()
File "/usr/local/lib/jabber/pyvk/comstream.py", line 68, in getPacket
c=self.sock.recv(1)
error: [Errno 65] No route to host
* 2009-10-16 11:58:29,281 [ERROR] queue error
Traceback (most recent call last):
File "/usr/local/lib/jabber/pyvk/comstream.py", line 94, in recvLoop
self.recvQueue.put(etree.fromstring(s))
File "lxml.etree.pyx", line 2538, in lxml.etree.fromstring
(src/lxml/lxml.etree.c:47980)
File "parser.pxi", line 1533, in lxml.etree._parseMemoryDocument
(src/lxml/lxml.etree.c:71383)
ValueError: can only parse strings
Original comment by hart...@gmail.com
on 16 Oct 2009 at 9:07
А ещё вот так:
ERR: error in deferred: <type 'exceptions.TypeError'> (<bound method
Failure.getErrorMessage of <twisted.python.failure.Failure <type
'exceptions.TypeError'>>>)
Traceback (most recent call last):
File "/usr/local/lib/python2.6/threading.py", line 477, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/jabber/pyvk/pyvkt_spikes.py", line 120, in loop
elem["deferred"].callback(res)
File "/usr/local/lib/python2.6/site-packages/twisted/internet/defer.py", line 243,
in callback
self._startRunCallbacks(result)
File "/usr/local/lib/python2.6/site-packages/twisted/internet/defer.py", line 312,
in _startRunCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "/usr/local/lib/python2.6/site-packages/twisted/internet/defer.py", line 328,
in _runCallbacks
self.result = callback(self.result, *args, **kw)
File "/usr/local/lib/jabber/pyvk/pyvkt.py", line 333, in msgDeliveryNotify
msg=createElement("message",{'to':jid,'from':src,'id':msg_id})
File "/usr/local/lib/jabber/pyvk/comstream.py", line 25, in createElement
ret.set(i,attrs[i])
File "lxml.etree.pyx", line 634, in lxml.etree._Element.set
(src/lxml/lxml.etree.c:31223)
File "apihelpers.pxi", line 447, in lxml.etree._setAttributeValue
(src/lxml/lxml.etree.c:13448)
File "apihelpers.pxi", line 1203, in lxml.etree._utf8 (src/lxml/lxml.etree.c:19419)
exceptions.TypeError: Argument must be string or unicode.
Original comment by hart...@gmail.com
on 16 Oct 2009 at 10:11
И вот так:
* 2009-10-16 12:55:16,000 [ERROR] Traceback (most recent call last):
File "/usr/local/lib/jabber/pyvk/pyvkt_spikes.py", line 97, in loop
res=f(**args)
File "/usr/local/lib/jabber/pyvk/pyvkt_user.py", line 438, in refreshData
self.trans.updateFeed(self.bjid,tfeed)
File "/usr/local/lib/jabber/pyvk/pyvkt.py", line 1444, in updateFeed
if not (oldfeed and (j in oldfeed) and ("items" in oldfeed[j]) and (i in
oldfeed[j]["items"])):
TypeError: argument of type 'NoneType' is not iterable
Original comment by hart...@gmail.com
on 16 Oct 2009 at 10:14
2mroztn:
посмотрю.. в нынешней версии открытие
сессии с сервом сильно криво сделано.
2Hartois:
надо новый багрепорт создавать, а не в кучу
скидывать... ну и срач, простите...
ему коннект с сервом разорвали, что ему
оставалось делать, кроме как упасть??
Original comment by Equidamoid
on 16 Oct 2009 at 3:15
2Equidamoid:
вот если б с жаббер-сервером - я бы ещё
понял, а так...
Original comment by hart...@gmail.com
on 19 Oct 2009 at 5:33
Последняя ревизия. Начало вываливаться с
ошибкой:
* 2009-10-27 07:27:16,618 [CRITICAL] exception:
Traceback (most recent call last):
File "main.py", line 38, in <module>
s.main()
File "/usr/local/lib/jabber/pyvk/pyvkt/comstream.py", line 194, in main
print_exc()
NameError: global name 'print_exc' is not defined
Original comment by mro...@gmail.com
on 27 Oct 2009 at 4:28
Не исправленные ошибки в 171 ревизии:
Index: comstream.py
===================================================================
--- comstream.py (revision 169)
+++ comstream.py (working copy)
@@ -51,7 +51,7 @@
self.secret=secret
sock=socket.create_connection((host,port))
#FIXME connecting
- sock.send("<stream:stream xmlns='jabber:component:accept'
xmlns:stream='http://etherx.jabber.org/streams' to='%s'>"%host)
+ sock.send("<stream:stream xmlns='jabber:component:accept'
xmlns:stream='http://etherx.jabber.org/streams' to='%s'>"%self.jid)
sock.recv(len("<?xml version='1.0'?>"))
fil=sock.makefile(bufsize=1)
rep= sock.recv(1000)
Index: pyvkt.py
===================================================================
--- pyvkt.py (revision 169)
+++ pyvkt.py (working copy)
@@ -155,11 +155,11 @@
self.unregisteredList=[]
signal.signal(signal.SIGUSR1,self.signalHandler)
def handlePacket(self,st):
- if (st.tag=="message"):
+ if (st.tag=="{jabber:client}message"):
self.onMsg(st)
- if (st.tag=="iq"):
+ if (st.tag=="{jabber:client}iq"):
self.onIq(st)
- if (st.tag=="presence"):
+ if (st.tag=="{jabber:client}presence"):
self.onPresence(st)
def onMsg(self,msg):
src=msg.get("from")
Original comment by mro...@gmail.com
on 27 Oct 2009 at 4:35
Index: pyvkt/comstream.py
===================================================================
--- pyvkt/comstream.py (revision 173)
+++ pyvkt/comstream.py (working copy)
@@ -56,7 +56,15 @@
sock.send("<stream:stream xmlns='jabber:component:accept'
xmlns:stream='http://etherx.jabber.org/streams' to='%s'>"%self.jid)
sock.recv(len("<?xml version='1.0'?>"))
fil=sock.makefile(bufsize=1)
- rep= sock.recv(1000)
+ try:
+ rep=sock.recv(1000)
+ except socket.error,e:
+ if (e.errno in (11,35)):
+ time.sleep(1)
+ else:
+ self.connectionFailure=True
+ logging.exception('recv failure')
+ raise
ids=rep.find("id='")
ide=rep.find("'",ids+5)
sid=rep[ids+4:ide]
@@ -81,7 +89,7 @@
if (c=='>'):
break
except socket.error,e:
- if (e.errno==11):
+ if (e.errno in (11,35)):
time.sleep(1)
else:
self.connectionFailure=True
@@ -99,7 +107,7 @@
return
sn=sn+self.sock.recv(1)
except socket.error,e:
- if (e.errno==11):
+ if (e.errno in (11,35)):
time.sleep(1)
else:
self.connectionFalure=True
Original comment by mro...@gmail.com
on 7 Nov 2009 at 3:47
--- pyvkt/comstream.py (revision 176)
+++ pyvkt/comstream.py (working copy)
@@ -68,11 +76,11 @@
sock.settimeout(0)
self.sock=sock
- if (self.getPacket(True)=='<handshake/>'):
+ if (self.getPacket(True).find('handshake') != -1):
self.connFailure=False
Original comment by mro...@gmail.com
on 17 Nov 2009 at 7:10
--- pyvkt/component.py (revision 176)
+++ pyvkt/component.py (working copy)
@@ -90,18 +90,12 @@
signal.signal(signal.SIGUSR1,self.signalHandler)
signal.signal(signal.SIGUSR2,self.signalHandler)
def handlePacket(self,st,tryNS=True):
- if (st.tag=="message"):
+ if (st.tag.find("message") != -1):
return self.onMsg(st)
- if (st.tag=="iq"):
+ if (st.tag.find("iq") != -1):
return self.onIq(st)
- if (st.tag=="presence"):
+ if (st.tag.find("presence") != -1):
return self.onPresence(st)
- if (tryNS):
- #FIXME
- if (st.tag.find('{jabber:client}')):
- st.tag=st.tag.replace('{jabber:client}','')
- logging.warning('namespace fixed')
- return self.handlePacket(st,tryNS=False)
logging.warning('unexpected stranza: "%s"'%st.tag)
def onMsg(self,msg):
src=msg.get("from")
Original comment by mro...@gmail.com
on 17 Nov 2009 at 7:14
Патч для 177: http://dumpz.org/14379/
Original comment by mro...@gmail.com
on 18 Nov 2009 at 9:50
Original issue reported on code.google.com by
mro...@gmail.com
on 16 Oct 2009 at 8:28