List Info

Thread: Re: Xmpppy-devel Digest, Vol 14, Issue 2




Re: Xmpppy-devel Digest, Vol 14, Issue 2
user name
2007-08-06 03:34:55
Dear Norman
I did change the connection attributes as you instructed me to do. The result of that was that the xmpppy client was able to successfully connect and send a message to the xmpp server. So far so good .
However the message is not reaching it's destination (i.e. the destination messenger). I did send a message from a messenger to a messenger and copied the log and compared it to the a message log sent through xmpppy. There are some minor differences that I can change within the xmpppy code if you think this is appropriate.

The xmpppy message log is :

[rootlocalhost ~]# tail -f  /usr/local/eyeball/logs/xmppd.log | grep '144.33'
2007-08-06 08:16:54 98311 accepted connection from ********.33:39244
2007-08-06 08:16:54 163851 Incoming message from ********.33:39244/1: <?xml version=&#39; 1.09;?><stream:stream xmlns=&quot;jabber:client" to="ahwar.net" version=&quot;1.0&quot; xmlns:stream="http://etherx.jabber.org/streams " >
2007-08-06 08:16:54 163851 Response to ********.33:39244/1: <?xml version=&#39;1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams ' xmlns=';jabber:client' id='nF/JQD6Vfwa7EFK+' from='ahwar.net' version=&#39;1.0'><stream:features><auth xmlns='; http://jabber.org/features/iq-auth'/></stream:features>
2007-08-06 08:16:54 163851 Incoming message from ********.33:39244/1: <iq type=";get" id="1">&lt;query xmlns=&quot;jabber:iq:auth"><username>9613041705<;/username&gt;</query></iq>
2007-08-06 08:16:54 163851 Response to ********.33:39244/1: <iq type='result' id='1&#39;><;query xmlns=';jabber:iq:auth'&gt;<username>9613041705</username>;<resource/><password/&gt;<digest/></query>&lt;/iq>
2007-08-06 08:16:54 163851 Incoming message from ********.33:39244/1: <iq type=";set" id="2">&lt;query xmlns=&quot;jabber:iq:auth"><username>9613041705<;/username&gt;<resource>xmpppy</resource>&lt;digest>;55ad7d36f39fc397519aac0096d44c071769a6bd<;/digest>;</query></iq>
2007-08-06 08:16:54 163851 Response to ********.33:39244/1: <iq type='result' id='2&#39;/>
2007-08-06 08:16:54 163851 Incoming message from ********.33:39244/1: <message to=" 9613041705ahwar.net"> 9613041705ahwar.net" from=";ahwar.net/xmpppy">9613041705ahwar.net/xmpppy&quot; id="3">&lt;body>Hello World!</body>&lt;/message&gt;
2007-08-06 08:16:54 163851 Incoming message from ********.33:39244/1: </stream:stream>;
2007-08-06 08:16:54 163851 Closing connection partially: ********.33:39244/1
2007-08-06 08:16:54 98311 Closing connection completely: ********.33:39244/1

A successful message sent from one client to another&nbsp; client:

