在运行 Openfire 的 Amazon EC2 上 Libjingle PCP 期间出现 501 错误

在运行 Openfire 的 Amazon EC2 上 Libjingle PCP 期间出现 501 错误

我正在尝试实现Google 的 Libjingle(版本:0.6.14)PCP 示例,我在执行过程中收到 501:功能未实现错误。具体来说,该错误发生在每个“帐户”连接、经过身份验证并开始与其他帐户通信之后。最后提供了交互的简要日志。

我已经设置了自己的 jabber 服务器(使用 Amazon EC2 服务器上的 OpenFire),打开了所有必要的端口,并将每个“帐户”添加到了其他帐户的名册中。服务器已设置为允许文件传输。由于我是服务器新手,我不确定为什么会出现此错误以及如何修复它。

提前致谢,AeroBuffalo

PS 如果需要任何其他信息(即任一端/两端的完整程序日志),请告诉我。

接收端:

[018:217] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Thu Jul  5 14:17:15 2012
[018:217]    <iq to="[email protected]/pcp" type="set" id="5">
[018:217]      <jingle xmlns="urn:xmpp:jingle:1" action="session-initiate" sid="402024303" initiator="[email protected]/pcp">
[018:217]        <content name="securetunnel" creator="initiator">
[018:217]          <description xmlns="http://www.google.com/talk/securetunnel">
[018:217]            <type>send:winein.jpeg</type>
[018:217]            <client-cert>--BEGIN CERTIFICATE--END CERTIFICATE--</client-cert>
[018:217]          </description>
[018:217]          <transport xmlns="http://www.google.com/transport/p2p"/>
[018:217]        </content>
[018:217]      </jingle>
[018:217]      <session xmlns="http://www.google.com/session" type="initiate" id="402024303" initiator="[email protected]/pcp">
[018:217]        <description xmlns="http://www.google.com/talk/securetunnel">
[018:217]          <type>send:winein.jpeg</type>
[018:217]          <client-cert>--BEGIN CERTIFICATE--END CERTIFICATE--</client-cert>
[018:217]        </description></session>
[018:217]    </iq>
[018:217] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Thu Jul  5 14:17:15 2012
[018:217]    <presence to="[email protected]/pcp" from="forgesend" type="error">
[018:217]      <error code="404" type="cancel">
[018:217]        <remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
[018:217]      </error></presence>
[018:218] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Thu Jul  5 14:17:15 2012
[018:218]    <presence to="[email protected]/pcp" from="forgesend" type="error">
[018:218]      <error code="404" type="cancel">
[018:218]        <remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
[018:218]      </error></presence>
[018:264] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Thu Jul  5 14:17:15 2012
[018:264]    <iq type="result" id="3" to="[email protected]/pcp">
[018:264]      <query xmlns="google:jingleinfo">
[018:264]        <stun>
[018:264]          <server host="stun.xten.net" udp="3478"/>
[018:264]          <server host="jivesoftware.com" udp="3478"/>
[018:264]          <server host="igniterealtime.org" udp="3478"/>
[018:264]          <server host="stun.fwdnet.net" udp="3478"/>
[018:264]        </stun>
[018:264]        <publicip ip="65.101.207.121"/>
[018:264]      </query></iq>
[018:420] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Thu Jul  5 14:17:15 2012
[018:420]    <iq to="[email protected]/pcp" type="set" id="5" from="[email protected]/pcp">
[018:420]      <jingle xmlns="urn:xmpp:jingle:1" action="session-initiate" sid="3548650675" initiator="[email protected]/pcp">
[018:420]        <content name="securetunnel" creator="initiator">
[018:420]          <description xmlns="http://www.google.com/talk/securetunnel">
[018:420]            <type>recv:wineout.jpeg</type>
[018:420]            <client-cert>--BEGIN CERTIFICATE--END CERTIFICATE--</client-cert>
[018:420]          </description>
[018:420]          <transport xmlns="http://www.google.com/transport/p2p"/>
[018:420]        </content></jingle>
[018:420]      <session xmlns="http://www.google.com/session" type="initiate" id="3548650675" initiator="[email protected]/pcp">
[018:420]        <description xmlns="http://www.google.com/talk/securetunnel">
[018:420]          <type>recv:wineout.jpeg</type>
[018:420]          <client-cert>--BEGIN CERTIFICATE--END CERTIFICATE--</client-cert>
[018:420]        </description></session></iq>
[018:421] TunnelSessionClientBase::OnSessionCreate: received=1
[018:421] Session:3548650675 Old state:STATE_INIT New state:STATE_RECEIVEDINITIATE Type:http://www.google.com/talk/securetunnel Transport:http://www.google.com/transport/p2p
[018:421] TunnelSession::OnSessionState(Session::STATE_RECEIVEDINITIATE)
[018:421] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Thu Jul  5 14:17:15 2012
[018:421]    <iq to="[email protected]/pcp" id="5" type="result"/>
[018:465] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Thu Jul  5 14:17:15 2012
[018:465]    <iq to="[email protected]/pcp" id="5" type="result" from="[email protected]/pcp"/>
[198:665] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Thu Jul  5 14:20:15 2012
[198:665]    <iq type="get" id="162-10" from="forgejabber.com" to="[email protected]/pcp">
[198:665]      <ping xmlns="urn:xmpp:ping"/>
[198:665]    /iq>
[198:665] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Thu Jul  5 14:20:15 2012
[198:665]    <iq type="error" id="162-10" to="forgejabber.com">
[198:665]      <ping xmlns="urn:xmpp:ping"/>
[198:665]      <error code="501" type="cancel">
[198:665]        <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
[198:665]      </error>
[198:665]    </iq>

