XMPP FileTransfer - 为啥字节流协议失败?

Posted

技术标签:

【中文标题】XMPP FileTransfer - 为啥字节流协议失败?【英文标题】:XMPP FileTransfer - Why does the bytestreams protocol fail?XMPP FileTransfer - 为什么字节流协议失败? 【发布时间】:2012-05-23 02:34:53 【问题描述】:

我的问题:我正在通过 androidios 上的 XMPP 将文件传输到 Spark 客户端 (Spark 2.6.3)。我已经在 android 上成功地完成了这个(由于不错的库),但在 iOS 上还没有成功。但是,在 两个 设备上,我注意到通过字节流传输失败 ...

<error code="404" type="CANCEL"><item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">Could not establish socket with any provided host</text></error>

在 Android 上,传输通过使用 ibb 来完成 ...

<iq id="DK1IO-19" to="myUsername@beta.myCompany.co.uk/Spark 2.6.3" type="set"><open xmlns="http://jabber.org/protocol/ibb" block-size="4096" sid="jsi_4740809287923906297" stanza="iq"/></iq>

此外,在 Android 上,当我将文件从 Spark 发送到我的 Android 应用程序时,它似乎可以通过字节流正常工作。

因此,在 iOS 上,我必须自己编写 ibb 连接,但为什么字节流首先会失败?

完整日志(安卓应用):

