Giter VIP home page Giter VIP logo

Comments (8)

kraynopp avatar kraynopp commented on July 19, 2024

Hi.

I have the same problem.

jvb.log:

2015-11-11 08:27:44.162 INFO: [22] org.jitsi.videobridge.xmpp.ComponentImpl.handleIQError() (serving component 'JitsiVideobridge') IQ stanza of type <tt>error</tt> received:
2015-11-11 08:27:44.163 INFO: [22] org.jitsi.videobridge.xmpp.ComponentImpl.info() RECV: <iq type="error" from="jabber.st" id="3Iosx-0"><ping xmlns="urn:xmpp:ping"/><error code="400" type="modify"><bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
2015-11-11 08:27:49.160 SEVERE: [19] org.jitsi.xmpp.component.ComponentBase.run().401 Ping timeout for ID: 3Iosx-0

Request from videobridge:

<iq id="3Iosx-0" to="jabber.st" type="get">
  <ping xmlns="urn:xmpp:ping"></ping>
</iq>

Reply from ejabberd:

<iq type='error' from='jabber.st' id='3Iosx-0'>
  <ping xmlns='urn:xmpp:ping'/>
  <error code='400' type='modify'><bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>

Version of videobridge:

jitsi-videobridge-linux-x64-569

from jitsi-videobridge.

paweldomas avatar paweldomas commented on July 19, 2024

Thanks for the report we'll have a look at it !

from jitsi-videobridge.

cmeng-git avatar cmeng-git commented on July 19, 2024

I have the exact same problem. I did an experiment by sending the exact same stanza copy from jitsi-videbridge trace, but sent it via a registered jid client on PSI+. I found that ejabberd did response correctly to the stanza sent from PSI+ client. However ejabberd just ignore stanza sent from jitsi-videobridge. looking at the ejabberd log.

So it is nothing wrong with the ping stanza format, My understanding is is used between a registered logon JID client and the xmpp server; and it is exchanged over the xmpp c2s port 5222.
The question is can a ping stanza be send from a jitsi-videobridge service component.and via port 5275. Since jitsi-videobridge is not an xmpp registered JID client, I would think ejabberd would not have the JID login information and have problem know whom to reply the ping result to. May be jitsi-videbridge should not use to test for active connection between itself and xmpp ejabberd server.

Below are the attached log information: (deleted) see next comment

from jitsi-videobridge.

cmeng-git avatar cmeng-git commented on July 19, 2024

Sorry has to resend the log text, as the previous pasted text contain black-slash, leading to missing
text in previous comment.

Added Info:
The ejabberd server is v15.11 and I have modified the ejabberd src to dump both the Data and State info: ?DEBUG("Received XML on stream = pn~p", [(Data), State]),

