使用旁遮普连接到google服务器时出错

2024-05-19 09:15:24 发布

您现在位置:Python中文网/ 问答频道 /正文

我用(python2.7.3)安装了punjab。在

我正在尝试连接到谷歌服务器(gmail.com网站)使用emite via Punjab作为中间产物。在

服务器似乎启动良好,我可以访问本地主机:5280/http绑定但我尝试建立的任何联系都失败了。以下是从启动到尝试登录的日志gmail.com网站帐户:

2013-01-30 01:08:58+0530 [-] Log opened.
2013-01-30 01:08:58+0530 [-] twistd 11.1.0 (C:\Python27\python.exe 2.7.3) starting up.
2013-01-30 01:08:58+0530 [-] reactor class: twisted.internet.selectreactor.SelectReactor.
2013-01-30 01:08:58+0530 [-] Site starting on 5280
2013-01-30 01:08:58+0530 [-] Starting factory <twisted.web.server.Site instance at 0x000000000364EB08>
2013-01-30 01:09:38+0530 [HTTPChannel,0,127.0.0.1] 127.0.0.1 - - [29/Jan/2013:19:39:38 +0000] "GET /http-bind HTTP/1.1" 200 170 "-" "Mozilla/5.0 (Windows NT 6.
1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17"
2013-01-30 01:13:56+0530 [HTTPChannel,2,127.0.0.1] HEADERS 1359488636.27:
2013-01-30 01:13:56+0530 [HTTPChannel,2,127.0.0.1] {'origin': 'http://127.0.0.1:8888', 'content-length': '226', 'accept-language': 'en-US,en;q=0.8', 'accept-en
coding': 'gzip,deflate,gzip', 'accept': '*/*', 'user-agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Sa
fari/537.17', 'accept-charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'host': 'localhost:5280', 'referer': 'http://127.0.0.1:8888/Engile.html?gwt.codesvr=127.0.0.1
:9997', 'pragma': 'no-cache', 'cache-control': 'no-cache', 'content-type': 'text/xml; charset=UTF-8'}
2013-01-30 01:13:56+0530 [HTTPChannel,2,127.0.0.1] HTTPB POST :
2013-01-30 01:13:56+0530 [HTTPChannel,2,127.0.0.1] <body to="gmail.com" content="text/xml; charset=utf-8" rid="228343" xmlns:xmpp="urn:xmpp:xbosh" ack="1" hold
="1" secure="true" xml:lang="en" wait="60" xmpp:version="1.0" ver="1.6" xmlns="http://jabber.org/protocol/httpbind" />
2013-01-30 01:13:56+0530 [HTTPChannel,2,127.0.0.1] Session Created : ea15d8ba5d460c80a90371138987072b58eed580 1359488636.3
2013-01-30 01:13:56+0530 [HTTPChannel,2,127.0.0.1] ================================== 1359488636.3 connect to gmail.com:5222 ==================================

2013-01-30 01:13:56+0530 [HTTPChannel,2,127.0.0.1] G:\Softwares\Libraries\punjab\punjab\session.py:85: exceptions.UserWarning: Domain argument to XMPPClientCon
nector should be bytes, not unicode
2013-01-30 01:13:56+0530 [HTTPChannel,2,127.0.0.1] Starting factory <punjab.session.Session object at 0x0000000003664390>
2013-01-30 01:13:57+0530 [-] DNSDatagramProtocol starting on 30443
2013-01-30 01:13:57+0530 [-] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x0000000003672C18>
2013-01-30 01:13:57+0530 [DNSDatagramProtocol (UDP)] DNSDatagramProtocol starting on 24214
2013-01-30 01:13:57+0530 [DNSDatagramProtocol (UDP)] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x0000000003672E80>
2013-01-30 01:13:57+0530 [-] (UDP Port 30443 Closed)
2013-01-30 01:13:57+0530 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x0000000003672C18>
2013-01-30 01:13:57+0530 [DNSDatagramProtocol (UDP)] DNSDatagramProtocol starting on 37666
2013-01-30 01:13:57+0530 [DNSDatagramProtocol (UDP)] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x0000000003660908>
2013-01-30 01:13:57+0530 [-] (UDP Port 24214 Closed)
2013-01-30 01:13:57+0530 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x0000000003672E80>
2013-01-30 01:13:57+0530 [-] (UDP Port 37666 Closed)
2013-01-30 01:13:57+0530 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x0000000003660908>
2013-01-30 01:13:58+0530 [Uninitialized] SID: ea15d8ba5d460c80a90371138987072b58eed580 => SEND: "<stream:stream xmlns:stream='http://etherx.jabber.org/streams'
 xmlns='jabber:client' to='gmail.com' version='1.0'>"
2013-01-30 01:13:58+0530 [XmlStream,client] SID: ea15d8ba5d460c80a90371138987072b58eed580 => RECV: '<stream:stream from="gmail.com" id="149344C387533058" versi
on="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client"><stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></
starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism><mechanism>X-OAUTH2</mechanism></mechanisms></stream:feature
s>'
2013-01-30 01:13:58+0530 [XmlStream,client] Wait until starttls is completed.
2013-01-30 01:13:58+0530 [XmlStream,client] [<twisted.words.protocols.jabber.xmlstream.TLSInitiatingInitializer object at 0x0000000003676AC8>]
2013-01-30 01:14:18+0530 [XmlStream,client] connect ERROR: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone
'>: Connection was closed cleanly.
        ]
2013-01-30 01:14:18+0530 [XmlStream,client] HTTPB Error 200
2013-01-30 01:14:18+0530 [XmlStream,client] HTTPB Return Error: 200 -> <body xmlns='http://jabber.org/protocol/httpbind' type='terminate' condition='remote-con
nection-failed'/>
2013-01-30 01:14:18+0530 [XmlStream,client] 127.0.0.1 - - [29/Jan/2013:19:44:17 +0000] "POST /http-bind// HTTP/1.0" 200 105 "http://127.0.0.1:8888/Engile.html?
gwt.codesvr=127.0.0.1:9997" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17"
2013-01-30 01:14:18+0530 [XmlStream,client] expire (ea15d8ba5d460c80a90371138987072b58eed580)
2013-01-30 01:14:18+0530 [XmlStream,client] 0
2013-01-30 01:14:18+0530 [XmlStream,client] SESSION -> We have expired ea15d8ba5d460c80a90371138987072b58eed580 228344 []
2013-01-30 01:14:18+0530 [XmlStream,client] SID: ea15d8ba5d460c80a90371138987072b58eed580 => SEND: '</stream:stream>'
2013-01-30 01:14:18+0530 [XmlStream,client] Stopping factory <punjab.session.Session object at 0x0000000003664390>

这里出什么问题了?在


Tags: comclienthttpstreamobjecttwistedprotocolgmail

热门问题