05-15 13:42:04.023: I/System.out(523): 01:42:04 PM RCV  (1093423288): <iq id="DK1IO-9" to="myUsername@beta.myCompany.co.uk/123" from="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" type="result"><si xmlns="http://jabber.org/protocol/si"><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="submit"><field var="stream-method"><value>http://jabber.org/protocol/bytestreams</value><value>http://jabber.org/protocol/ibb</value></field></x></feature></si></iq>
05-15 13:42:04.040: I/System.out(523): 01:42:04 PM SENT (1093423288): <iq id="DK1IO-10" to="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" type="get"><query xmlns="http://jabber.org/protocol/disco#info"></query></iq>
05-15 13:42:04.060: I/System.out(523): 01:42:04 PM RCV  (1093423288): <iq id="DK1IO-10" to="myUsername@beta.myCompany.co.uk/123" type="result" from="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="client" name="Smack" type="pc"/><feature var="http://jabber.org/protocol/xhtml-im"/><feature var="http://jabber.org/protocol/muc"/><feature var="http://jabber.org/protocol/bytestreams"/><feature var="http://jabber.org/protocol/commands"/><feature var="http://jabber.org/protocol/si/profile/file-transfer"/><feature var="http://jabber.org/protocol/si"/><feature var="http://jabber.org/protocol/ibb"/></query></iq>
05-15 13:42:04.080: I/System.out(523): 01:42:04 PM SENT (1093423288): <iq id="DK1IO-11" to="beta.myCompany.co.uk" type="get"><query xmlns="http://jabber.org/protocol/disco#items"></query></iq>
05-15 13:42:04.090: I/System.out(523): 01:42:04 PM RCV  (1093423288): <iq type="result" id="DK1IO-11" from="beta.myCompany.co.uk" to="myUsername@beta.myCompany.co.uk/123"><query xmlns="http://jabber.org/protocol/disco#items"><item jid="pubsub.beta.myCompany.co.uk" name="Publish-Subscribe service"/><item jid="broadcast.beta.myCompany.co.uk" name="Broadcast service"/><item jid="search.beta.myCompany.co.uk" name="User Search"/><item jid="conference.beta.myCompany.co.uk" name="Public Chatrooms"/><item jid="proxy.beta.myCompany.co.uk" name="Socks 5 Bytestreams Proxy"/></query></iq>
05-15 13:42:04.100: I/System.out(523): 01:42:04 PM SENT (1093423288): <iq id="DK1IO-12" to="pubsub.beta.myCompany.co.uk" type="get"><query xmlns="http://jabber.org/protocol/disco#info"></query></iq>
05-15 13:42:04.110: I/System.out(523): 01:42:04 PM RCV  (1093423288): <iq id="DK1IO-10" to="myUsername@beta.myCompany.co.uk/123" type="result" from="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="client" name="Smack" type="pc"/><feature var="http://www.xmpp.org/extensions/xep-0166.html#ns"/><feature var="urn:xmpp:tmp:jingle"/></query></iq>
05-15 13:42:04.130: I/System.out(523): 01:42:04 PM RCV  (1093423288): <iq type="result" id="DK1IO-12" from="pubsub.beta.myCompany.co.uk" to="myUsername@beta.myCompany.co.uk/123"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="pubsub" name="Publish-Subscribe service" type="service"/><feature var="http://jabber.org/protocol/pubsub"/><feature var="http://jabber.org/protocol/pubsub#collections"/><feature var="http://jabber.org/protocol/pubsub#config-node"/><feature var="http://jabber.org/protocol/pubsub#create-and-configure"/><feature var="http://jabber.org/protocol/pubsub#create-nodes"/><feature var="http://jabber.org/protocol/pubsub#delete-nodes"/><feature var="http://jabber.org/protocol/pubsub#get-pending"/><feature var="http://jabber.org/protocol/pubsub#instant-nodes"/><feature var="http://jabber.org/protocol/pubsub#item-ids"/><feature var="http://jabber.org/protocol/pubsub#meta-data"/><feature var="http://jabber.org/protocol/pubsub#modify-affiliations"/><feature var="http://jabber.org/protocol/pubsub#manage-subscriptions"/><feature var="http://jabber.org/protocol/pubsub#multi-subscribe"/><feature var="http://jabber.org/protocol/pubsub#outcast-affiliation"/><feature var="http://jabber.org/protocol/pubsub#persistent-items"/><feature var="http://jabber.org/protocol/pubsub#presence-notifications"/><feature var="http://jabber.org/protocol/pubsub#publish"/><feature var="http://jabber.org/protocol/pubsub#publisher-affiliation"/><feature var="http://jabber.org/protocol/pubsub#purge-nodes"/><feature var="http://jabber.org/protocol/pubsub#retract-items"/><feature var="http://jabber.org/protocol/pubsub#retrieve-affiliations"/><feature var="http://jabber.org/protocol/pubsub#retrieve-default"/><feature var="http://jabber.org/protocol/pubsub#retrieve-items"/><feature var="http://jabber.org/protocol/pubsub#retrieve-subscriptions"/><feature var="http://jabber.org/protocol/pubsub#subscribe"/><feature var="http://jabber.org/protocol/pubsub#subscription-options"/><feature var="http://jabber.org/protocol/pubsub#default_access_model_open"/><feature var="http://jabber.org/protocol/disco#info"/></query></iq>
05-15 13:42:04.160: I/System.out(523): 01:42:04 PM SENT (1093423288): <iq id="DK1IO-13" to="broadcast.beta.myCompany.co.uk" type="get"><query xmlns="http://jabber.org/protocol/disco#info"></query></iq>
05-15 13:42:04.170: I/System.out(523): 01:42:04 PM RCV  (1093423288): <iq type="result" id="DK1IO-13" from="broadcast.beta.myCompany.co.uk" to="myUsername@beta.myCompany.co.uk/123"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="component" type="generic" name="Broadcast service"/><feature var="http://jabber.org/protocol/disco#info"/><feature var="http://jabber.org/protocol/disco#items"/></query></iq>
05-15 13:42:04.190: I/System.out(523): 01:42:04 PM SENT (1093423288): <iq id="DK1IO-14" to="search.beta.myCompany.co.uk" type="get"><query xmlns="http://jabber.org/protocol/disco#info"></query></iq>
05-15 13:42:04.200: I/System.out(523): 01:42:04 PM RCV  (1093423288): <iq type="result" id="DK1IO-14" from="search.beta.myCompany.co.uk" to="myUsername@beta.myCompany.co.uk/123"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="directory" type="user" name="User Search"/><feature var="jabber:iq:search"/><feature var="http://jabber.org/protocol/disco#info"/><feature var="http://jabber.org/protocol/rsm"/></query></iq>
05-15 13:42:04.210: I/System.out(523): 01:42:04 PM SENT (1093423288): <iq id="DK1IO-15" to="conference.beta.myCompany.co.uk" type="get"><query xmlns="http://jabber.org/protocol/disco#info"></query></iq>
05-15 13:42:04.230: I/System.out(523): 01:42:04 PM RCV  (1093423288): <iq type="result" id="DK1IO-15" from="conference.beta.myCompany.co.uk" to="myUsername@beta.myCompany.co.uk/123"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="conference" name="Public Chatrooms" type="text"/><identity category="directory" name="Public Chatroom Search" type="chatroom"/><feature var="http://jabber.org/protocol/muc"/><feature var="http://jabber.org/protocol/disco#info"/><feature var="http://jabber.org/protocol/disco#items"/><feature var="jabber:iq:search"/><feature var="http://jabber.org/protocol/rsm"/></query></iq>
05-15 13:42:04.240: I/System.out(523): 01:42:04 PM SENT (1093423288): <iq id="DK1IO-16" to="proxy.beta.myCompany.co.uk" type="get"><query xmlns="http://jabber.org/protocol/disco#info"></query></iq>
05-15 13:42:04.250: I/System.out(523): 01:42:04 PM RCV  (1093423288): <iq type="result" id="DK1IO-16" from="proxy.beta.myCompany.co.uk" to="myUsername@beta.t
05-15 13:42:04.250: I/System.out(523): 01:42:04 PM RCV  (1093423288): xttools.co.uk/123"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="proxy" name="SOCKS5 Bytestreams Service" type="bytestreams"/><feature var="http://jabber.org/protocol/bytestreams"/><feature var="http://jabber.org/protocol/disco#info"/></query></iq>
05-15 13:42:04.330: I/System.out(523): 01:42:04 PM SENT (1093423288): <iq id="DK1IO-17" to="proxy.beta.myCompany.co.uk" type="get"><query xmlns="http://jabber.org/protocol/bytestreams"/></iq>
05-15 13:42:04.341: I/System.out(523): 01:42:04 PM RCV  (1093423288): <iq type="result" id="DK1IO-17" from="proxy.beta.myCompany.co.uk" to="myUsername@beta.myCompany.co.uk/123"><query xmlns="http://jabber.org/protocol/bytestreams"><streamhost jid="proxy.beta.myCompany.co.uk" host="127.0.1.1" port="7777"/></query></iq>
05-15 13:42:04.350: I/System.out(523): 01:42:04 PM SENT (1093423288): <iq id="DK1IO-18" to="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" type="set"><query xmlns="http://jabber.org/protocol/bytestreams" sid="jsi_4740809287923906297" mode = "tcp"><streamhost jid="myUsername@beta.myCompany.co.uk/123" host="127.0.0.1" port="7777"/><streamhost jid="proxy.beta.myCompany.co.uk" host="127.0.1.1" port="7777"/></query></iq>
05-15 13:42:04.400: D/dalvikvm(523): GC_CONCURRENT freed 361K, 5% free 9330K/9799K, paused 5ms+4ms
05-15 13:42:09.412: I/System.out(523): 01:42:09 PM RCV  (1093423288): <iq id="DK1IO-18" to="myUsername@beta.myCompany.co.uk/123" from="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" type="error"><query xmlns="http://jabber.org/protocol/bytestreams" sid="jsi_4740809287923906297" mode="tcp"><streamhost jid="myUsername@beta.myCompany.co.uk/123" host="127.0.0.1" port="7777"/><streamhost jid="proxy.beta.myCompany.co.uk" host="127.0.1.1" port="7777"/></query><error code="404" type="CANCEL"><item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">Could not establish socket with any provided host</text></error></iq>
05-15 13:42:09.430: I/System.out(523): 01:42:09 PM SENT (1093423288): <iq id="DK1IO-19" to="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" type="set"><open xmlns="http://jabber.org/protocol/ibb" block-size="4096" sid="jsi_4740809287923906297" stanza="iq"/></iq>
05-15 13:42:09.451: I/System.out(523): 01:42:09 PM RCV  (1093423288): <iq id="DK1IO-19" to="myUsername@beta.myCompany.co.uk/123" from="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" type="result"/>
05-15 13:42:09.470: I/System.out(523): 01:42:09 PM SENT (1093423288): <iq id="DK1IO-20" to="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" type="set"><data xmlns="http://jabber.org/protocol/ibb" seq="0" sid="jsi_4740809287923906297">SGVsbG8sIEFuZHkh</data></iq>
05-15 13:42:09.480: I/System.out(523): 01:42:09 PM RCV  (1093423288): <iq id="DK1IO-20" to="myUsername@beta.myCompany.co.uk/123" from="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" type="result"/>
05-15 13:42:09.490: I/System.out(523): 01:42:09 PM SENT (1093423288): <iq id="DK1IO-21" to="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" type="set"><close xmlns="http://jabber.org/protocol/ibb" sid="jsi_4740809287923906297"/></iq>
05-15 13:42:09.500: I/System.out(523): 01:42:09 PM RCV  (1093423288): <iq id="DK1IO-21" to="myUsername@beta.myCompany.co.uk/123" from="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" type="result"/>