====== Sent from jitsi-videobrige. log on ejabberd server =======
14:59:19.323 [debug] Received XML on stream = <<"">>
{state,#Port<0.6592>,gen_tcp,{maxrate,50000,8.499799547337442,1451285949323972},<0.547.0>,infinity,<<>>,infinity}
14:59:19.323 [debug] State: {maxrate,50000,8.499799547337442,1451285949323972}, Size=85
M=0.8500722544376348, I=9999.4

====== Same ping stanza sent from psi+ client: log on ejabberd server =======
15:05:16.498 [debug] Received XML on stream = <<"">>
{state,{tlssock,#Port<0.6651>,#Port<0.6652>},p1_tls,none,<0.569.0>,65536,<<>>,infinity}
15:05:16.498 [debug] route
from {jid,<<"admin">>,<<"example.org">>,<<"Psi+">>,<<"admin">>,<<"example.org">>,<<"Psi+">>}
to {jid,<<>>,<<"example.org">>,<<>>,<<>>,<<"example.org">>,<<>>}
packet {xmlel,<<"iq">>,[{<<"xml:lang">>,<<"en">>},{<<"id">>,<<"BtEuo-153">>},{<<"to">>,<<"example.org">>},{<<"type">>,<<"get">>}],[{xmlel,<<"ping">>,[{<<"xmlns">>,<<"urn:xmpp:ping">>}],[]}]}
15:05:16.498 [debug] local route
from {jid,<<"admin">>,<<"example.org">>,<<"Psi+">>,<<"admin">>,<<"example.org">>,<<"Psi+">>}
to {jid,<<>>,<<"example.org">>,<<>>,<<>>,<<"example.org">>,<<>>}
packet {xmlel,<<"iq">>,[{<<"xml:lang">>,<<"en">>},{<<"id">>,<<...>>},{<<...>>,...},{...}],[{xmlel,<<...>>,...}]}
15:05:16.499 [debug] route
from {jid,<<>>,<<"example.org">>,<<>>,<<>>,<<"example.org">>,<<>>}
to {jid,<<"admin">>,<<"example.org">>,<<"Psi+">>,<<"admin">>,<<"example.org">>,<<"Psi+">>}
packet {xmlel,<<"iq">>,[{<<"id">>,<<"BtEuo-153">>},{<<"type">>,<<"result">>}],[]}
15:05:16.499 [debug] local route
from {jid,<<>>,<<"example.org">>,<<>>,<<>>,<<"example.org">>,<<>>}
to {jid,<<"admin">>,<<"example.org">>,<<"Psi+">>,<<"admin">>,<<"example.org">>,<<"Psi+">>}
packet {xmlel,<<"iq">>,[{<<"id">>,<<"BtEu"...>>},{<<"type">>,<<...>>}],[]}
15:05:16.499 [debug] session manager
from {jid,<<>>,<<"example.org">>,<<>>,<<>>,<<"example.org">>,<<>>}
to {jid,<<"admin">>,<<"example.org">>,<<"Psi+">>,<<"admin">>,<<"example.org">>,<<"Psi+">>}
packet {xmlel,<<"iq">>,[{<<"id">>,<<"BtEu"...>>},{<<"type">>,<<...>>}],[]}
15:05:16.499 [debug] sending to process <0.569.0>
15:05:16.499 [debug] Send XML on stream = <<"">>
15:05:19.329 [debug] Received XML on stream = <<"">>
{state,#Port<0.6592>,gen_tcp,{maxrate,50000,8.499672756345218,1451286309328925},<0.547.0>,infinity,<<>>,infinity}
15:05:19.329 [debug] State: {maxrate,50000,8.499672756345218,1451286309328925}, Size=85
M=0.850072253359728, I=10000.586

from jitsi-videobridge.

cmeng-git avatar cmeng-git commented on July 19, 2024

Sorry, using wireshark to capture protocol exchanges on local loopback, actually ejabberd did response to ping from jitsi-videobridge with the error code via port 5275:

from jitsi-videobridge.

cmeng-git avatar cmeng-git commented on July 19, 2024

Further investigation on ejabberd_service.erl source, the missing of the attribute "from" in ping request is in fact the root cause of the problem. (sorry for my earlier incorrect feedback)

I make the following patches to the ejabberd_service.erl source, then the jitsi-videobridge does receive the correct reply to its ping request.

Note: the patch source many be used temporary until jitsi-videobridge make a new release to fix the problem.

===== extraction from ejabberd_service.erl with modification ========
stream_established({xmlstreamelement, El}, StateData) ->
NewEl = jlib:remove_attr(<<"xmlns">>, El),
#xmlel{name = Name, attrs = Attrs} = NewEl,
%%% cmeng - modified temporary for testing only
From = case xml:get_attr_s(<<"from">>, Attrs) of
<<"">> ->
%% <<"jitsi-videobridge.example.org">>;
lists:nth(1, StateData#state.hosts);
_ ->
xml:get_attr_s(<<"from">>, Attrs)
end,
FromJID = case StateData#state.check_from of
%% If the admin does not want to check the from field
%% when accept packets from any address.
%% In this case, the component can send packet on
%% behalf of the server users.
false -> jlib:string_to_jid(From);
%% The default is the standard behaviour in XEP-0114
_ ->
FromJID1 = jlib:string_to_jid(From),
case FromJID1 of
#jid{lserver = Server} ->
case lists:member(Server, StateData#state.hosts) of
true -> FromJID1;
false -> error
end;
_ -> error
end
end,
To = xml:get_attr_s(<<"to">>, Attrs),
ToJID = case To of
<<"">> -> error;
_ -> jlib:string_to_jid(To)
end,
if ((Name == <<"iq">>) or (Name == <<"message">>) or
(Name == <<"presence">>))
and (ToJID /= error)
and (FromJID /= error) ->
ejabberd_router:route(FromJID, ToJID, NewEl);
true ->
Err = jlib:make_error_reply(NewEl, ?ERR_BAD_REQUEST),
send_element(StateData, Err),
error
end,
{next_state, stream_established, StateData};

====== correct reply to jitsi-videobridge ping request after the source patch ==========
Dec 30, 2015 8:05:51 AM org.jitsi.util.Logger info
INFO: RECV:

from jitsi-videobridge.

rajuw avatar rajuw commented on July 19, 2024

Hi ,
Is there any update on it. i am also facing similler issue

SEVERE: [29] org.jitsi.xmpp.component.ComponentBase.run().417 Ping timeout for ID: noGrM-159
SEVERE: [29] org.jitsi.xmpp.component.ComponentBase.run().417 Ping timeout for ID: noGrM-160
SEVERE: [29] org.jitsi.xmpp.component.ComponentBase.run().417 Ping timeout for ID: noGrM-161

jitsi-videobridge-windows-x86-613
openfire_3_10_3.

Thanks

from jitsi-videobridge.

champtar avatar champtar commented on July 19, 2024

Hi @rajuw,
I've open a PR that fix it for me, see
jitsi/jicoco#4

from jitsi-videobridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.