发件人:

[019:043] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Thu Jul  5 14:17:15 2012
[019:043]    <iq type="get" id="3">
[019:043]      <query xmlns="google:jingleinfo"/>
[019:043]    </iq>
[019:043] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Thu Jul  5 14:17:15 2012
[019:043]    <iq to="[email protected]/pcp" type="set" id="5">
[019:043]      <jingle xmlns="urn:xmpp:jingle:1" action="session-initiate" sid="3548650675" initiator="[email protected]/pcp">
[019:043]        <content name="securetunnel" creator="initiator">
[019:043]          <description xmlns="http://www.google.com/talk/securetunnel">
[019:043]            <type>recv:wineout.jpeg</type>
[019:043]            <client-cert>--BEGIN CERTIFICATE----END CERTIFICATE--</client-cert>
[019:043]          </description>
[019:043]          <transport xmlns="http://www.google.com/transport/p2p"/>
[019:043]        </content>
[019:043]      </jingle>
[019:043]      <session xmlns="http://www.google.com/session" type="initiate" id="3548650675" initiator="[email protected]/pcp">
[019:043]        <description xmlns="http://www.google.com/talk/securetunnel">
[019:043]          <type>recv:wineout.jpeg</type>
[019:043]          <client-cert>--BEGIN CERTIFICATE--END CERTIFICATE--</client-cert>
[019:043]        </description></session></iq>
[019:043] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Thu Jul  5 14:17:15 2012
[019:043]    <presence to="[email protected]/pcp" from="forgereceive" type="error">
[019:043]      <error code="404" type="cancel">
[019:043]        <remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
[019:043]      </error></presence>
[019:044] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Thu Jul  5 14:17:15 2012
[019:044]    <presence to="[email protected]/pcp" from="forgereceive" type="error">
[019:044]      <error code="404" type="cancel">
[019:044]        <remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
[019:044]      </error></presence>
[019:044] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Thu Jul  5 14:17:15 2012
[019:044]    <iq to="[email protected]/pcp" type="set" id="5" from="[email protected]/pcp">
[019:044]      <jingle xmlns="urn:xmpp:jingle:1" action="session-initiate" sid="402024303" initiator="[email protected]/pcp">
[019:044]        <content name="securetunnel" creator="initiator">
[019:044]          <description xmlns="http://www.google.com/talk/securetunnel">
[019:044]            <type>send:winein.jpeg</type>
[019:044]            <client-cert>--BEGIN CERTIFICATE--END CERTIFICATE--</client-cert>
[019:044]          </description>
[019:044]          <transport xmlns="http://www.google.com/transport/p2p"/>
[019:044]        </content></jingle>
[019:044]      <session xmlns="http://www.google.com/session" type="initiate" id="402024303" initiator="[email protected]/pcp">
[019:044]        <description xmlns="http://www.google.com/talk/securetunnel">
[019:044]          <type>send:winein.jpeg</type>
[019:044]          <client-cert>--BEGIN CERTIFICATE--END CERTIFICATE--</client-cert>
[019:044]        </description></session></iq>
[019:044] TunnelSessionClientBase::OnSessionCreate: received=1
[019:044] Session:402024303 Old state:STATE_INIT New state:STATE_RECEIVEDINITIATE Type:http://www.google.com/talk/securetunnel Transport:http://www.google.com/transport/p2p
[019:044] TunnelSession::OnSessionState(Session::STATE_RECEIVEDINITIATE)
[019:044] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Thu Jul  5 14:17:15 2012
[019:044]    <iq to="[email protected]/pcp" id="5" type="result"/>
[019:088] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Thu Jul  5 14:17:15 2012
[019:088]    <iq type="result" id="3" to="[email protected]/pcp">
[019:088]      <query xmlns="google:jingleinfo">
[019:088]        <stun>
[019:088]          <server host="stun.xten.net" udp="3478"/>
[019:088]          <server host="jivesoftware.com" udp="3478"/>
[019:088]          <server host="igniterealtime.org" udp="3478"/>
[019:088]          <server host="stun.fwdnet.net" udp="3478"/>
[019:088]        </stun>
[019:088]        <publicip ip="65.101.207.121"/>
[019:088]      </query>
[019:088]    </iq>
[019:183] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Thu Jul  5 14:17:15 2012
[019:183]    <iq to="[email protected]/pcp" id="5" type="result" from="[email protected]/pcp"/>
[199:381] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Thu Jul  5 14:20:15 2012
[199:381]    <iq type="get" id="474-11" from="forgejabber.com" to="[email protected]/pcp">
[199:381]      <ping xmlns="urn:xmpp:ping"/>
[199:381]    </iq>
[199:381] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Thu Jul  5 14:20:15 2012
[199:381]    <iq type="error" id="474-11" to="forgejabber.com">
[199:381]      <ping xmlns="urn:xmpp:ping"/>
[199:381]      <error code="501" type="cancel">
[199:381]        <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
[199:382]      </error></iq>

答案1

自从这篇帖子发布以来,我就开始快速学习 XMPP。这使得这个错误变得非常简单/明显。对于将来可能遇到此错误的人来说,错误的原因是因为 Libjingle 没有实现 XMPP 的 pining 功能,因此不知道如何处理来自 XMPP/Jabber 服务器的 ping 请求。由于两个客户端从未设置正确的文件传输通信方法(我在执行代码时出错),所以这两个客户端只是坐在那里等待某事发生,这最终导致服务器询问它们是否还在那里。

相关内容