2007-08-06 08:20:57 98311 accepted connection from 193.227.186.146:60992
2007-08-06 08:20:57 163851 Incoming message from 193.227.186.146:60992/1 : <?xml version=&#39;1.0' encoding=&#39;UTF-8&#39; ?><stream:stream to='ahwar.net' xmlns=';jabber:client' xmlns:stream=' http://etherx.jabber.org/streams'>;
2007-08-06 08:20:57 163851 Response to 193.227.186.146:60992/1: <?xml version=&#39;1.0'?><stream:stream xmlns:stream=' http://etherx.jabber.org/streams' xmlns=';jabber:client' id='Ub2+PMx2CHqg/1G+' from='ahwar.net' version=&#39;1.0'><stream:features><auth xmlns='; http://jabber.org/features/iq-auth'/&gt;</stream:features>
2007-08-06 08:21:00 163851 Incoming message from 193.227.186.146:60992/1 : <iq type=";get" id="iq-id:1";><query xmlns=&quot;jabber:iq:auth"><username>9613041705<;/username&gt;</query></iq>
2007-08-06 08:21:00 163851 Response to 193.227.186.146:60992/1: <iq type='result' id='iq-id:1'&gt;<query xmlns=';jabber:iq:auth'&gt;<username>9613041705</username>;<resource/><password/&gt;<digest/></query>&lt;/iq>
2007-08-06 08:22:56 163851 Incoming message from 193.227.186.146:60992/1: <message type=";chat" to=" 9613089187ahwar.net">9613089187ahwar.net " id="message-id:1">&lt;thread&gt;86567DEE-EA1D-498C-8664-D533368F16C4</thread>&lt;body>&amp;lt;font face=&apos;Arial&amp;apos;&amp;gt;&lt;font size=&apos;2&apos;&gt;&lt;font color=&;apos;black&apos;&amp;gt;test&lt;/font&gt;&amp;lt;/font&gt;&amp;lt;/font&gt;<;/body>&lt;/message>


The main difference between the two logs is that client to client communication through the eyeball clients refers to messages as <message type='chat', while the xmpppy client does not do so. Is there a way for me to append type='chat' to the outgoing xmpppy client to match the structure of the message sent through the eyeball client.

Thanks for the good work and the support.




On 8/5/07, xmpppy-devel-requestlists.sourceforge.net">xmpppy-devel-requestlists.sourceforge.net < xmpppy-devel-requestlists.sourceforge.net">xmpppy-devel-requestlists.sourceforge.net> wrote:
Send Xmpppy-devel mailing list submissions to
 &nbsp;   ; &nbsp;  xmpppy-devellists.sourceforge.net">xmpppy-devellists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
&nbsp; &nbsp; &nbsp; &nbsp;  https://lists.sourceforge.net/lists/listinfo/xmpppy-devel
or, via email, send a message with subject or body 'help&#39; to
 &nbsp;   ; &nbsp;  xmpppy-devel-requestlists.sourceforge.net"> xmpppy-devel-requestlists.sourceforge.net

You can reach the person managing the list at
 &nbsp;   ; &nbsp;  xmpppy-devel-ownerlists.sourceforge.net">xmpppy-devel-ownerlists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Xmpppy-devel digest...&quot;


Today's Topics:

&nbsp;  1. Re: Xmpppy-devel Digest, Vol 14, Issue 1 (Ali Jawad)
&nbsp;  2. Re: Xmpppy-devel Digest, Vol 14, Issue 1 (Norman Rasmussen)


----------------------------------------------------------------------

Message: 1
Date: Sun, 5 Aug 2007 11:39:07 +0300
From: "Ali Jawad"; < alijawad1gmail.com">alijawad1gmail.com>
Subject: Re: [Xmpppy-devel] Xmpppy-devel Digest, Vol 14, Issue 1
To: xmpppy-devellists.sourceforge.net">xmpppy-devellists.sourceforge.net
Message-ID:
   ; &nbsp; &nbsp; &lt; fb6f4c5d0708050139x8ddc19dped52cf365fb01d92mail.gmail.com">fb6f4c5d0708050139x8ddc19dped52cf365fb01d92mail.gmail.com>
Content-Type: text/plain; charset=&quot;iso-8859-1"

Dear Norman:

&quot;Does the server log an error for the tls connection? &nbsp;If you pass
secure=0 to connect, does it help? ; (or try a different combination of
port and tls)"

I set the the server logging to max verbosity and it did not log any errors,
as for setting secure=0 and trying different port + tls combinations..could
you please tell me where exactly in the code this should be done (I,e, in
the test script, or in the libraries)

One more thing, I have not had much experience with CVS, I just wana ask one
little question, if I download the CVS version should I install it instead
of the current version I am running or should I just replace the files in
question. (I know that this question might be out ouf scope..or offtopic..I
dont need in depth explanations just some clarifications please.)

Thanks..and keep the good work going.



