You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(4) |
Feb
|
Mar
|
Apr
(5) |
May
(11) |
Jun
|
Jul
|
Aug
(7) |
Sep
(17) |
Oct
(4) |
Nov
(1) |
Dec
(10) |
2005 |
Jan
(9) |
Feb
(10) |
Mar
(3) |
Apr
(4) |
May
(12) |
Jun
(24) |
Jul
(22) |
Aug
(29) |
Sep
(74) |
Oct
(47) |
Nov
(25) |
Dec
(22) |
2006 |
Jan
(36) |
Feb
(9) |
Mar
(36) |
Apr
(33) |
May
(39) |
Jun
(9) |
Jul
(18) |
Aug
(18) |
Sep
(26) |
Oct
(48) |
Nov
(14) |
Dec
(9) |
2007 |
Jan
(10) |
Feb
(2) |
Mar
(9) |
Apr
(3) |
May
(9) |
Jun
|
Jul
(12) |
Aug
(20) |
Sep
|
Oct
(16) |
Nov
(4) |
Dec
(21) |
2008 |
Jan
(32) |
Feb
(11) |
Mar
(4) |
Apr
(13) |
May
(13) |
Jun
(16) |
Jul
(1) |
Aug
(8) |
Sep
(9) |
Oct
(23) |
Nov
(7) |
Dec
|
2009 |
Jan
(17) |
Feb
(11) |
Mar
(35) |
Apr
(10) |
May
(8) |
Jun
(14) |
Jul
(3) |
Aug
(2) |
Sep
|
Oct
(2) |
Nov
|
Dec
(5) |
2010 |
Jan
(15) |
Feb
(4) |
Mar
|
Apr
|
May
(5) |
Jun
(4) |
Jul
(3) |
Aug
(1) |
Sep
(10) |
Oct
(2) |
Nov
(8) |
Dec
(3) |
2011 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(4) |
Sep
|
Oct
|
Nov
(4) |
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2013 |
Jan
(5) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(1) |
Nov
(14) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(1) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Kamal N. <kam...@gm...> - 2013-09-06 09:29:16
|
Hi, I am writing a bot using xmpppy library and it works fine on one of the boxes where openssl version " 0.9.8k-7ubuntu8" is installed. But there is an error on the other box where openssl version "1.0.1-4ubuntu5.10" is installed. Does anyone has any clue about how to fix this error? I am new to intricacies of openssl/TLS etc. I am getting the following error when client.connect gets called: http://pastebin.com/KP5wRpS6 And here is my python xmpp test script: http://pastebin.com/SncCgGy8 Thanks everyone in advance... Regards, Kamal |
From: <cy...@pe...> - 2013-04-16 11:59:45
|
Hi, It has been quite a long time without any updates, is anyone still working on this ? Thanks. |
From: Gábor L. <gop...@gm...> - 2013-01-06 13:26:42
|
Hi Yann, thanks for your answer! I found a solution. I used "reconnectAndReauth" for a new method 'reconnect' : class Client .... # reconnect method (i used the code of "reconnectAndReauth") def reconnect(self, afterReg = False): handlerssave=self.Dispatcher.dumpHandlers() if self.__dict__.has_key('ComponentBind'): self.ComponentBind.PlugOut() if self.__dict__.has_key('Bind'): self.Bind.PlugOut() self._route=0 if self.__dict__.has_key('NonSASL'): self.NonSASL.PlugOut() if self.__dict__.has_key('SASL'): self.SASL.PlugOut() # if this is not here, this will throw an exception after registration if not afterReg: if self.__dict__.has_key('TLS'): self.TLS.PlugOut() self.Dispatcher.PlugOut() if self.__dict__.has_key('HTTPPROXYsocket'): self.HTTPPROXYsocket.PlugOut() if self.__dict__.has_key('TCPsocket'): self.TCPsocket.PlugOut() if not self.connect(server=self._Server,proxy=self._Proxy): return # I don't need reauth, because I want to login with all users to do batch processing #if not self.auth(self._User,self._Password,self._Resource): return self.Dispatcher.restoreHandlers(handlerssave) return self.connected And now this is working: ... xmpp.features.register(cl, 'jabber.digicpictures.local', {'username': 'teszt', 'password': 'teszt'}) cl.reconnect(True) cl.auth('teszt', 'teszt') cl.sendInitPresence() roster = cl.getRoster() roster.setItem('teszt2@jabber.digicpictures.local', 'Teeeszt'); ... On Fri, Jan 4, 2013 at 8:03 PM, Yann Leboulanger <as...@la...> wrote: > On 01/04/2013 05:05 PM, Gábor László wrote: >> Hi! >> >> My task is to do a Python script, what is registers a new user to a >> jabberd2 server and then assigns all users to this newly created user >> (roster-items). These things works separately (xmpp.features.register, >> ... roster.setItem ... ), but when I do a registration and right after >> that authenticate and set a roster item, that will not happen. Here is >> an example code: >> >> >> import sys >> import os >> import time >> import xmpp >> >> cl = xmpp.Client('jabber.digicpictures.local') >> cl.connect() >> >> xmpp.features.register(cl, 'jabber.digicpictures.local', {'username': >> 'teszt', 'password': 'teszt'}) >> >> cl.auth('teszt', 'teszt') >> >> cl.sendInitPresence() >> >> # This will not work, throws an exception (not authorized) >> # If the "xmpp.register" line deleted (and the user is exists) this >> # will NOT throw an exception >> roster = cl.getRoster() >> roster.setItem('teszt2@jabber.digicpictures.local', 'Teeeszt'); >> >> time.sleep(1) >> cl.disconnect() >> >> >> I attached the DEBUG output. The interesting lines are: >> >> DEBUG: dispatcher wait Waiting for ID:2 with timeout 25... >> DEBUG: bind error Binding failed: timeout expired. >> >> Why this is happening? I tried "time.sleep(5)" after register, but nothing. >> Can somebody help me, please? What is the problem or what I do wrong? >> Thank you! > > Probably because you don't way the answer before doing next step. > > When you do xmpp.features.register() you don't really register, you > queue a message that will request the registration. message will really > be sent when you'll call proceede() > > -- > Yann > > ------------------------------------------------------------------------------ > Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and > much more. Get web development skills now with LearnDevNow - > 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. > SALE $99.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122812 > _______________________________________________ > Xmpppy-devel mailing list > Xmp...@li... > https://lists.sourceforge.net/lists/listinfo/xmpppy-devel -- László Gábor ( gopher ) http://dynart.info |
From: Yann L. <as...@la...> - 2013-01-04 19:20:30
|
On 01/04/2013 05:05 PM, Gábor László wrote: > Hi! > > My task is to do a Python script, what is registers a new user to a > jabberd2 server and then assigns all users to this newly created user > (roster-items). These things works separately (xmpp.features.register, > ... roster.setItem ... ), but when I do a registration and right after > that authenticate and set a roster item, that will not happen. Here is > an example code: > > > import sys > import os > import time > import xmpp > > cl = xmpp.Client('jabber.digicpictures.local') > cl.connect() > > xmpp.features.register(cl, 'jabber.digicpictures.local', {'username': > 'teszt', 'password': 'teszt'}) > > cl.auth('teszt', 'teszt') > > cl.sendInitPresence() > > # This will not work, throws an exception (not authorized) > # If the "xmpp.register" line deleted (and the user is exists) this > # will NOT throw an exception > roster = cl.getRoster() > roster.setItem('teszt2@jabber.digicpictures.local', 'Teeeszt'); > > time.sleep(1) > cl.disconnect() > > > I attached the DEBUG output. The interesting lines are: > > DEBUG: dispatcher wait Waiting for ID:2 with timeout 25... > DEBUG: bind error Binding failed: timeout expired. > > Why this is happening? I tried "time.sleep(5)" after register, but nothing. > Can somebody help me, please? What is the problem or what I do wrong? > Thank you! Probably because you don't way the answer before doing next step. When you do xmpp.features.register() you don't really register, you queue a message that will request the registration. message will really be sent when you'll call proceede() -- Yann |
From: Gábor L. <gop...@gm...> - 2013-01-04 16:05:07
|
Hi! My task is to do a Python script, what is registers a new user to a jabberd2 server and then assigns all users to this newly created user (roster-items). These things works separately (xmpp.features.register, ... roster.setItem ... ), but when I do a registration and right after that authenticate and set a roster item, that will not happen. Here is an example code: import sys import os import time import xmpp cl = xmpp.Client('jabber.digicpictures.local') cl.connect() xmpp.features.register(cl, 'jabber.digicpictures.local', {'username': 'teszt', 'password': 'teszt'}) cl.auth('teszt', 'teszt') cl.sendInitPresence() # This will not work, throws an exception (not authorized) # If the "xmpp.register" line deleted (and the user is exists) this # will NOT throw an exception roster = cl.getRoster() roster.setItem('teszt2@jabber.digicpictures.local', 'Teeeszt'); time.sleep(1) cl.disconnect() I attached the DEBUG output. The interesting lines are: DEBUG: dispatcher wait Waiting for ID:2 with timeout 25... DEBUG: bind error Binding failed: timeout expired. Why this is happening? I tried "time.sleep(5)" after register, but nothing. Can somebody help me, please? What is the problem or what I do wrong? Thank you! Gabor Laszlo -- László Gábor ( gopher ) http://dynart.info |
From: Gábor L. <gop...@gm...> - 2013-01-04 16:03:49
|
Hi! My task is to do a Python script, what is registers a new user to a jabberd2 server and then assigns all users to this newly created user (roster-items). These things works separately (xmpp.features.register, ... roster.setItem ... ), but when I do a registration and right after that authenticate and set a roster item, that will not happen. Here is an example code: import sys import os import time import xmpp cl = xmpp.Client('jabber.digicpictures.local') cl.connect() xmpp.features.register(cl, 'jabber.digicpictures.local', {'username': 'teszt', 'password': 'teszt'}) cl.auth('teszt', 'teszt') cl.sendInitPresence() # This will not work, throws an exception (not authorized) # If the "xmpp.register" line deleted (and the user is exists) this will NOT throw an exception roster = cl.getRoster() roster.setItem('teszt2@jabber.digicpictures.local', 'Teeeszt'); time.sleep(1) cl.disconnect() I attached the DEBUG output. The interesting lines are: DEBUG: dispatcher wait Waiting for ID:2 with timeout 25... DEBUG: bind error Binding failed: timeout expired. Why this is happening? I tried "time.sleep(5)" after register, but nothing. Can somebody help me, please? what is the problem or what I do wrong? Thank you! Gabor Laszlo |
From: Gábor L. <gop...@gm...> - 2013-01-04 16:01:24
|
C:\Python26\lib\xmpp\auth.py:24: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha,base64,random,dispatcher,re C:\Python26\lib\xmpp\auth.py:26: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 Invalid debugflag given: always Invalid debugflag given: nodebuilder DEBUG: DEBUG: Debug created for C:\Python26\lib\xmpp\client.py DEBUG: flags defined: always,nodebuilder DEBUG: socket start Plugging <xmpp.transports.TCPsocket instance at 0x0000000002770088> into <xmpp.client.Client instance at 0x000000000273EC08> DEBUG: socket warn An error occurred while looking up _xmpp-client._tcp.jabber.digicpictures.local DEBUG: socket start Successfully connected to remote host ('jabber.digicpictures.local', 5222) DEBUG: dispatcher start Plugging <xmpp.dispatcher.Dispatcher instance at 0x0000000002770908> into <xmpp.client.Client instance at 0x000000000273EC08> DEBUG: dispatcher info Registering namespace "unknown" DEBUG: dispatcher info Registering protocol "unknown" as <class 'xmpp.protocol.Protocol'>(unknown) DEBUG: dispatcher info Registering protocol "default" as <class 'xmpp.protocol.Protocol'>(unknown) DEBUG: dispatcher info Registering namespace "http://etherx.jabber.org/streams" DEBUG: dispatcher info Registering protocol "unknown" as <class 'xmpp.protocol.Protocol'>(http://etherx.jabber.org/streams) DEBUG: dispatcher info Registering protocol "default" as <class 'xmpp.protocol.Protocol'>(http://etherx.jabber.org/streams) DEBUG: dispatcher info Registering namespace "jabber:client" DEBUG: dispatcher info Registering protocol "unknown" as <class 'xmpp.protocol.Protocol'>(jabber:client) DEBUG: dispatcher info Registering protocol "default" as <class 'xmpp.protocol.Protocol'>(jabber:client) DEBUG: dispatcher info Registering protocol "iq" as <class 'xmpp.protocol.Iq'>(jabber:client) DEBUG: dispatcher info Registering protocol "presence" as <class 'xmpp.protocol.Presence'>(jabber:client) DEBUG: dispatcher info Registering protocol "message" as <class 'xmpp.protocol.Message'>(jabber:client) DEBUG: dispatcher info Registering handler <bound method Dispatcher.streamErrorHandler of <xmpp.dispatcher.Dispatcher instance at 0x0000000002770908>> for "error" type-> ns->(http://etherx.jabber.org/streams) DEBUG: dispatcher warn Registering protocol "error" as <class 'xmpp.protocol.Protocol'>(http://etherx.jabber.org/streams) DEBUG: socket sent <?xml version='1.0'?> <stream:stream xmlns="jabber:client" to="jabber.digicpictures.local" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" > DEBUG: socket got <?xml version='1.0'?> <stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' from='jabber.digicpictures.local' version='1.0' id='t3lj0qok3kpuas0ft7p7lw199knbc866bspbiewl'> DEBUG: socket got <stream:features xmlns:stream='http://etherx.jabber.org/streams'> <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'> <mechanism>PLAIN</mechanism> <mechanism>DIGEST-MD5</mechanism> </mechanisms> <auth xmlns='http://jabber.org/features/iq-auth'/> <register xmlns='http://jabber.org/features/iq-register'/> </stream:features> DEBUG: dispatcher warn Unknown stanza: features DEBUG: dispatcher ok Dispatching unknown stanza with type-> props->[u'urn:ietf:params:xml:ns:xmpp-sasl', u'http://jabber.org/features/iq-auth', u'http://jabber.org/features/iq-register'] id->None DEBUG: tls start Plugging <xmpp.transports.TLS instance at 0x00000000027735C8> into <xmpp.client.Client instance at 0x000000000273EC08> DEBUG: tls warn TLS unsupported by remote server. DEBUG: socket sent <iq to="jabber.digicpictures.local" type="set" id="1"> <query xmlns="jabber:iq:register"> <username>teszt</username> <password>teszt</password> </query> </iq> DEBUG: dispatcher wait Waiting for ID:1 with timeout 25... DEBUG: socket got <iq xmlns='jabber:client' id='1' type='result'/> DEBUG: dispatcher ok Got jabber:client/iq stanza DEBUG: dispatcher ok Dispatching iq stanza with type->result props->[] id->1 DEBUG: dispatcher ok Expected stanza arrived! DEBUG: sasl start Plugging <xmpp.auth.SASL instance at 0x0000000002773988> into <xmpp.client.Client instance at 0x000000000273EC08> DEBUG: dispatcher info Registering handler <bound method SASL.SASLHandler of <xmpp.auth.SASL instance at 0x0000000002773988>> for "challenge" type-> ns->(urn:ietf:params:xml:ns:xmpp-sasl) DEBUG: dispatcher warn Registering namespace "urn:ietf:params:xml:ns:xmpp-sasl" DEBUG: dispatcher info Registering protocol "unknown" as <class 'xmpp.protocol.Protocol'>(urn:ietf:params:xml:ns:xmpp-sasl) DEBUG: dispatcher info Registering protocol "default" as <class 'xmpp.protocol.Protocol'>(urn:ietf:params:xml:ns:xmpp-sasl) DEBUG: dispatcher warn Registering protocol "challenge" as <class 'xmpp.protocol.Protocol'>(urn:ietf:params:xml:ns:xmpp-sasl) DEBUG: dispatcher info Registering handler <bound method SASL.SASLHandler of <xmpp.auth.SASL instance at 0x0000000002773988>> for "failure" type-> ns->(urn:ietf:params:xml:ns:xmpp-sasl) DEBUG: dispatcher warn Registering protocol "failure" as <class 'xmpp.protocol.Protocol'>(urn:ietf:params:xml:ns:xmpp-sasl) DEBUG: dispatcher info Registering handler <bound method SASL.SASLHandler of <xmpp.auth.SASL instance at 0x0000000002773988>> for "success" type-> ns->(urn:ietf:params:xml:ns:xmpp-sasl) DEBUG: dispatcher warn Registering protocol "success" as <class 'xmpp.protocol.Protocol'>(urn:ietf:params:xml:ns:xmpp-sasl) DEBUG: socket sent <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5" /> DEBUG: socket got <challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>cmVhbG09ImphYmJlci5kaWdpY3BpY3R1cmVzLmxvY2FsIiwgbm9uY2U9Ii95WVAyemtkQjF2Q2FYSnVtL0RRWnc9PSIsIHFvcD0iYXV0aCIsIGNoYXJzZXQ9dXRmLTgsIGFsZ29yaXRobT1tZDUtc2Vzcw==</challenge> DEBUG: dispatcher ok Got urn:ietf:params:xml:ns:xmpp-sasl/challenge stanza DEBUG: dispatcher ok Dispatching challenge stanza with type-> props->[] id->None DEBUG: sasl ok Got challenge:realm="jabber.digicpictures.local", nonce="/yYP2zkdB1vCaXJum/DQZw==", qop="auth", charset=utf-8, algorithm=md5-sess DEBUG: socket sent <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">Y2hhcnNldD11dGYtOCx1c2VybmFtZT0idGVzenQiLHJlYWxtPSJqYWJiZXIuZGlnaWNwaWN0dXJlcy5sb2NhbCIsbm9uY2U9Ii95WVAyemtkQjF2Q2FYSnVtL0RRWnc9PSIsbmM9MDAwMDAwMDEsY25vbmNlPSJiODNhOGNmZDM2OWE0ZDUwMGRlNGE1MWRlY2YxODNkOGNhYWE0NjVmNDU2MmEyZmQ4IixkaWdlc3QtdXJpPSJ4bXBwL2phYmJlci5kaWdpY3BpY3R1cmVzLmxvY2FsIixyZXNwb25zZT1hOTUwODAwM2RkODc4MDA0ZDYyNjRjNGE3ZWYxYTQ2Mixxb3A9YXV0aA==</response> DEBUG: socket got <challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>cnNwYXV0aD1kY2QyNjlmYmE0ZTMxNTJlYmVkMzM2MGQwNjNmMDY3Zg==</challenge> DEBUG: dispatcher ok Got urn:ietf:params:xml:ns:xmpp-sasl/challenge stanza DEBUG: dispatcher ok Dispatching challenge stanza with type-> props->[] id->None DEBUG: sasl ok Got challenge:rspauth=dcd269fba4e3152ebed3360d063f067f DEBUG: socket sent <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl" /> DEBUG: socket got <success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/> DEBUG: dispatcher ok Got urn:ietf:params:xml:ns:xmpp-sasl/success stanza DEBUG: dispatcher ok Dispatching success stanza with type-> props->[] id->None DEBUG: sasl ok Successfully authenticated with remote server. DEBUG: dispatcher stop Plugging <xmpp.dispatcher.Dispatcher instance at 0x0000000002770908> out of <xmpp.client.Client instance at 0x000000000273EC08>. DEBUG: dispatcher start Plugging <xmpp.dispatcher.Dispatcher instance at 0x0000000002773B88> into <xmpp.client.Client instance at 0x000000000273EC08> DEBUG: dispatcher info Registering namespace "unknown" DEBUG: dispatcher info Registering protocol "unknown" as <class 'xmpp.protocol.Protocol'>(unknown) DEBUG: dispatcher info Registering protocol "default" as <class 'xmpp.protocol.Protocol'>(unknown) DEBUG: dispatcher info Registering namespace "http://etherx.jabber.org/streams" DEBUG: dispatcher info Registering protocol "unknown" as <class 'xmpp.protocol.Protocol'>(http://etherx.jabber.org/streams) DEBUG: dispatcher info Registering protocol "default" as <class 'xmpp.protocol.Protocol'>(http://etherx.jabber.org/streams) DEBUG: dispatcher info Registering namespace "jabber:client" DEBUG: dispatcher info Registering protocol "unknown" as <class 'xmpp.protocol.Protocol'>(jabber:client) DEBUG: dispatcher info Registering protocol "default" as <class 'xmpp.protocol.Protocol'>(jabber:client) DEBUG: dispatcher info Registering protocol "iq" as <class 'xmpp.protocol.Iq'>(jabber:client) DEBUG: dispatcher info Registering protocol "presence" as <class 'xmpp.protocol.Presence'>(jabber:client) DEBUG: dispatcher info Registering protocol "message" as <class 'xmpp.protocol.Message'>(jabber:client) DEBUG: dispatcher info Registering handler <bound method Dispatcher.streamErrorHandler of <xmpp.dispatcher.Dispatcher instance at 0x0000000002773B88>> for "error" type-> ns->(http://etherx.jabber.org/streams) DEBUG: dispatcher warn Registering protocol "error" as <class 'xmpp.protocol.Protocol'>(http://etherx.jabber.org/streams) DEBUG: socket sent <?xml version='1.0'?> <stream:stream xmlns="jabber:client" to="jabber.digicpictures.local" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" > DEBUG: bind start Plugging <xmpp.auth.Bind instance at 0x0000000002773C48> into <xmpp.client.Client instance at 0x000000000273EC08> DEBUG: dispatcher info Registering handler <bound method Bind.FeaturesHandler of <xmpp.auth.Bind instance at 0x0000000002773C48>> for "features" type-> ns->(http://etherx.jabber.org/streams) DEBUG: dispatcher warn Registering protocol "features" as <class 'xmpp.protocol.Protocol'>(http://etherx.jabber.org/streams) DEBUG: socket got <?xml version='1.0'?> <stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' from='jabber.digicpictures.local' version='1.0' id='t3lj0qok3kpuas0ft7p7lw199knbc866bspbiewl'> DEBUG: socket got <stream:features xmlns:stream='http://etherx.jabber.org/streams'> <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'> <required/> </bind> <unbind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/> <session xmlns='urn:ietf:params:xml:ns:xmpp-session'/> </stream:features> DEBUG: dispatcher ok Got http://etherx.jabber.org/streams/features stanza DEBUG: dispatcher ok Dispatching features stanza with type-> props->[u'urn:ietf:params:xml:ns:xmpp-bind', u'urn:ietf:params:xml:ns:xmpp-session'] id->None DEBUG: socket sent <iq type="set" id="2"> <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /> </iq> DEBUG: dispatcher wait Waiting for ID:2 with timeout 25... DEBUG: bind error Binding failed: timeout expired. DEBUG: roster start Plugging <xmpp.roster.Roster instance at 0x00000000027766C8> into <xmpp.client.Client instance at 0x000000000273EC08> DEBUG: dispatcher info Registering handler <bound method Roster.RosterIqHandler of <xmpp.roster.Roster instance at 0x00000000027766C8>> for "iq" type->result ns->jabber:iq:roster(jabber:client) DEBUG: dispatcher info Registering handler <bound method Roster.RosterIqHandler of <xmpp.roster.Roster instance at 0x00000000027766C8>> for "iq" type->set ns->jabber:iq:roster(jabber:client) DEBUG: dispatcher info Registering handler <bound method Roster.PresenceHandler of <xmpp.roster.Roster instance at 0x00000000027766C8>> for "presence" type-> ns->(jabber:client) DEBUG: socket sent <iq type="get" id="3"> <query xmlns="jabber:iq:roster" /> </iq> DEBUG: roster start Roster requested from server DEBUG: socket sent <presence id="4" /> DEBUG: socket got <stream:error xmlns:stream='http://etherx.jabber.org/streams'> <not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-streams'/> <text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>stanza sent before session start</text> </stream:error> DEBUG: dispatcher ok Got http://etherx.jabber.org/streams/error stanza DEBUG: dispatcher ok Dispatching error stanza with type-> props->[u'urn:ietf:params:xml:ns:xmpp-streams'] id->None Traceback (most recent call last): File "X:\work\PyDevTeszt\teszt.py", line 154, in <module> roster = cl.getRoster() File "C:\Python26\lib\xmpp\roster.py", line 61, in getRoster while not self.set: self._owner.Process(10) File "C:\Python26\lib\xmpp\dispatcher.py", line 303, in dispatch handler['func'](session,stanza) File "C:\Python26\lib\xmpp\dispatcher.py", line 215, in streamErrorHandler raise exc((name,text)) xmpp.protocol.NotAuthorized: (u'not-authorized', u'stanza sent before session start') |
From: Nanda K. <nan...@ya...> - 2012-10-20 18:32:49
|
Hi All, I am having difficulty in establishing a connection with XMPP (Prosody) . But if I use PSI it works fine and request for your suggestions. Here is the code snippet of my python : username = conf_parser.get("xmpp", "user") passwd = conf_parser.get("xmpp", "password") host = conf_parser.get("xmpp", "host") muc = conf_parser.get("xmpp", "muc") port = conf_parser.get("xmpp", "port") client = xmpp.Client(host) client.connect(server=(host,port)) client.auth(username, passwd,resource='', sasl=1) client.sendInitPresence() In debug mode : DEBUG: dispatcher warn Registering protocol "error" as <class 'xmpp.protocol.Protocol'>(http://etherx.jabber.org/streams) DEBUG: socket sent <?xml version='1.0'?> <stream:stream xmlns="jabber:client" to="localhost" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" > DEBUG: socket error Socket error while receiving data Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/xmpp/transports.py", line 161, in receive try: received = self._recv(BUFLEN) error: [Errno 104] Connection reset by peer DEBUG: client stop Disconnect detected DEBUG: socket error Socket operation failed Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/xmpp/transports.py", line 161, in receive try: received = self._recv(BUFLEN) error: [Errno 104] Connection reset by peer DEBUG: socket error Socket error while receiving data DEBUG: client stop Disconnect detected Prosody logs : Oct 20 23:46:39 c2s94ba718 info Client connected Oct 20 23:46:39 c2s94ba718 info Client disconnected: ssl handshake failed Oct 20 23:46:39 c2s94ba718 info Destroying session for (unknown) ((unknown)@(unknown)) Oct 20 23:48:57 c2s96052a0 info Client connected Oct 20 23:48:57 c2s96052a0 info Client disconnected: ssl handshake failed Oct 20 23:48:57 c2s96052a0 info Destroying session for (unknown) ((unknown)@(unknown)) Cheers, Nandu |
From: akshay <sur...@gm...> - 2012-04-17 13:35:16
|
Was anyone able to solve this problem? I am getting the same error. |
From: Felix P. <fp...@gm...> - 2011-12-24 21:30:28
|
Hello, I'd want to use a jabber bot on an OpenWRT based router. Practically I want the bot to present a list of available commands to the person who sends an IM message containing a predefined password. As I'm not a programer, I'd like the commands to execute a shell script. Is it possible to do it with xmppy? Any hint? Thanks in advance Felix |
From: Neil C. <ne...@ma...> - 2011-11-10 10:34:58
|
Hi, ok sorted my problem, sorry to bother everyone! was a login problem, however i have another one when a message is recevied for example "Sssshh..! \xbb _aLs _!s_ _Pr!vate_\xab" i think the \xbb is a smiley face of some sort?? i get a Decoding error saying unable to utf-8 decode \xbb at position 10. the mxit.py transport then hangs thanks On Wed, Nov 9, 2011 at 2:32 PM, Norman Rasmussen <no...@ra...>wrote: > The 407 error is probably because you're not connected, can you post > earlier events from the log. > > On Wed, Nov 9, 2011 at 12:10 AM, Neil Croft <ne...@ma...>wrote: > >> Hi guys, >> >> need your help please if you have some time: >> i have openfire 3.7.0 running with the xmppy-pythin and mxit transport >> running. >> Now the weird thing is i had this all working like a charm and ofcourse i >> changed something and now its stuck. >> >> seems like everything connects, however no conn is made to mxit, i have >> debug on and get - any idea what error code 407 is? is this why i cant >> connect? any help :) >> >> DEBUG: socket got <presence id="Erg9v-4" from=" >> ti...@op.../tixm" to="gallery\ >> 40...@mx..."> >> <status>available</status> >> </presence> >> <presence id="Erg9v-4" from="ti...@op.../tixm" >> to="tradepost\40...@mx..."> >> <status>available</status> >> </presence> >> >> >> DEBUG: socket sent <presence to=" >> ti...@op.../tixm" from="tradepost\ >> 40...@mx..." id="Erg9v-4" type="error"> >> <status>available</status> >> <error code="407" type="auth"> >> <registration-required xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /> >> <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">The requesting entity >> is not authorized to access the requested service because registration is >> required.</text> >> </error> >> </presence> >> >> >> ------------------------------------------------------------------------------ >> RSA(R) Conference 2012 >> Save $700 by Nov 18 >> Register now >> http://p.sf.net/sfu/rsa-sfdev2dev1 >> _______________________________________________ >> Xmpppy-devel mailing list >> Xmp...@li... >> https://lists.sourceforge.net/lists/listinfo/xmpppy-devel >> >> > > > -- > - Norman Rasmussen > - Email: no...@ra... > - Home page: http://norman.rasmussen.co.za/ > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Xmpppy-devel mailing list > Xmp...@li... > https://lists.sourceforge.net/lists/listinfo/xmpppy-devel > > |
From: Norman R. <no...@ra...> - 2011-11-09 12:35:23
|
Try changing line 19 from: sys.stdout.write(event.getBody() + '\n') to sys.stdout.write('%s\n' % event.getBody()) On Tue, Aug 23, 2011 at 6:13 AM, Nilanjan Banerjee <nil...@gm...>wrote: > Hi, > > I am trying the example xtalk.py with Facebook. Its working sometimes, > but the connection is frequently breaking down due to the receipt of some > "None" value from Facebook. I noticed that most of the times this happens > when I try to send some chat message from Facebook to the xtalk > application, but it does happen even spontaneously sometimes. The debugger > output listed below shows one such spontaneous instance - the Hello message > from the xtalk application reaches Facebook, but the application crashes > immediately after that. Not sure if the id->None has anything to do with > the error in this case. In other cases, when the error occurs on sending a > message from Facebook, I have tried printing the event.getBody() with > sys.stderr.write(str(event.getBody()) + '\n') and found that the value > printed is "None". Would appreciate if anybody can throw some light on what > is happening over here. Thanks in advance. > > Nil. > > > authenticated using sasl > DEBUG: dispatcher info Registering handler <bound method > Bot.xmpp_message of <__main__.Bot instance at 0x1c848710>> for "message" > type-> ns->(jabber:client) > Hello > DEBUG: socket sent <message to="-10...@ch..." > type="chat" id="3"> > <body>Hello</body> > </message> > DEBUG: socket got <iq from="chat.facebook.com" to=" > xxx...@ch.../73b32809_4AB24E970A5D0" id="fbiq4AB24EB977DE5" > type="set"> > <own-message xmlns="http://www.facebook.com/xmpp/messages" to="- > 100...@ch..." self="true"> > <body>Hello</body> > </own-message> > </iq> > DEBUG: nodebuilder down DEPTH -> 2 , tag -> iq, attrs -> {u'to': > u'xxx...@ch.../73b32809_4AB24E970A5D0', u'from': u' > chat.facebook.com', u'id': u'fbiq4AB24EB977DE5', u'type': u'set'} > DEBUG: nodebuilder down DEPTH -> 3 , tag -> own-message, attrs -> > {u'to': u'-10...@ch...', u'self': u'true', > u'xmlns': u'http://www.facebook.com/xmpp/messages'} > DEBUG: nodebuilder down DEPTH -> 4 , tag -> body, attrs -> {} > DEBUG: nodebuilder data Hello > DEBUG: nodebuilder up DEPTH -> 4 , tag -> body > DEBUG: nodebuilder up DEPTH -> 3 , tag -> own-message > DEBUG: nodebuilder up DEPTH -> 2 , tag -> iq > DEBUG: dispatcher ok Got jabber:client/iq stanza > DEBUG: dispatcher ok Dispatching iq stanza with type->set props->[u' > http://www.facebook.com/xmpp/messages'] id->fbiq4AB24EB977DE5 > DEBUG: socket sent <iq to="chat.facebook.com" from=" > car...@ch.../73b32809_4AB24E970A5D0" id="fbiq4AB24EB977DE5" > type="error"> > <own-message to="-10...@ch..." self="true" xmlns=" > http://www.facebook.com/xmpp/messages"> > <body>Hello</body> > </own-message> > <error code="501" type="cancel"> > <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /> > <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">The feature requested > is not implemented by the recipient or server and therefore cannot be > processed.</text> > </error> > </iq> > DEBUG: socket got <message from="- > 100...@ch..." to=" > xxx...@ch.../73b32809_4AB24E970A5D0" type="chat"> > <composing xmlns="http://jabber.org/protocol/chatstates"/> > </message> > DEBUG: nodebuilder down DEPTH -> 2 , tag -> message, attrs -> {u'to': > u'xxx...@ch.../73b32809_4AB24E970A5D0', u'from': > u'-10...@ch...', u'type': u'chat'} > DEBUG: nodebuilder down DEPTH -> 3 , tag -> composing, attrs -> > {u'xmlns': u'http://jabber.org/protocol/chatstates'} > DEBUG: nodebuilder up DEPTH -> 3 , tag -> composing > DEBUG: nodebuilder up DEPTH -> 2 , tag -> message > DEBUG: dispatcher ok Got jabber:client/message stanza > DEBUG: dispatcher ok Dispatching message stanza with type->chat > props->[u'http://jabber.org/protocol/chatstates'] id->None > Traceback (most recent call last): > File "./xtalk.py", line 77, in ? > cl.Process(1) > File "/root/fbgwpy/xmpp/dispatcher.py", line 303, in dispatch > File "./xtalk.py", line 19, in xmpp_message > sys.stdout.write(event.getBody() + '\n') > TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' > > > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > > _______________________________________________ > Xmpppy-devel mailing list > Xmp...@li... > https://lists.sourceforge.net/lists/listinfo/xmpppy-devel > > -- - Norman Rasmussen - Email: no...@ra... - Home page: http://norman.rasmussen.co.za/ |
From: Norman R. <no...@ra...> - 2011-11-09 12:32:51
|
The 407 error is probably because you're not connected, can you post earlier events from the log. On Wed, Nov 9, 2011 at 12:10 AM, Neil Croft <ne...@ma...> wrote: > Hi guys, > > need your help please if you have some time: > i have openfire 3.7.0 running with the xmppy-pythin and mxit transport > running. > Now the weird thing is i had this all working like a charm and ofcourse i > changed something and now its stuck. > > seems like everything connects, however no conn is made to mxit, i have > debug on and get - any idea what error code 407 is? is this why i cant > connect? any help :) > > DEBUG: socket got <presence id="Erg9v-4" from=" > ti...@op.../tixm" to="gallery\ > 40...@mx..."> > <status>available</status> > </presence> > <presence id="Erg9v-4" from="ti...@op.../tixm" > to="tradepost\40...@mx..."> > <status>available</status> > </presence> > > > DEBUG: socket sent <presence to=" > ti...@op.../tixm" from="tradepost\ > 40...@mx..." id="Erg9v-4" type="error"> > <status>available</status> > <error code="407" type="auth"> > <registration-required xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /> > <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">The requesting entity > is not authorized to access the requested service because registration is > required.</text> > </error> > </presence> > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Xmpppy-devel mailing list > Xmp...@li... > https://lists.sourceforge.net/lists/listinfo/xmpppy-devel > > -- - Norman Rasmussen - Email: no...@ra... - Home page: http://norman.rasmussen.co.za/ |
From: Neil C. <ne...@ma...> - 2011-11-09 01:18:19
|
Hi guys, need your help please if you have some time: i have openfire 3.7.0 running with the xmppy-pythin and mxit transport running. Now the weird thing is i had this all working like a charm and ofcourse i changed something and now its stuck. seems like everything connects, however no conn is made to mxit, i have debug on and get - any idea what error code 407 is? is this why i cant connect? any help :) DEBUG: socket got <presence id="Erg9v-4" from=" ti...@op.../tixm" to="gallery\ 40...@mx..."> <status>available</status> </presence> <presence id="Erg9v-4" from="ti...@op.../tixm" to="tradepost\40...@mx..."> <status>available</status> </presence> DEBUG: socket sent <presence to=" ti...@op.../tixm" from="tradepost\ 40...@mx..." id="Erg9v-4" type="error"> <status>available</status> <error code="407" type="auth"> <registration-required xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /> <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">The requesting entity is not authorized to access the requested service because registration is required.</text> </error> </presence> |
From: Nilanjan B. <nil...@gm...> - 2011-08-23 05:13:47
|
Hi, I am trying the example xtalk.py with Facebook. Its working sometimes, but the connection is frequently breaking down due to the receipt of some "None" value from Facebook. I noticed that most of the times this happens when I try to send some chat message from Facebook to the xtalk application, but it does happen even spontaneously sometimes. The debugger output listed below shows one such spontaneous instance - the Hello message from the xtalk application reaches Facebook, but the application crashes immediately after that. Not sure if the id->None has anything to do with the error in this case. In other cases, when the error occurs on sending a message from Facebook, I have tried printing the event.getBody() with sys.stderr.write(str(event.getBody()) + '\n') and found that the value printed is "None". Would appreciate if anybody can throw some light on what is happening over here. Thanks in advance. Nil. authenticated using sasl DEBUG: dispatcher info Registering handler <bound method Bot.xmpp_message of <__main__.Bot instance at 0x1c848710>> for "message" type-> ns->(jabber:client) Hello DEBUG: socket sent <message to="-10...@ch..." type="chat" id="3"> <body>Hello</body> </message> DEBUG: socket got <iq from="chat.facebook.com" to=" xxx...@ch.../73b32809_4AB24E970A5D0" id="fbiq4AB24EB977DE5" type="set"> <own-message xmlns="http://www.facebook.com/xmpp/messages" to="- 100...@ch..." self="true"> <body>Hello</body> </own-message> </iq> DEBUG: nodebuilder down DEPTH -> 2 , tag -> iq, attrs -> {u'to': u'xxx...@ch.../73b32809_4AB24E970A5D0', u'from': u' chat.facebook.com', u'id': u'fbiq4AB24EB977DE5', u'type': u'set'} DEBUG: nodebuilder down DEPTH -> 3 , tag -> own-message, attrs -> {u'to': u'-10...@ch...', u'self': u'true', u'xmlns': u' http://www.facebook.com/xmpp/messages'} DEBUG: nodebuilder down DEPTH -> 4 , tag -> body, attrs -> {} DEBUG: nodebuilder data Hello DEBUG: nodebuilder up DEPTH -> 4 , tag -> body DEBUG: nodebuilder up DEPTH -> 3 , tag -> own-message DEBUG: nodebuilder up DEPTH -> 2 , tag -> iq DEBUG: dispatcher ok Got jabber:client/iq stanza DEBUG: dispatcher ok Dispatching iq stanza with type->set props->[u' http://www.facebook.com/xmpp/messages'] id->fbiq4AB24EB977DE5 DEBUG: socket sent <iq to="chat.facebook.com" from=" car...@ch.../73b32809_4AB24E970A5D0" id="fbiq4AB24EB977DE5" type="error"> <own-message to="-10...@ch..." self="true" xmlns=" http://www.facebook.com/xmpp/messages"> <body>Hello</body> </own-message> <error code="501" type="cancel"> <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /> <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">The feature requested is not implemented by the recipient or server and therefore cannot be processed.</text> </error> </iq> DEBUG: socket got <message from="-10...@ch..." to="xxx...@ch.../73b32809_4AB24E970A5D0" type="chat"> <composing xmlns="http://jabber.org/protocol/chatstates"/> </message> DEBUG: nodebuilder down DEPTH -> 2 , tag -> message, attrs -> {u'to': u'xxx...@ch.../73b32809_4AB24E970A5D0', u'from': u'-10...@ch...', u'type': u'chat'} DEBUG: nodebuilder down DEPTH -> 3 , tag -> composing, attrs -> {u'xmlns': u'http://jabber.org/protocol/chatstates'} DEBUG: nodebuilder up DEPTH -> 3 , tag -> composing DEBUG: nodebuilder up DEPTH -> 2 , tag -> message DEBUG: dispatcher ok Got jabber:client/message stanza DEBUG: dispatcher ok Dispatching message stanza with type->chat props->[u'http://jabber.org/protocol/chatstates'] id->None Traceback (most recent call last): File "./xtalk.py", line 77, in ? cl.Process(1) File "/root/fbgwpy/xmpp/dispatcher.py", line 303, in dispatch File "./xtalk.py", line 19, in xmpp_message sys.stdout.write(event.getBody() + '\n') TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' |
From: Alexey N. <sn...@gm...> - 2011-08-08 15:56:51
|
Well, it will get for free whatever comes in the libgsasl. For instance, when I was developing it two years ago I wasn't able to test it against kerberos environment, but customer reported that it worked just fine, reusing his existing cached kerberos ticket. And on the 'patch is fine' part - I'm not going to commit it to my branch as it is long-stale. So it was intended to go by the 'random developer's patch sent to the upstream' scenario ;-P On Mon, Aug 8, 2011 at 3:12 PM, Norman Rasmussen <no...@gm...> wrote: > Hey Alexey, > I think the patch is fine. It's long time that xmpppy started supporting > some modern auth mechs. It would get SCRAM for free with this too right? > Cheers > Norman > On Mon, Aug 8, 2011 at 11:17 AM, Alexey Nezhdanov <sn...@gm...> wrote: >> >> Hi Norman. >> >> I've been just contacted by one of my old customers for whom I did a >> python-gsasl library and integrated it's support into xmpppy about 2 >> years ago so he could use a KERBEROS auth in his script. He asked me >> if there is any particular reason to not include it into upstream and >> I didn't find any. >> >> Please have a look at the attached patch. >> >> It is quite simple: if we provide a callback for getting SASL >> properties - that means that we want to use a 'new-style' SASL auth >> with is implemented through usage of GSASL. >> >> I do not know if this is just 'not polished enough' or 'a feature' - >> to have a dictionary of properties in the main.py >> For 'traditional' DIGEST-MD5 this looks like overkill, but for more >> complicated stuff it might be just neccessary. >> >> In any case, please have a look and share your comments. >> >> Alexey >> >> P.S. I needed to apply the following patch to GSASL/__init__.py: >> -_gsasl=CDLL('libgsasl.so') >> +try: _gsasl=CDLL('libgsasl.so') >> +except: _gsasl=CDLL('libgsasl.so.7') > > -- > - Norman Rasmussen > - Email: no...@ra... > - Home page: http://norman.rasmussen.co.za/ > |
From: Norman R. <no...@gm...> - 2011-08-08 13:13:06
|
Hey Alexey, I think the patch is fine. It's long time that xmpppy started supporting some modern auth mechs. It would get SCRAM for free with this too right? Cheers Norman On Mon, Aug 8, 2011 at 11:17 AM, Alexey Nezhdanov <sn...@gm...> wrote: > Hi Norman. > > I've been just contacted by one of my old customers for whom I did a > python-gsasl library and integrated it's support into xmpppy about 2 > years ago so he could use a KERBEROS auth in his script. He asked me > if there is any particular reason to not include it into upstream and > I didn't find any. > > Please have a look at the attached patch. > > It is quite simple: if we provide a callback for getting SASL > properties - that means that we want to use a 'new-style' SASL auth > with is implemented through usage of GSASL. > > I do not know if this is just 'not polished enough' or 'a feature' - > to have a dictionary of properties in the main.py > For 'traditional' DIGEST-MD5 this looks like overkill, but for more > complicated stuff it might be just neccessary. > > In any case, please have a look and share your comments. > > Alexey > > P.S. I needed to apply the following patch to GSASL/__init__.py: > -_gsasl=CDLL('libgsasl.so') > +try: _gsasl=CDLL('libgsasl.so') > +except: _gsasl=CDLL('libgsasl.so.7') > -- - Norman Rasmussen - Email: no...@ra... - Home page: http://norman.rasmussen.co.za/ |
From: Alexey N. <sn...@gm...> - 2011-08-08 10:18:23
|
Hi Norman. I've been just contacted by one of my old customers for whom I did a python-gsasl library and integrated it's support into xmpppy about 2 years ago so he could use a KERBEROS auth in his script. He asked me if there is any particular reason to not include it into upstream and I didn't find any. Please have a look at the attached patch. It is quite simple: if we provide a callback for getting SASL properties - that means that we want to use a 'new-style' SASL auth with is implemented through usage of GSASL. I do not know if this is just 'not polished enough' or 'a feature' - to have a dictionary of properties in the main.py For 'traditional' DIGEST-MD5 this looks like overkill, but for more complicated stuff it might be just neccessary. In any case, please have a look and share your comments. Alexey P.S. I needed to apply the following patch to GSASL/__init__.py: -_gsasl=CDLL('libgsasl.so') +try: _gsasl=CDLL('libgsasl.so') +except: _gsasl=CDLL('libgsasl.so.7') |
From: Dawid G. <al...@gm...> - 2011-07-25 15:22:05
|
Hi. How i can add a contact to my roster with xmppy ? |
From: Santhosh T. <san...@gm...> - 2011-03-05 13:19:05
|
Hi, I have a python xmpp bot with nearly 10000 users. When the user count reached at this level, my messageHandler is not getting invoked. Putting it in debug mode shows that PresenceHandler is eating up all the loop cycles. This is the relevant code snippets class Bot: """ The main bot class. """ def __init__(self, JID, Password): """ Create a new bot. Connect to the server and log in. """ # connect... jid = xmpp.JID(JID) self.connection = xmpp.Client(jid.getDomain(), debug=[]) [ ......] self.connection.RegisterHandler('presence',self.presenceHandler) self.connection.RegisterHandler('message',self.messageHandler) def loop(self): """ Do nothing except handling new xmpp stanzas. """ try: while self.connection.Process(1): pass except KeyboardInterrupt: pass def presenceHandler(self, conn, presence): '''Auto authorizing chat invites''' if presence: if presence.getType() == 'subscribe': jabber_id = presence.getFrom().getStripped() self.connection.getRoster().Authorize(jabber_id) bot = Bot(**options) bot.loop() If I am not registering a precence handler, my message handler is always get invoked. But If I enable both presence and message handlers, message handler is not at all getting invoked. This problem was not there when the number of users were less. Is there anyway I can improve the performance by some way of threading? or any other ways so that both handlers get invoked without missing any messages? Thanks in advance Santhosh |
From: Glen A. <gle...@gm...> - 2011-01-09 05:59:18
|
Yes it does Norman. Thanks to a nice stackoverflow user, I have found out the problem. The app engine client does not respond to messages that do not specify the type. Changing this line xmppClient.send(xmpp.Message(operator, msg)) to this line xmppClient.send(xmpp.Message(operator, msg, typ='chat')) So glad to get this working. Cheers Glen Arrowsmith http://garrows.com On Sun, Jan 9, 2011 at 2:04 AM, Norman Rasmussen <no...@ra...>wrote: > Does sending from Google Talk to app engine work? > > On Fri, Jan 7, 2011 at 3:59 AM, Glen Arrowsmith <gle...@gm... > > wrote: > >> Hello List, >> First of all, thank you for this awesome library. >> >> However, I seem to be having trouble using the xmpppy client when sending >> messages to the app engine's xmpp client. I am not getting any errors. The >> messages just aren't arriving there. Sending messages from app engine's >> client to the sl4a client works. Sending messages to and from google talk's >> client to and from the sl4a client works as well. >> Any help would be greatly appreciated. >> >> import xmpp, time >> _SERVER = 'talk.google.com', 5223 >> commandByXMPP() >> def commandByXMPP(): >> global xmppUsername >> xmppUsername = 'gar...@gm...' >> global xmppPassword >> xmppPassword = 'obscured' >> global xmppClient >> global operator >> operator = "cel...@ap..." >> jid = xmpp.protocol.JID(xmppUsername) >> xmppClient = xmpp.Client(jid.getDomain(), debug=[]) >> xmppClient.connect(server=_SERVER) >> xmppClient.RegisterHandler('message', XMPP_message_cb) >> auth = xmppClient.auth(jid.getNode(), xmppPassword, 'botty') >> xmppClient.sendInitPresence() >> start=time.time() >> i=0 >> outputToOperator("starting") >> while time.time()-start<15: >> print "tick" >> xmppClient.Process(1) >> i=i+1 >> if i % 10 == 0: >> outputToOperator("hello") >> outputToOperator("exiting") >> >> def XMPP_message_cb(session, message): >> jid = xmpp.protocol.JID(message.getFrom()) >> command = message.getBody() >> print command >> >> def outputToOperator(msg): >> print "Outputting "+msg+" to " + operator >> xmppClient.send(xmpp.Message(operator, msg)) >> >> >> >> ------------------------------------------------------------------------------ >> Gaining the trust of online customers is vital for the success of any >> company >> that requires sensitive data to be transmitted over the Web. Learn how >> to >> best implement a security strategy that keeps consumers' information >> secure >> and instills the confidence they need to proceed with transactions. >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> Xmpppy-devel mailing list >> Xmp...@li... >> https://lists.sourceforge.net/lists/listinfo/xmpppy-devel >> >> > > > -- > - Norman Rasmussen > - Email: no...@ra... > - Home page: http://norman.rasmussen.co.za/ > > > ------------------------------------------------------------------------------ > Gaining the trust of online customers is vital for the success of any > company > that requires sensitive data to be transmitted over the Web. Learn how to > best implement a security strategy that keeps consumers' information secure > and instills the confidence they need to proceed with transactions. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Xmpppy-devel mailing list > Xmp...@li... > https://lists.sourceforge.net/lists/listinfo/xmpppy-devel > > |
From: Norman R. <no...@ra...> - 2011-01-08 16:05:16
|
Does sending from Google Talk to app engine work? On Fri, Jan 7, 2011 at 3:59 AM, Glen Arrowsmith <gle...@gm...>wrote: > Hello List, > First of all, thank you for this awesome library. > > However, I seem to be having trouble using the xmpppy client when sending > messages to the app engine's xmpp client. I am not getting any errors. The > messages just aren't arriving there. Sending messages from app engine's > client to the sl4a client works. Sending messages to and from google talk's > client to and from the sl4a client works as well. > Any help would be greatly appreciated. > > import xmpp, time > _SERVER = 'talk.google.com', 5223 > commandByXMPP() > def commandByXMPP(): > global xmppUsername > xmppUsername = 'gar...@gm...' > global xmppPassword > xmppPassword = 'obscured' > global xmppClient > global operator > operator = "cel...@ap..." > jid = xmpp.protocol.JID(xmppUsername) > xmppClient = xmpp.Client(jid.getDomain(), debug=[]) > xmppClient.connect(server=_SERVER) > xmppClient.RegisterHandler('message', XMPP_message_cb) > auth = xmppClient.auth(jid.getNode(), xmppPassword, 'botty') > xmppClient.sendInitPresence() > start=time.time() > i=0 > outputToOperator("starting") > while time.time()-start<15: > print "tick" > xmppClient.Process(1) > i=i+1 > if i % 10 == 0: > outputToOperator("hello") > outputToOperator("exiting") > > def XMPP_message_cb(session, message): > jid = xmpp.protocol.JID(message.getFrom()) > command = message.getBody() > print command > > def outputToOperator(msg): > print "Outputting "+msg+" to " + operator > xmppClient.send(xmpp.Message(operator, msg)) > > > > ------------------------------------------------------------------------------ > Gaining the trust of online customers is vital for the success of any > company > that requires sensitive data to be transmitted over the Web. Learn how to > best implement a security strategy that keeps consumers' information secure > and instills the confidence they need to proceed with transactions. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Xmpppy-devel mailing list > Xmp...@li... > https://lists.sourceforge.net/lists/listinfo/xmpppy-devel > > -- - Norman Rasmussen - Email: no...@ra... - Home page: http://norman.rasmussen.co.za/ |
From: Glen A. <gle...@gm...> - 2011-01-07 04:00:20
|
Hello List, First of all, thank you for this awesome library. However, I seem to be having trouble using the xmpppy client when sending messages to the app engine's xmpp client. I am not getting any errors. The messages just aren't arriving there. Sending messages from app engine's client to the sl4a client works. Sending messages to and from google talk's client to and from the sl4a client works as well. Any help would be greatly appreciated. import xmpp, time _SERVER = 'talk.google.com', 5223 commandByXMPP() def commandByXMPP(): global xmppUsername xmppUsername = 'gar...@gm...' global xmppPassword xmppPassword = 'obscured' global xmppClient global operator operator = "cel...@ap..." jid = xmpp.protocol.JID(xmppUsername) xmppClient = xmpp.Client(jid.getDomain(), debug=[]) xmppClient.connect(server=_SERVER) xmppClient.RegisterHandler('message', XMPP_message_cb) auth = xmppClient.auth(jid.getNode(), xmppPassword, 'botty') xmppClient.sendInitPresence() start=time.time() i=0 outputToOperator("starting") while time.time()-start<15: print "tick" xmppClient.Process(1) i=i+1 if i % 10 == 0: outputToOperator("hello") outputToOperator("exiting") def XMPP_message_cb(session, message): jid = xmpp.protocol.JID(message.getFrom()) command = message.getBody() print command def outputToOperator(msg): print "Outputting "+msg+" to " + operator xmppClient.send(xmpp.Message(operator, msg)) |
From: Bryan O. <bry...@gm...> - 2010-12-21 17:42:54
|
On Tue, Dec 21, 2010 at 11:08 AM, Yann Leboulanger <as...@la...> wrote: > > To log out from a room (and not receive messages from the room) you just > have to send an unavailable presence. > > You should read XEP-0045 which explains the groupchat (MUC) protocol in > detail. Thank you. Sending a Presence(typ="unavailable") is the magic I was looking for. |
From: Yann L. <as...@la...> - 2010-12-21 17:08:34
|
On 12/21/2010 06:00 PM, Bryan Oakley wrote: > I've got a simple client working that connects to a group chat. Now I > want to implement the ability to set the status to 'away' and/or log > out of the server. > > My first attempts don't seem to work -- if I call the disconnect() > method on the client that works, but then I'm not able to reconnect. > This makes me wonder if there's a more proper way to leave a chatroom. > > My initialization code looks like this: > > self.client = xmpp.Client(jid.getdomain(), debug=[]) > self.client.connect() > self.client.auth(jid.getNode(), password) > self.client.sendpresence("%s/%s" % (room, nick)) > > That all works great and I'm able to chat with people in the room. > What must I do to log out of that room (ie: set my status to 'away'), > yet be able to log back in later? To log out from a room (and not receive messages from the room) you just have to send an unavailable presence. You should read XEP-0045 which explains the groupchat (MUC) protocol in detail. |