내가 설정 한 ejabberd 14.12 서버는Ejabberd 14.12 mod_mam 멀티 세션 문제
mod_mam 잘 작동 하나 개의 세션을 가진 다른 사용자
그러나 예를 들어 사용자-1에 보내는 @ 사용자 1 예 @ 다른 자원과 사용자 2 2 개 온라인 세션이있는 경우 예 (JID를 베어) 하나의 메시지 @ - mod_mam이 두 개의 메시지
저장ejabberd 로그 :
<0.708.0>@ejabberd_http_bind:http_put:792 Looking for session: <<"2a16b709927907352b5696d8c7fbb4bdc641c736">>
<0.606.0>@ejabberd_http_bind:handle_sync_event:440 New request: {http_put,152025,[{<<"xmlns">>,<<"http://jabber.org/protocol/httpbind">>},{<<"rid">>,<<"152025">>},{<<"sid">>,<<"2a16b709927907352b5696d8c7fbb4bdc641c736">>},{<<"key">>,<<"e9815d19f02d2ca9249209cdd82c818fae01b821">>}],[{xmlel,<<"message">>,[{<<"xmlns">>,<<"jabber:client">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"2-222">>}]}]}],251,1,<<>>,{{10,0,2,2},49075}}
<0.606.0>@ejabberd_http_bind:handle_http_put_event:575 New request: {http_put,152025,[{<<"xmlns">>,<<"http://jabber.org/protocol/httpbind">>},{<<"rid">>,<<"152025">>},{<<"sid">>,<<"2a16b709927907352b5696d8c7fbb4bdc641c736">>},{<<"key">>,<<"e9815d19f02d2ca9249209cdd82c818fae01b821">>}],[{xmlel,<<"message">>,[{<<"xmlns">>,<<"jabber:client">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"2-222">>}]}]}],251,1,<<>>,{{10,0,2,2},49075}}
<0.606.0>@ejabberd_http_bind:rid_allow:866 Previous rid/New rid: 152024/152025
<0.606.0>@ejabberd_http_bind:process_http_put:608 Actually processing request: {http_put,152025,[{<<"xmlns">>,<<"http://jabber.org/protocol/httpbind">>},{<<"rid">>,<<"152025">>},{<<"sid">>,<<"2a16b709927907352b5696d8c7fbb4bdc641c736">>},{<<"key">>,<<"e9815d19f02d2ca9249209cdd82c818fae01b821">>}],[{xmlel,<<"message">>,[{<<"xmlns">>,<<"jabber:client">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"2-222">>}]}]}],251,1,<<>>,{{10,0,2,2},49075}}
<0.606.0>@ejabberd_http_bind:process_http_put:619 Key/OldKey/NextKey: e9815d19f02d2ca9249209cdd82c818fae01b821/4b0850aed0c7d411c41f28c041f0e176db7cf4d7/4b0850aed0c7d411c41f28c041f0e176db7cf4d7
<0.606.0>@ejabberd_http_bind:process_http_put:659 -- SaveKey: e9815d19f02d2ca9249209cdd82c818fae01b821
<0.606.0>@ejabberd_http_bind:process_http_put:671 reqlist: [{hbr,152025,<<"4b0850aed0c7d411c41f28c041f0e176db7cf4d7">>,[]},{hbr,152024,<<"882220e875a29152d9b15510b8673137e8360e42">>,[]}]
<0.606.0>@ejabberd_http_bind:process_http_put:717 really sending now: [{xmlel,<<"message">>,[{<<"xmlns">>,<<"jabber:client">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"2-222">>}]}]}]
<0.607.0>@ejabberd_router:do_route:322 route
from {jid,<<"user-2">>,<<"ch">>,<<"ch_jsjac">>,<<"user-2">>,<<"ch">>,<<"ch_jsjac">>}
to {jid,<<"user-1">>,<<"ch">>,<<>>,<<"user-1">>,<<"ch">>,<<>>}
packet {xmlel,<<"message">>,[{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"2-222">>}]}]}
<0.496.0>@mod_mam:handle_cast:313 Packet: {xmlel,<<"message">>,[{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"2-222">>}]}]}
<0.607.0>@ejabberd_local:do_route:296 local route
from {jid,<<"user-2">>,<<"ch">>,<<"ch_jsjac">>,<<"user-2">>,<<"ch">>,<<"ch_jsjac">>}
to {jid,<<"user-1">>,<<"ch">>,<<>>,<<"user-1">>,<<"ch">>,<<>>}
packet {xmlel,<<"message">>,[{<<"to">>,<<"user"...>>},{<<"type">>,<<...>>}],[{xmlel,<<...>>,...}]}
<0.607.0>@ejabberd_sm:do_route:514 session manager
from {jid,<<"user-2">>,<<"ch">>,<<"ch_jsjac">>,<<"user-2">>,<<"ch">>,<<"ch_jsjac">>}
to {jid,<<"user-1">>,<<"ch">>,<<>>,<<"user-1">>,<<"ch">>,<<>>}
packet {xmlel,<<"message">>,[{<<"to">>,<<"user"...>>},{<<"type">>,<<...>>}],[{xmlel,<<...>>,...}]}
<0.607.0>@ejabberd_sm:route_message:658 sending to process <0.586.0>
<0.607.0>@ejabberd_sm:route_message:658 sending to process <0.649.0>
<0.615.0>@ejabberd_http_bind:prepare_response:914 OutPacket: [{xmlstreamelement,{xmlel,<<"message">>,[{<<"from">>,<<"[email protected]/ch_jsjac">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"2-222">>}]}]}}]
<0.615.0>@ejabberd_http_bind:send_outpacket:1056 --- outgoing data ---
<body xmlns='http://jabber.org/protocol/httpbind'><message xmlns='jabber:client' from='[email protected]/ch_jsjac' to='[email protected]' type='chat'><body>2-222</body></message></body>
--- END ---
<0.580.0>@ejabberd_http_bind:prepare_response:914 OutPacket: [{xmlstreamelement,{xmlel,<<"message">>,[{<<"from">>,<<"[email protected]/ch_jsjac">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"2-222">>}]}]}}]
<0.580.0>@ejabberd_http_bind:send_outpacket:1056 --- outgoing data ---
<body xmlns='http://jabber.org/protocol/httpbind'><message xmlns='jabber:client' from='[email protected]/ch_jsjac' to='[email protected]' type='chat'><body>2-222</body></message></body>
--- END ---
<0.496.0>@mod_mam:handle_cast:313 Packet: {xmlel,<<"message">>,[{<<"from">>,<<"[email protected]/ch_jsjac">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"2-222">>}]}]}
<0.496.0>@mod_mam:handle_cast:313 Packet: {xmlel,<<"message">>,[{<<"from">>,<<"[email protected]/ch_jsjac">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"2-222">>}]}]}
mod_mam에서 'handle_cast'를 두 번 볼 수 있습니다. 내가 아카이브에서 메시지를 조회하면
내가 이런 걸 가지고 :<message xmlns='jabber:client' from='[email protected]' to='[email protected]/42114606331421936688301010'>
<result xmlns='urn:xmpp:mam:tmp' id='54C104E31E374104E800009B'>
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2015-01-22T14:10:43Z'/>
<message from='[email protected]/8658298161421935653320719' to='[email protected]' type='chat'>
<body>
2-222
</body>
</message>
</forwarded>
</result>
</message>
<message xmlns='jabber:client' from='[email protected]' to='[email protected]/42114606331421936688301010'>
<result xmlns='urn:xmpp:mam:tmp' id='54C104E31E374104E800009C'>
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2015-01-22T14:10:43Z'/>
<message from='[email protected]/8658298161421935653320719' to='[email protected]' type='chat'>
<body>
2-222
</body>
</message>
</forwarded>
</result>
</message>
을하지만 난 중복없이 하나의 메시지가 나타납니다합니다.
비슷하게 user-1 @ example이 다른 리소스를 가진 3 개의 온라인 세션을 가지고 있고 user-2 @ example이 user-1 @ example (맨손으로 JID하기)에게 하나의 메시지를 보내는 경우 - mod_mam은 두 개의 메시지를 저장합니다.
ejabberd 로그 :
<0.690.0>@ejabberd_http_bind:http_put:792 Looking for session: <<"2a16b709927907352b5696d8c7fbb4bdc641c736">>
<0.606.0>@ejabberd_http_bind:handle_sync_event:440 New request: {http_put,151909,[{<<"xmlns">>,<<"http://jabber.org/protocol/httpbind">>},{<<"rid">>,<<"151909">>},{<<"sid">>,<<"2a16b709927907352b5696d8c7fbb4bdc641c736">>},{<<"key">>,<<"97451cccc5e5f52563e625169fbc6fecc17ae950">>}],[{xmlel,<<"message">>,[{<<"xmlns">>,<<"jabber:client">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"3-333">>}]}]}],251,1,<<>>,{{10,0,2,2},47540}}
<0.606.0>@ejabberd_http_bind:handle_http_put_event:575 New request: {http_put,151909,[{<<"xmlns">>,<<"http://jabber.org/protocol/httpbind">>},{<<"rid">>,<<"151909">>},{<<"sid">>,<<"2a16b709927907352b5696d8c7fbb4bdc641c736">>},{<<"key">>,<<"97451cccc5e5f52563e625169fbc6fecc17ae950">>}],[{xmlel,<<"message">>,[{<<"xmlns">>,<<"jabber:client">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"3-333">>}]}]}],251,1,<<>>,{{10,0,2,2},47540}}
<0.606.0>@ejabberd_http_bind:rid_allow:866 Previous rid/New rid: 151908/151909
<0.606.0>@ejabberd_http_bind:process_http_put:608 Actually processing request: {http_put,151909,[{<<"xmlns">>,<<"http://jabber.org/protocol/httpbind">>},{<<"rid">>,<<"151909">>},{<<"sid">>,<<"2a16b709927907352b5696d8c7fbb4bdc641c736">>},{<<"key">>,<<"97451cccc5e5f52563e625169fbc6fecc17ae950">>}],[{xmlel,<<"message">>,[{<<"xmlns">>,<<"jabber:client">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"3-333">>}]}]}],251,1,<<>>,{{10,0,2,2},47540}}
<0.606.0>@ejabberd_http_bind:process_http_put:619 Key/OldKey/NextKey: 97451cccc5e5f52563e625169fbc6fecc17ae950/17ba9df4939c3fbd9c7f5021af54e4edb6d11496/17ba9df4939c3fbd9c7f5021af54e4edb6d11496
<0.606.0>@ejabberd_http_bind:process_http_put:659 -- SaveKey: 97451cccc5e5f52563e625169fbc6fecc17ae950
<0.606.0>@ejabberd_http_bind:process_http_put:671 reqlist: [{hbr,151909,<<"17ba9df4939c3fbd9c7f5021af54e4edb6d11496">>,[]},{hbr,151908,<<"7a3ebe3b5639ddcc6f73e004c58966e21364257d">>,[]}]
<0.606.0>@ejabberd_http_bind:process_http_put:717 really sending now: [{xmlel,<<"message">>,[{<<"xmlns">>,<<"jabber:client">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"3-333">>}]}]}]
<0.607.0>@ejabberd_router:do_route:322 route
from {jid,<<"user-2">>,<<"ch">>,<<"ex_jsjac">>,<<"user-2">>,<<"ch">>,<<"ex_jsjac">>}
to {jid,<<"user-1">>,<<"ch">>,<<>>,<<"user-1">>,<<"ch">>,<<>>}
packet {xmlel,<<"message">>,[{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"3-333">>}]}]}
<0.496.0>@mod_mam:handle_cast:313 Packet: {xmlel,<<"message">>,[{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"3-333">>}]}]}
<0.607.0>@ejabberd_local:do_route:296 local route
from {jid,<<"user-2">>,<<"ch">>,<<"ex_jsjac">>,<<"user-2">>,<<"ch">>,<<"ex_jsjac">>}
to {jid,<<"user-1">>,<<"ch">>,<<>>,<<"user-1">>,<<"ch">>,<<>>}
packet {xmlel,<<"message">>,[{<<"to">>,<<"user"...>>},{<<"type">>,<<...>>}],[{xmlel,<<...>>,...}]}
<0.607.0>@ejabberd_sm:do_route:514 session manager
from {jid,<<"user-2">>,<<"ch">>,<<"ex_jsjac">>,<<"user-2">>,<<"ch">>,<<"ex_jsjac">>}
to {jid,<<"user-1">>,<<"ch">>,<<>>,<<"user-1">>,<<"ch">>,<<>>}
packet {xmlel,<<"message">>,[{<<"to">>,<<"user"...>>},{<<"type">>,<<...>>}],[{xmlel,<<...>>,...}]}
<0.607.0>@ejabberd_sm:route_message:658 sending to process <0.586.0>
<0.607.0>@ejabberd_sm:route_message:658 sending to process <0.649.0>
<0.607.0>@ejabberd_sm:route_message:658 sending to process <0.683.0>
<0.615.0>@ejabberd_http_bind:prepare_response:914 OutPacket: [{xmlstreamelement,{xmlel,<<"message">>,[{<<"from">>,<<"[email protected]/ex_jsjac">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"3-333">>}]}]}}]
<0.615.0>@ejabberd_http_bind:send_outpacket:1056 --- outgoing data ---
<body xmlns='http://jabber.org/protocol/httpbind'><message xmlns='jabber:client' from='[email protected]/ex_jsjac' to='[email protected]' type='chat'><body>3-333</body></message></body>
--- END ---
<0.580.0>@ejabberd_http_bind:prepare_response:914 OutPacket: [{xmlstreamelement,{xmlel,<<"message">>,[{<<"from">>,<<"[email protected]/ex_jsjac">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"3-333">>}]}]}}]
<0.580.0>@ejabberd_http_bind:send_outpacket:1056 --- outgoing data ---
<body xmlns='http://jabber.org/protocol/httpbind'><message xmlns='jabber:client' from='[email protected]/ex_jsjac' to='[email protected]' type='chat'><body>3-333</body></message></body>
--- END ---
<0.686.0>@ejabberd_http_bind:prepare_response:914 OutPacket: [{xmlstreamelement,{xmlel,<<"message">>,[{<<"from">>,<<"[email protected]/ex_jsjac">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"3-333">>}]}]}}]
<0.686.0>@ejabberd_http_bind:send_outpacket:1056 --- outgoing data ---
<body xmlns='http://jabber.org/protocol/httpbind'><message xmlns='jabber:client' from='[email protected]/ex_jsjac' to='[email protected]' type='chat'><body>3-333</body></message></body>
--- END ---
<0.496.0>@mod_mam:handle_cast:313 Packet: {xmlel,<<"message">>,[{<<"from">>,<<"[email protected]/ex_jsjac">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"3-333">>}]}]}
<0.496.0>@mod_mam:handle_cast:313 Packet: {xmlel,<<"message">>,[{<<"from">>,<<"[email protected]/ex_jsjac">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"3-333">>}]}]}
<0.496.0>@mod_mam:handle_cast:313 Packet: {xmlel,<<"message">>,[{<<"from">>,<<"[email protected]/ex_jsjac">>},{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"3-333">>}]}]}
<0.580.0>@ejabberd_http:process_header:283 (#Port<0.5639>) http query: 'POST' /http-bind/
<0.580.0>@ejabberd_http:process_request:448 client data: <<"<body rid='568139' sid='fd0a27af99432dc8b6a252ce6dc87e35da715cc1' xmlns='http://jabber.org/protocol/httpbind' key='f4967d3d77af57b2c35847986de0720b8ad6215c' > </body>">>
<0.580.0>@ejabberd_http:process:359 [<<"http-bind">>] matches [<<"http-bind">>]
<0.580.0>@ejabberd_http:process:363 [{'Accept-Language',<<"ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4">>},{'Accept-Encoding',<<"gzip, deflate">>},{'Referer',<<"http://localhost:3000/profile">>},{'Accept',<<"*/*">>},{'Content-Type',<<"text/xml; charset=UTF-8">>},{'User-Agent',<<"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36">>},{<<"Origin">>,<<"http://localhost:3000">>},{'Content-Length',<<"166">>},{'Connection',<<"keep-alive">>},{'Host',<<"localhost:5280">>}]
<0.580.0>@mod_http_bind:process:68 Incoming data: <body rid='568139' sid='fd0a27af99432dc8b6a252ce6dc87e35da715cc1' xmlns='http://jabber.org/protocol/httpbind' key='f4967d3d77af57b2c35847986de0720b8ad6215c' > </body>
<0.580.0>@ejabberd_http_bind:parse_request:1128 --- incoming data ---
<body rid='568139' sid='fd0a27af99432dc8b6a252ce6dc87e35da715cc1' xmlns='http://jabber.org/protocol/httpbind' key='f4967d3d77af57b2c35847986de0720b8ad6215c' > </body>
질문 :
- 그것은 정상 mod_mam (XEP-0313)에 대한 행동이나 모듈의 버그가?
- 어떻게 해결할 수 있습니까? GitHub의에
문제 : 당신은 모든 자원에서 메시지가하지 않으려면 (자원과) 전체 JID에 쿼리해야 같은 XMPP의 MAM 사양에서 https://github.com/kongo2002/ejabberd-mod-mam/issues/7
이 질문은 ejabberd 개발자에게 직접 전달되어야한다고 생각합니다. – Flow