On 8/4/07, xmpppy-devel-requestlists.sourceforge.net">xmpppy-devel-requestlists.sourceforge.net <
xmpppy-devel-requestlists.sourceforge.net">xmpppy-devel-requestlists.sourceforge.net> wrote:
>;
> Send Xmpppy-devel mailing list submissions to
>&nbsp; &nbsp; &nbsp;   ; xmpppy-devellists.sourceforge.net"> xmpppy-devellists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
>  ; &nbsp; &nbsp; &nbsp;https://lists.sourceforge.net/lists/listinfo/xmpppy-devel
> or, via email, send a message with subject or body 'help&#39; to
>&nbsp; &nbsp; &nbsp;   ; xmpppy-devel-requestlists.sourceforge.net">xmpppy-devel-requestlists.sourceforge.net
>
> You can reach the person managing the list at
>&nbsp;   ; &nbsp; &nbsp; xmpppy-devel-ownerlists.sourceforge.net">xmpppy-devel-ownerlists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
&gt; than "Re: Contents of Xmpppy-devel digest...&quot;
>;
>
> Today's Topics:
&gt;
>&nbsp;  1. Error Trying to send simple message (Ali Jawad)
>; &nbsp; 2. Re: Error Trying to send simple message (Norman Rasmussen)
>
>
> ----------------------------------------------------------------------
>;
> Message: 1
> Date: Fri, 3 Aug 2007 16:28:10 +0300
> From: "Ali Jawad"; < alijawad1gmail.com">alijawad1gmail.com>
> Subject: [Xmpppy-devel] Error Trying to send simple message
> To: xmpppy-devellists.sourceforge.net">xmpppy-devellists.sourceforge.net
> Message-ID:
; &nbsp; &nbsp; &nbsp; &lt; fb6f4c5d0708030628u7ef52a6k66b683b6390a8e37mail.gmail.com">fb6f4c5d0708030628u7ef52a6k66b683b6390a8e37mail.gmail.com >
> Content-Type: text/plain; charset=&quot;iso-8859-1"
&gt;
> Hi All
>
&gt; I have used the test script to send a message that is found on
> http://xmpppy-guide.berlios.de/html/node12.html
>; And i have tried the xsend.py both throw the same error.
>;
> [rootns2 examples]# python try.py
>; Traceback (most recent call last):
>; File " try.py", line 14, in ?
>&nbsp; &nbsp; if cl.connect() == "&quot;:
> File "/usr/lib/python2.2/site-packages/xmpp/client.py&quot;, line 195, in
> connect
&gt; &nbsp; &nbsp;if not CommonClient.connect(self,server,proxy,secure,use_srv) or
> secure<>None and not secure: return self.connected
> File "/usr/lib/python2.2/site-packages/xmpp/client.py&quot;, line 175, in
> connect
&gt; &nbsp; &nbsp;except socket.sslerror:
> AttributeError: TCPsocket instance has no attribute 'sslerror'
>
> Our server is a running eyeball server, what is causing this error is it
> something with my python installation or am I missing something
> The script&nbsp; I am running can be found below :
>
&gt; #!/usr/bin/python
>; import sys,os,xmpp
>
> msg="Hello World!&quot;
> jid=" 9613041705ourdomain.net">9613041705ourdomain.net"
> pwd="2345345344&quot;
>;
> recipient=" 9613041705ourdomain.net">9613041705ourdomain.net"
> jid=xmpp.protocol.JID(jid)
>
> cl=xmpp.Client(jid.getDomain(),debug=[])
&gt;
> if cl.connect() == "&quot;:
>&nbsp; &nbsp; &nbsp;   ;print "not connected&quot;
>&nbsp;   ; &nbsp; &nbsp;sys.exit(0)
>
&gt; if cl.auth(jid.getNode(),pwd) == None:
>  ; &nbsp; &nbsp; &nbsp;print "authentication failed&quot;
>&nbsp; &nbsp; &nbsp; &nbsp;  sys.exit(0)
>
>; cl.send(xmpp.protocol.Message(recipient,msg))
>
>; cl.disconnect()
>
>
> Any guidance or help please ?
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
&gt; ------------------------------
&gt;
> Message: 2
> Date: Sat, 4 Aug 2007 00:37:34 +0200
> From: "Norman Rasmussen&quot; < normanrasmussen.co.za">normanrasmussen.co.za >;
> Subject: Re: [Xmpppy-devel] Error Trying to send simple message
&gt; To: xmpppy-devellists.sourceforge.net">xmpppy-devellists.sourceforge.net
> Message-ID:
; &nbsp; &nbsp; &nbsp; &lt; 5b698f5a0708031537s2121910drbaabde4ed6d002c3mail.gmail.com">5b698f5a0708031537s2121910drbaabde4ed6d002c3mail.gmail.com>
&gt; Content-Type: text/plain; charset=ISO-8859-1
&gt;
> On 8/3/07, Ali Jawad < alijawad1gmail.com">alijawad1gmail.com> wrote:
>; > I have used the test script to send a message that is found on
> > http://xmpppy-guide.berlios.de/html/node12.html
>; > And i have tried the xsend.py both throw the same error.
>; >
> > [rootns2 examples]# python try.py
>; > Traceback (most recent call last):
>; >   File "try.py", line 14, in ?
> >   ;  if cl.connect() == "&quot;:
> >   File "/usr/lib/python2.2/site-packages/xmpp/client.py&quot;,
> > line 195, in connect
&gt; >   ;  if not
> > CommonClient.connect (self,server,proxy,secure,use_srv) or
> > secure<>None and not secure: return self.connected
> >   File "/usr/lib/python2.2/site-packages/xmpp/client.py&quot;,
> > line 175, in connect
> >   ;  except socket.sslerror:
>  AttributeError: TCPsocket instance has no attribute 'sslerror'
&gt; > Any guidance or help please ?
>
>; The error is not reported well, but basically it's trying to establish
> an ssl session, and failing (the error reporting is fixed in CVS now,
> thanks for the bug report)
&gt;
> Does the server log an error for the tls connection? &nbsp;If you pass
> secure=0 to connect, does it help? ; (or try a different combination of
> port and tls)
>
> --
> - Norman Rasmussen
> - Email: normanrasmussen.co.za">normanrasmussen.co.za
> - Home page: http://norman.rasmussen.co.za/
>
>
>
> ------------------------------
&gt;
> -------------------------------------------------------------------------
&gt; This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?&nbsp; Stop.
>; Now Search log events and configuration files using AJAX and a browser.
&gt; Download your FREE copy of Splunk now >>&nbsp; http://get.splunk.com/
>
>; ------------------------------
>
> _______________________________________________
> Xmpppy-devel mailing list
> Xmpppy-devellists.sourceforge.net">Xmpppy-devellists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xmpppy-devel
>
>
> End of Xmpppy-devel Digest, Vol 14, Issue 1
> *******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 2
Date: Sun, 5 Aug 2007 17:28:37 +0200
From: "Norman Rasmussen&quot; < normanrasmussen.co.za">normanrasmussen.co.za >;
Subject: Re: [Xmpppy-devel] Xmpppy-devel Digest, Vol 14, Issue 1
To: xmpppy-devellists.sourceforge.net">xmpppy-devellists.sourceforge.net
Message-ID:
 &nbsp; &nbsp;   ; < 5b698f5a0708050828v6066d99cqcb25bf3d9d68bda5mail.gmail.com"> 5b698f5a0708050828v6066d99cqcb25bf3d9d68bda5mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On 8/5/07, Ali Jawad < alijawad1gmail.com">alijawad1gmail.com> wrote:
