Smack在许多xmpp服务器上工作正常,但是......
在一台服务器上失败。 “服务器没有回复。”
发送
<stream:stream to="talk.renren.com" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
<stream:stream to="talk.xiaonei.com" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
</stream:stream>
接收
<?xml version='1.0'?><stream:stream from='talk.xiaonei.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
<stream:features><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>PLAIN</mechanism></mechanisms></stream:features>
<proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<?xml version='1.0'?><stream:stream from='talk.xiaonei.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
<stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>PLAIN</mechanism></mechanisms></stream:features>
问题在于服务器和客户端的响应。为什么它没有响应? 我也做了
SmackConfiguration.setPacketReplyTimeout(60000);
但是,实际上并没有等待一分钟,这有什么不对?
Id = 1
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 78
Packet Length = 78
Protocol = TCP
Information = 52085 -> 5222 ([SYN], Seq=140737305389561, Ack=140733193388032, Win=65535)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0
Id = 2
Source = 220.181.92.140
Destination = 192.168.0.2
Captured Length = 74
Packet Length = 74
Protocol = TCP
Information = 5222 -> 52085 ([ACK, SYN], Seq=140735357412721, Ack=140737305389562, Win=5792)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.03078103065490723
Id = 3
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 66
Packet Length = 66
Protocol = TCP
Information = 52085 -> 5222 ([ACK], Seq=140737305389562, Ack=140735357412722, Win=33304)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.03097105026245117
Id = 4
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 186
Packet Length = 186
Protocol = TCP
Information = 52085 -> 5222 ([ACK, PUSH], Seq=140737305389562, Ack=140735357412722, Win=33304)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.05746603012084961
Id = 5
Source = 220.181.92.140
Destination = 192.168.0.2
Captured Length = 66
Packet Length = 66
Protocol = TCP
Information = 5222 -> 52085 ([ACK], Seq=140735357412722, Ack=140737305389682, Win=46)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.08501195907592773
Id = 6
Source = 220.181.92.140
Destination = 192.168.0.2
Captured Length = 210
Packet Length = 210
Protocol = TCP
Information = 5222 -> 52085 ([ACK, PUSH], Seq=140735357412722, Ack=140737305389682, Win=46)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.08556103706359863
Id = 7
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 66
Packet Length = 66
Protocol = TCP
Information = 52085 -> 5222 ([ACK], Seq=140737305389682, Ack=140735357412866, Win=33232)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.08582901954650879
Id = 8
Source = 220.181.92.140
Destination = 192.168.0.2
Captured Length = 246
Packet Length = 246
Protocol = TCP
Information = 5222 -> 52085 ([ACK, PUSH], Seq=140735357412866, Ack=140737305389682, Win=46)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.1150150299072266
Id = 9
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 66
Packet Length = 66
Protocol = TCP
Information = 52085 -> 5222 ([ACK], Seq=140737305389682, Ack=140735357413046, Win=33214)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.1150600910186768
Id = 10
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 117
Packet Length = 117
Protocol = TCP
Information = 52085 -> 5222 ([ACK, PUSH], Seq=140737305389682, Ack=140735357413046, Win=33304)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.1165421009063721
Id = 11
Source = 220.181.92.140
Destination = 192.168.0.2
Captured Length = 116
Packet Length = 116
Protocol = TCP
Information = 5222 -> 52085 ([ACK, PUSH], Seq=140735357413046, Ack=140737305389733, Win=46)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.1454780101776123
Id = 12
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 66
Packet Length = 66
Protocol = TCP
Information = 52085 -> 5222 ([ACK], Seq=140737305389733, Ack=140735357413096, Win=33279)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.14552903175354
Id = 13
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 178
Packet Length = 178
Protocol = TCP
Information = 52085 -> 5222 ([ACK, PUSH], Seq=140737305389733, Ack=140735357413096, Win=33304)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.1590421199798584
Id = 14
Source = 220.181.92.140
Destination = 192.168.0.2
Captured Length = 928
Packet Length = 928
Protocol = TCP
Information = 5222 -> 52085 ([ACK, PUSH], Seq=140735357413096, Ack=140737305389845, Win=46)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.1883430480957031
Id = 15
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 66
Packet Length = 66
Protocol = TCP
Information = 52085 -> 5222 ([ACK], Seq=140737305389845, Ack=140735357413958, Win=32873)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.1884889602661133
Id = 16
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 205
Packet Length = 205
Protocol = TCP
Information = 52085 -> 5222 ([ACK, PUSH], Seq=140737305389845, Ack=140735357413958, Win=33304)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.1895370483398438
Id = 17
Source = 220.181.92.140
Destination = 192.168.0.2
Captured Length = 66
Packet Length = 66
Protocol = TCP
Information = 5222 -> 52085 ([ACK], Seq=140735357413958, Ack=140737305389984, Win=54)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.2568290233612061
Id = 18
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 109
Packet Length = 109
Protocol = TCP
Information = 52085 -> 5222 ([ACK, PUSH], Seq=140737305389984, Ack=140735357413958, Win=33304)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.2570159435272217
Id = 19
Source = 220.181.92.140
Destination = 192.168.0.2
Captured Length = 66
Packet Length = 66
Protocol = TCP
Information = 5222 -> 52085 ([ACK], Seq=140735357413958, Ack=140737305390027, Win=54)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.2871429920196533
Id = 20
Source = 220.181.92.140
Destination = 192.168.0.2
Captured Length = 109
Packet Length = 109
Protocol = TCP
Information = 5222 -> 52085 ([ACK, PUSH], Seq=140735357413958, Ack=140737305390027, Win=54)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.2875239849090576
Id = 21
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 66
Packet Length = 66
Protocol = TCP
Information = 52085 -> 5222 ([ACK], Seq=140737305390027, Ack=140735357414001, Win=33282)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.2875690460205078
Id = 22
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 208
Packet Length = 208
Protocol = TCP
Information = 52085 -> 5222 ([ACK, PUSH], Seq=140737305390027, Ack=140735357414001, Win=33304)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.2893130779266357
Id = 23
Source = 220.181.92.140
Destination = 192.168.0.2
Captured Length = 231
Packet Length = 231
Protocol = TCP
Information = 5222 -> 52085 ([ACK, PUSH], Seq=140735357414001, Ack=140737305390169, Win=62)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.3177080154418945
Id = 24
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 66
Packet Length = 66
Protocol = TCP
Information = 52085 -> 5222 ([ACK], Seq=140737305390169, Ack=140735357414166, Win=33221)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.3178660869598389
Id = 25
Source = 220.181.92.140
Destination = 192.168.0.2
Captured Length = 216
Packet Length = 216
Protocol = TCP
Information = 5222 -> 52085 ([ACK, PUSH], Seq=140735357414166, Ack=140737305390169, Win=62)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.3455309867858887
Id = 26
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 66
Packet Length = 66
Protocol = TCP
Information = 52085 -> 5222 ([ACK], Seq=140737305390169, Ack=140735357414316, Win=33229)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.3457200527191162
Id = 27
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 103
Packet Length = 103
Protocol = TCP
Information = 52085 -> 5222 ([ACK, PUSH], Seq=140737305390169, Ack=140735357414316, Win=33304)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.348783016204834
Id = 28
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 89
Packet Length = 89
Protocol = TCP
Information = 52085 -> 5222 ([ACK, PUSH, FIN], Seq=140737305390206, Ack=140735357414316, Win=33304)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.3489921092987061
Id = 29
Source = 220.181.92.140
Destination = 192.168.0.2
Captured Length = 66
Packet Length = 66
Protocol = TCP
Information = 5222 -> 52085 ([ACK], Seq=140735357414316, Ack=140737305390230, Win=62)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.3777120113372803
Id = 30
Source = 220.181.92.140
Destination = 192.168.0.2
Captured Length = 66
Packet Length = 66
Protocol = TCP
Information = 5222 -> 52085 ([ACK, FIN], Seq=140735357414316, Ack=140737305390230, Win=62)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.3777170181274414
Id = 31
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 66
Packet Length = 66
Protocol = TCP
Information = 52085 -> 5222 ([ACK], Seq=140737305390230, Ack=140735357414316, Win=33304)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.3777680397033691
Id = 32
Source = 192.168.0.2
Destination = 220.181.92.140
Captured Length = 66
Packet Length = 66
Protocol = TCP
Information = 52085 -> 5222 ([ACK], Seq=140737305390230, Ack=140735357414317, Win=33304)
Date Received = 2011-02-06 04:25:02 +0800
Time Delta = 0.3778150081634521
谢谢大家