完整日志(iOS 应用):

2012-05-16 10:41:16.988 JabberClient[392:207] RECIEVED IN APP DELEGATE - <iq xmlns="jabber:client" id="5CCE541D-A2D2-4115-8D0F-A683EE9B18AB" to="myUsername@beta.myCompany.co.uk/844b40b3" from="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" type="result"><si xmlns="http://jabber.org/protocol/si"><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="submit"><field var="stream-method"><value>http://jabber.org/protocol/bytestreams</value></field></x></feature></si></iq>
2012-05-16 10:41:16.989 JabberClient[392:207] Attempting XEP65 connection to friendsUsername@beta.myCompany.co.uk/Spark 2.6.3
2012-05-16 10:41:16.990 JabberClient[392:207] TURNSocket DELEGATE STARTING
2012-05-16 10:41:16.991 JabberClient[392:5307] SENT - <iq type="get" to="beta.myCompany.co.uk" id="24C8A655-1B23-4E49-B0D2-557B863C6EB4"><query xmlns="http://jabber.org/protocol/disco#items"/></iq>
2012-05-16 10:41:16.999 JabberClient[392:5307] RECIEVED IN TURN SOCKET - <iq xmlns="jabber:client" type="result" id="24C8A655-1B23-4E49-B0D2-557B863C6EB4" from="beta.myCompany.co.uk" to="myUsername@beta.myCompany.co.uk/844b40b3"><query xmlns="http://jabber.org/protocol/disco#items"><item jid="pubsub.beta.myCompany.co.uk" name="Publish-Subscribe service"/><item jid="broadcast.beta.myCompany.co.uk" name="Broadcast service"/><item jid="search.beta.myCompany.co.uk" name="User Search"/><item jid="conference.beta.myCompany.co.uk" name="Public Chatrooms"/><item jid="proxy.beta.myCompany.co.uk" name="Socks 5 Bytestreams Proxy"/></query></iq>
2012-05-16 10:41:17.000 JabberClient[392:5307] SENT - <iq type="get" to="proxy.beta.myCompany.co.uk" id="A8D03520-2200-4260-A150-910BC70F794A"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
2012-05-16 10:41:17.004 JabberClient[392:5007] RECIEVED IN TURN SOCKET - <iq xmlns="jabber:client" type="result" id="A8D03520-2200-4260-A150-910BC70F794A" from="proxy.beta.myCompany.co.uk" to="myUsername@beta.myCompany.co.uk/844b40b3"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="proxy" name="SOCKS5 Bytestreams Service" type="bytestreams"/><feature var="http://jabber.org/protocol/bytestreams"/><feature var="http://jabber.org/protocol/disco#info"/></query></iq>
2012-05-16 10:41:17.005 JabberClient[392:5007] SENT - <iq type="get" to="proxy.beta.myCompany.co.uk" id="50A73193-944D-402D-B2E4-EEACC537B23B"><query xmlns="http://jabber.org/protocol/bytestreams"/></iq>
2012-05-16 10:41:17.008 JabberClient[392:5007] RECIEVED IN TURNSOCKET - <iq xmlns="jabber:client" type="result" id="50A73193-944D-402D-B2E4-EEACC537B23B" from="proxy.beta.myCompany.co.uk" to="myUsername@beta.myCompany.co.uk/844b40b3"><query xmlns="http://jabber.org/protocol/bytestreams"><streamhost jid="proxy.beta.myCompany.co.uk" host="127.0.1.1" port="7777"/></query></iq>
2012-05-16 10:41:17.009 JabberClient[392:5007] SENT - <iq type="set" from="myUsername@beta.myCompany.co.uk/844b40b3" to="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" id="5CCE541D-A2D2-4115-8D0F-A683EE9B18AB"><query xmlns="http://jabber.org/protocol/bytestreams" sid="5CCE541D-A2D2-4115-8D0F-A683EE9B18AB" mode="tcp"><streamhost xmlns="http://jabber.org/protocol/bytestreams" jid="proxy.beta.myCompany.co.uk" host="127.0.1.1" port="7777"/></query></iq>
2012-05-16 10:41:27.027 JabberClient[392:540b] RECIEVED IN TURN SOCKET - <iq xmlns="jabber:client" id="5CCE541D-A2D2-4115-8D0F-A683EE9B18AB" to="myUsername@beta.myCompany.co.uk/844b40b3" from="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" type="error"><query xmlns="http://jabber.org/protocol/bytestreams" sid="5CCE541D-A2D2-4115-8D0F-A683EE9B18AB" mode="tcp"><streamhost jid="proxy.beta.myCompany.co.uk" host="127.0.1.1" port="7777"/></query><error code="404" type="CANCEL"><item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" lang="en">Could not establish socket with any provided host</text></error></iq>
2012-05-16 10:41:27.028 JabberClient[392:540b] TURN Connection failed!

OpenFire XMPP 设置 -

xmpp.auth.anonymous - true
xmpp.client.compression.policy - disabled
xmpp.client.idle -1
xmpp.client.idle.ping - false
xmpp.domain - beta.myCompany.co.uk
xmpp.enabled - true
xmpp.externalip - proxy.beta.myCompany.co.uk
xmpp.offline.quota - 102400
xmpp.offline.type - bounce
xmpp.proxy.enabled - true
xmpp.proxy.port - 7777
xmpp.proxy.transfer.required - true
xmpp.server.compression.policy - disabled
xmpp.server.socket.active - true
xmpp.session.conflict-limit - 0
xmpp.session.conflict.limit - 0
xmpp.socket.ssl.active - true

5 月 19 日更新:以下是 Spark 成功将 发送到 android 的一些日志(反之亦然)。使用的流主机不是代理!但是,我还没有设法在 iOS 上复制它,我真的应该这样做吗?代理不应该工作吗?

RCV  (1079219752): <iq id="ktI51-43" to="myUsername@beta.myCompany.co.uk/123" type="set" from="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3"><query xmlns="http://jabber.org/protocol/bytestreams" sid="jsi_1985730781887292843" mode="tcp"><streamhost jid="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" host="10.95.xxx.xx" port="7777"/><streamhost jid="proxy.beta.myCompany.co.uk" host="127.0.1.1" port="7777"/></query></iq>
SENT (1079219752): <iq id="ktI51-43" to="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" type="result"><query xmlns="http://jabber.org/protocol/bytestreams"><streamhost-used jid="friendsUsername@beta.myCompany.co.uk/Spark 2.6.3" /></query></iq>

请注意,如果我尝试从 Spark 发送到我的 iOS 应用程序,当使用非代理流主机时,连接会被拒绝! (如本 SOCKS Protocol Version 5 文件的第 6 点)。 Rep 在下面的代码中是 5,(但应该是 0)。

UInt8 ver = [NSNumber extractUInt8FromData:data atOffset:0];
UInt8 rep = [NSNumber extractUInt8FromData:data atOffset:1];

主机文件:(注意:对于这个 *** 问题,我已经用 x 替换了一些数字)

127.0.0.1       localhost
10.95.xxx.xxx   intranet.myCompany.co.uk
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost
10.95.xxx.xxx   beta.myCompany.co.uk

【问题讨论】:

file transfer in Spark 2.6.3 中存在一些可能导致此问题的错误。我建议您尝试 2.7.x 的 Beta 版本,看看它是否仍然存在。 似乎无法访问任何流主机。但是只有一个 XMPP 节无法说明传输失败的原因。 罗宾:感谢您的回复。不幸的是,我使用的是 Mac,Spark 2.7.0 beta 似乎还没有适用于 Mac。话虽如此,该网站暗示文件传输的大错误修复是使用 IBB。我没有看到任何提及字节流。 流程:感谢您的回复,这是一个公平的观点。我已将完整日志添加到我的 android 项目中的问题中。 另外,如果确实似乎无法访问任何流主机,我不明白为什么,也不知道下一步该采取什么步骤。 OpenFire 服务器在我的 LAN 上是否相关? 【参考方案1】:

是的,文件传输会出现这个错误。不要使用已编译的库,使用 smack for android 的源代码 amack/smack 它将帮助您跟踪错误。我确实使用了源代码。

https://github.com/rtreffer/smack/blob/master/source/org/jivesoftware/smack/XMPPConnection.java

【讨论】:

【参考方案2】:

看起来您的服务器正在报告 127.0.0.1 或 localhost 的 Steam 主机(代理),这是不正确的。

我最近在一个 openfire 服务器上看到这个,有人配置 /etc/hosts 将服务器名称指向 127.0.0.1,所以当它查找自己的名称时,它会向客户端报告。

检查这一点的最简单方法是“ping”和“ping”,然后查看它提供的 IP 地址。

例如,如果您的服务器名称是 beta.myCompany.co.uk,您可以尝试(登录服务器时):

ping 测试版 ping beta.myCompany.co.uk

如果返回的 IP 为 127.0.0.1,请检查 /etc/hosts(或 C:\Windows\System32\drivers\etc\hosts,如果在 Windows 上)并确保 beta 和 beta.myCompany.co.uk不存在(或有适当的数据,如果存在)。

【讨论】:

嗨扎克。非常感谢您的评论。我已将我的主机文件添加到此处的问题中。 127.0.0.1 针对本地主机。 Beta 有一个不同的 IP 地址(我想我需要添加它才能使常规 XMPP 文本消息正常工作)。如果我执行“ping beta.myCompany.co.uk”,我会得到定期响应,例如...“64 bytes from 10.95.xxx.xxx: icmp_seq=0 ttl=64 time=3.799 ms”。似乎还有一些设置不正确?【参考方案3】:

我的 OpenFire 属性设置有误。 'xmpp.externalip' 是错误的。我需要使用“xmpp.proxy.enabledip”并将其设置为公共 ip。

【讨论】:

HI 我在哪里可以找到这个设置在开火服务器@Andy A

以上是关于XMPP FileTransfer - 为啥字节流协议失败?的主要内容,如果未能解决你的问题,请参考以下文章

无法使用 Beem-Asmack 在 XMPP FileTransfer 中处理上传

java 字节流 多个文件写入一个文件 为啥前面写入的内容会被覆盖了

JAVA中,使用字节流读写文件,为啥找不到文件的位置?请看补充:

为啥要实现Serializable

为啥要实现Serializable

java的io中为啥有那么多种流啊?