&gt; Dear Norman:
&gt;
> "Does the server log an error for the tls connection? &nbsp;If you pass
> secure=0 to connect, does it help? ; (or try a different combination of
> port and tls)"
>
>; I set the the server logging to max verbosity and it did not log any errors,
&gt; as for setting secure=0 and trying different port + tls combinations..could
&gt; you please tell me where exactly in the code this should be done (I,e, in
> the test script, or in the libraries)

you can try:

[code-snippet]

cl=xmpp.Client(jid.getDomain (),debug=['always', 'nodebuilder'])

if cl.connect(server=(&#39; 192.168.5.5',5222),secure=0) == "&quot;:

[/code-snippet]

Use the jabber servername or ip address, either should work. ; Try port
5222 or 5223, and try secure=0, secure=1, secure=None. You should also
be able to leave the server part out if you want to leave it
auto-detected.&nbsp; Some server will require tls to login, port 5223
should require secure=1 (tls=old style ssl), port 5222 should allow
None (auto-detect starttls) or 0 (ignore starttls)

> One more thing, I have not had much experience with CVS, I just wana ask one
> little question, if I download the CVS version should I install it instead
&gt; of the current version I am running or should I just replace the files in
> question. (I know that this question might be out ouf scope..or offtopic..I
> dont need in depth explanations just some clarifications please.)

You can overwrite the files that are currently installed, by hand is
the easiest, you only have to copy a few files (diff will tell you
which ones, but you can copy all py's in the xmpp folder of CVS if
you';re unsure) FYI: CVS is pretty stable there's not a lot of
development on xmpp.py at the moment.&nbsp; The other alternative is you
can put a copy of the xmpp files in a subfolder of your application,
python should use the local libraries before the system installed
ones.  (I assume you're happy with how-to checkout from CVS, the
instructions are on the project source page, and the homepage too)

--
- Norman Rasmussen
- Email: normanrasmussen.co.za">normanrasmussen.co.za
- Home page: http://norman.rasmussen.co.za/



------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?&nbsp; Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>&nbsp; http://get.splunk.com/

------------------------------

_______________________________________________
Xmpppy-devel mailing list
Xmpppy-devellists.sourceforge.net">Xmpppy-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmpppy-devel


End of Xmpppy-devel Digest, Vol 14, Issue 2
*******************************************



--
--
With Regards
Ali Jawad Systems Developer/Linux Admin
NOCC Network Operations & Consultancy Center
Address : Hamra - Bliss Str - Blue Bldg  Office #704
Phone  ; : +961-01-360087
Mobile  ;: +961-70-982026


----------------------------------------------------


Confidentiality Notice: The contents of this E-mail are intended for the
named recipient only. It may contain confidential and privileged
information. If you received it in error, please notify us immediately and
then destroy it. Internet communications are not secure and therefore
Network Operations & Consultancy Center does not accept legal responsibility
for the contents of this message. Also, and though we provide every effort
to keep our network free from viruses, you would need to check this E-mail
and any attachments for viruses as we can take no responsibility for any
computer virus which might be transferred by way of this E-mail.
Re: Xmpppy-devel Digest, Vol 14, Issue 2
user name
2007-08-06 04:06:09
В сообщении от Понедельник 06 Август 2007 12:34 Ali Jawad
написал(a):
> The main difference between the two logs is that client
to client
> communication through the eyeball clients refers to
messages as <message
> type='chat', while the xmpppy client does not do so. Is
there a way for me
> to append type='chat' to the outgoing xmpppy client to
match the structure
> of the message sent through the eyeball client.
>
> Thanks for the good work and the support.

Hello.

snakesarge:~$ python
Python 2.3.5 (#2, May  4 2005, 08:51:39) 
[GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2
Type "help", "copyright",
"credits" or "license" for more
information.
>>> import xmpp
>>> print xmpp.Message()
<message xmlns="jabber:client" />
>>> print xmpp.Message(typ='chat')
<message xmlns="jabber:client"
type="chat" />
>>> 

Hope that gives enough hints.

Please stop responding to digest emails. There are regular
emails for these 
purposes. I do not think that you will find any maillist
where replies to 
digests are welcome.

-- 
Respectfully
Alexey Nezhdanov

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Xmpppy-devel mailing list
Xmpppy-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmpppy-dev
el
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )