send xmpp <message> to component on other domain - xmpp

step 1:on the same domain(.myserver.kicks-ass.net), i able to send to the mycomponent,succesfully.
step 2:when i login to other domain ,example gmail.com and try send to another user on test#.myserver.kicks-ass.net, success as well.
step 3:just like step2, but i send the to mycomponent.myserver.kicks-ass.net , i get below error
<message xmlns='jabber:client'
to='mycomponent.myserver.kicks-ass.net'
from='user#gmail.com/123'
type='chat'>
<body>
just t4st
</body>
<x xmlns='jabber:x:event'>
<offline/>
<composing/>
</x>
</message>
<message xmlns='jabber:client'
to='user#gmail.com/123'
from='mycomponent.myserver.kicks-ass.net'
type='error'>
<body>
just t4st
</body>
<x xmlns='jabber:x:event'>
<offline/>
<composing/>
</x>
<error code='404'
type='cancel'>
<remote-server-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</message>

Do you have an SRV record for:
_xmpp-server._tcp.mycomponent.myserver.kicks-ass.net
You can test for this with the following shell command:
% dig +short -t SRV _xmpp-server._tcp.mycomponent.myserver.kicks-ass.net.
Can you telnet to that host/port from outside your network? For example:
% dig +short -t SRV _xmpp-server._tcp.jabber.org.
30 30 5269 hermes.jabber.org.
% telnet hermes.jabber.org 5269
Trying 208.68.163.220...
Connected to hermes.jabber.org.
Escape character is '^]'.
<<
<stream:error><bad-format xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error></stream:stream>
Connection closed by foreign host

Related

Unable to send messages to a MUC room

When I try to send a message to an XMPP MUC Room such as:
<message to="room#conference.chat.example.com" type="groupchat">
<body>TEST</body>
</message>
The message will not be delivered to other participants in the room and I get this response from the server:
<message
xmlns="jabber:client" lang="en" to="karim#chat.example.com/resource" from="room#conference.chat.example.com" type="error">
<error code="503" type="cancel">
<service-unavailable
xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">
</service-unavailable>
<text
xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" lang="en">User session not found
</text>
</error>
<body>TEST</body>
Im using ejabberd Community Server v20.07 installed into Docker using the official image.
The full ejabberd.yml configuration file that Im using can be found here.
The full server log can be found here.
The above error happen with different clients and not only one.
You have configured this, and this is completely wrong:
hosts:
- chat.example.com
- conference.chat.example.com
modules:
mod_muc:
...
I guess you didn't notice the option HOSTS in the MOD_MUC documentation: https://docs.ejabberd.im/admin/configuration/modules/#mod-muc
Try something like this:
hosts:
- chat.example.com
modules:
mod_muc:
hosts:
- conference.#HOST#
...

Ejabberd 14.12 mod_mam multisession issue

I have configured ejabberd 14.12 server with enabled multisession and working mod_mam (XEP-0313 v0.2, https://github.com/kongo2002/ejabberd-mod-mam, http://xmpp.org/extensions/attic/xep-0313-0.2.html)
mod_mam works great when i send message from user with one connected session to different user with one session
However if user-1#example has 2 online sessions with different resources and user-2#example sends to user-1#example (to bare JID) one message - mod_mam saves two messages
ejabberd log:
<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">>,<<"user-1#example">>},{<<"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">>,<<"user-1#example">>},{<<"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">>,<<"user-1#example">>},{<<"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">>,<<"user-1#example">>},{<<"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">>,<<"user-1#example">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"2-222">>}]}]}
<0.496.0>#mod_mam:handle_cast:313 Packet: {xmlel,<<"message">>,[{<<"to">>,<<"user-1#example">>},{<<"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">>,<<"user-2#example/ch_jsjac">>},{<<"to">>,<<"user-1#example">>},{<<"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='user-2#example/ch_jsjac' to='user-1#example' type='chat'><body>2-222</body></message></body>
--- END ---
<0.580.0>#ejabberd_http_bind:prepare_response:914 OutPacket: [{xmlstreamelement,{xmlel,<<"message">>,[{<<"from">>,<<"user-2#example/ch_jsjac">>},{<<"to">>,<<"user-1#example">>},{<<"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='user-2#example/ch_jsjac' to='user-1#example' type='chat'><body>2-222</body></message></body>
--- END ---
<0.496.0>#mod_mam:handle_cast:313 Packet: {xmlel,<<"message">>,[{<<"from">>,<<"user-2#example/ch_jsjac">>},{<<"to">>,<<"user-1#example">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"2-222">>}]}]}
<0.496.0>#mod_mam:handle_cast:313 Packet: {xmlel,<<"message">>,[{<<"from">>,<<"user-2#example/ch_jsjac">>},{<<"to">>,<<"user-1#example">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"2-222">>}]}]}
We can see double 'handle_cast' from mod_mam.
When i querying messages from archive i got something like this:
<message xmlns='jabber:client' from='user-1#example' to='user-1#example/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='user-2#example/8658298161421935653320719' to='user-1#example' type='chat'>
<body>
2-222
</body>
</message>
</forwarded>
</result>
</message>
<message xmlns='jabber:client' from='user-1#example' to='user-1#example/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='user-2#example/8658298161421935653320719' to='user-1#example' type='chat'>
<body>
2-222
</body>
</message>
</forwarded>
</result>
</message>
But i want receive only one message without duplicate.
Similarly if user-1#example has 3 online sessions with different resources and user-2#example sends to user-1#example (to bare JID) one message - mod_mam saves two messages.
ejabberd log:
<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">>,<<"user-1#example">>},{<<"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">>,<<"user-1#example">>},{<<"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">>,<<"user-1#example">>},{<<"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">>,<<"user-1#example">>},{<<"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">>,<<"user-1#example">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"3-333">>}]}]}
<0.496.0>#mod_mam:handle_cast:313 Packet: {xmlel,<<"message">>,[{<<"to">>,<<"user-1#example">>},{<<"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">>,<<"user-2#example/ex_jsjac">>},{<<"to">>,<<"user-1#example">>},{<<"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='user-2#example/ex_jsjac' to='user-1#example' type='chat'><body>3-333</body></message></body>
--- END ---
<0.580.0>#ejabberd_http_bind:prepare_response:914 OutPacket: [{xmlstreamelement,{xmlel,<<"message">>,[{<<"from">>,<<"user-2#example/ex_jsjac">>},{<<"to">>,<<"user-1#example">>},{<<"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='user-2#example/ex_jsjac' to='user-1#example' type='chat'><body>3-333</body></message></body>
--- END ---
<0.686.0>#ejabberd_http_bind:prepare_response:914 OutPacket: [{xmlstreamelement,{xmlel,<<"message">>,[{<<"from">>,<<"user-2#example/ex_jsjac">>},{<<"to">>,<<"user-1#example">>},{<<"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='user-2#example/ex_jsjac' to='user-1#example' type='chat'><body>3-333</body></message></body>
--- END ---
<0.496.0>#mod_mam:handle_cast:313 Packet: {xmlel,<<"message">>,[{<<"from">>,<<"user-2#example/ex_jsjac">>},{<<"to">>,<<"user-1#example">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"3-333">>}]}]}
<0.496.0>#mod_mam:handle_cast:313 Packet: {xmlel,<<"message">>,[{<<"from">>,<<"user-2#example/ex_jsjac">>},{<<"to">>,<<"user-1#example">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"3-333">>}]}]}
<0.496.0>#mod_mam:handle_cast:313 Packet: {xmlel,<<"message">>,[{<<"from">>,<<"user-2#example/ex_jsjac">>},{<<"to">>,<<"user-1#example">>},{<<"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>
Questions:
It is normal behaviour for mod_mam(XEP-0313) or bug of module?
How i may fix it?
Issue on github: https://github.com/kongo2002/ejabberd-mod-mam/issues/7
From the XMPP MAM specification, it looks like you need to query on full JID (with the resource) if you do not want to get message from all resources. It seems like the correct behavior.
Reference: http://xmpp.org/extensions/xep-0313.html#filter-jid
mod_mam from ejabberd-contrib works perfect. Problem solved.

PubSub module returning error

I'm working on getting Jappix running. I'm using ejabberd as my XMPP server and I've got everything working except comments and viewing attachments - group chat, single chat, external authentication, private messages, friend lists, presence and other works as intended.
My configuration is the same as the one the Jappix project provides on their jappix/jappix-tools github repository. I have no errors in my ejabberd log, the only thing I got while debugging and digging everything up is that this is an example stanza sent to the server:
<iq xmlns="jabber:client" type="get" id="get_31-30" to="pubsub.mydomain.com" xml:lang="en">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<items node="urn:xmpp:microblog:0:comments/3aca5f972fe7198805bdd1a20f502f35"/>
</pubsub>
</iq>
And this is the response I get from the server:
<iq xmlns="jabber:client" from="pubsub.mydomain.com" to="arqu#mydomain.com/jappix (1378149270017)" type="error" id="get_31-30" xml:lang="en" xmlns:xml="http://www.w3.org/XML/1998/namespace">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<items node="urn:xmpp:microblog:0:comments/3aca5f972fe7198805bdd1a20f502f35"/>
</pubsub>
<error code="503" type="cancel">
<service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>
And in Jappix I just get the usual "Service Unavailable" error message.
Additional info:
My BOSH is the internal one of ejabberd and works fine as far as i know, I've setup the reverse proxy and everything else to make it work. Still could be something related to this and not reaching the service on some other port maybe?
It looks like you do not have pubsub enabled/installed on your server.
Have you tried any other pubsub request?

Enabling mod_proxy65 on ejabberd server installed on ec2 ubuntu instance

I am working on a iOS chat application, so for media transfer to work i need to enable mod_proxy65, and i have enabled the same in ejabberd.cfg file with their default setting: {mod_proxy65[]}. on client side i am using the https://github.com/robbiehanson/XMPPFramework xmpp framework for iOS.
in TURNSocket.m i have used proxy candidate as dev.myserver.com in place of default jabber.org . now when I try to open the TURN connection, the series of iq received and sent are as follows:
SEND: <iq type="get" to="dev.myserver.com" id="A9876DD0-B13C-4DC7-B812-2A6E653288BC"><query xmlns="http://jabber.org/protocol/disco#items"/></iq>
RECV: <iq xmlns="jabber:client" from="dev.gungroo.com" to="smita#dev.myserver.com/24983171131368877324197828" id="A9876DD0-B13C-4DC7-B812-2A6E653288BC" type="result"><query xmlns="http://jabber.org/protocol/disco#items"><item jid="conference.dev.myserver.com"/><item jid="irc.dev.myserver.com"/><item jid="proxy.dev.myserver.com"/><item jid="pubsub.dev.myserver.com"/><item jid="vjud.dev.myserver.com"/></query></iq>
SEND: <iq type="get" to="proxy.dev.myserver.com" id="26D694FB-C679-478C-A3D1-A84B9A583534"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
RECV: <iq xmlns="jabber:client" from="proxy.dev.myserver.com" to="smita#dev.myserver.com/24983171131368877324197828" id="26D694FB-C679-478C-A3D1-A84B9A583534" type="result"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="proxy" type="bytestreams" name="SOCKS5 Bytestreams"/><feature var="http://jabber.org/protocol/disco#info"/><feature var="vcard-temp"/><feature var="http://jabber.org/protocol/bytestreams"/><x xmlns="jabber:x:data" type="result"><field var="FORM_TYPE" type="hidden"><value>http://jabber.org/network/serverinfo</value></field></x></query></iq>
SEND: <iq type="get" to="proxy.dev.myserver.com" id="C60068A2-985C-4C5C-87B3-C9FFFB41FDF0"><query xmlns="http://jabber.org/protocol/bytestreams"/></iq>
RECV: <iq xmlns="jabber:client" from="proxy.dev.gungroo.com" to="smita#dev.myserver.com/24983171131368877324197828" id="C60068A2-985C-4C5C-87B3-C9FFFB41FDF0" type="result"><query xmlns="http://jabber.org/protocol/bytestreams"><streamhost jid="proxy.dev.myserver.com" host="10.212.103.159" port="7777"/></query></iq>
here is the problem, its returning me the internal ip address(10.212.103.159) of server dev.myserver.com, resulting in failure of making the TURN connection. why doesn't it return external ip address of proxy.dev.myserver.com ?
to be on the same page: proxy.dev.myserver.com and dev.myserver.com both points to same external ip. and the port 7777 is open at my server dev.myserver.com . anybody who have worked with the same, please help??
here is the last iq(sent and received) which shows the error message:
SEND
<iq type="set" to="smita1#dev.myserver.com/38303823331368691199448799" id="2D376DBF-D437-48C8-B0FF-B10A5CD73240">
<query xmlns="http://jabber.org/protocol/bytestreams" sid="2D376DBF-D437-48C8-B0FF-B10A5CD73240" mode="tcp">
<streamhost xmlns="http://jabber.org/protocol/bytestreams" jid="proxy.dev.myserver.com" host="10.212.103.159" port="7777"/>
</query>
</iq>
RECV
<iq xmlns="jabber:client" from="smita1#dev.myserver.com/38303823331368691199448799" to="smita#dev.myserver.com/278621573136869119737843" type="error" id="2D376DBF-D437-48C8-B0FF-B10A5CD73240">
<query xmlns="http://jabber.org/protocol/bytestreams" sid="2D376DBF-D437-48C8-B0FF-B10A5CD73240" mode="tcp">
<streamhost xmlns="http://jabber.org/protocol/bytestreams" jid="proxy.dev.myserver.com" host="10.212.103.159" port="7777"/>
</query>
<error type="cancel" code="501">
<feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>
it would be really great if someone can point me to the problem. Thanks!
This helped me to resolve the issue. xx.xx.xx.xx is my external ip:
{mod_proxy65, [{hostname, ["xx.xx.xx.xx"]}]},
Visit this ,I can give an idea [XMPPFramework - TURNSocket can't receive the data that sent by myself? ]
Also [http://xmpp.org/extensions/xep-0096.html],[ XMPP Sending/Receving file in iphone sdk ...? ]

Xmpp ejabberd and add-user command

I have two ejabberd servers, one local one distant online on foobar.com.
Using xmpp pidgin console i can send iq stanzas for tests:
Local server hostname is eepc
<iq to='eeepc' from='greg#eeepc' id='get-registred-users-num-1' type='set'>
<command xmlns='http://jabber.org/protocol/commands' action='execute' node='http://jabber.org/protocol/admin#get-registered-users-num'/>
</iq>
<iq from='eeepc' to='greg#eeepc/3493331071251540036345753' id='get-registred-users-num-1' type='result'>
<command xmlns='http://jabber.org/protocol/commands' sessionid='2009-08-29T14:01:55.714639Z' node='http://jabber.org/protocol/admin#get-registered-users-num' status='completed'>
<x xmlns='jabber:x:data'>
<field type='hidden' var='FORM_TYPE'>
<value>http://jabber.org/protocol/admin</value>
</field>
<field type='text-single' label='Number of registered users' var='registeredusersnum'>
<value>7</value>
</field>
</x>
</command>
</iq>
Distant Server
<iq to='foobar.com' from='greg#foobar.com' id='get-registred-users-num-1' type='set'>
<command xmlns='http://jabber.org/protocol/commands' action='execute' node='http://jabber.org/protocol/admin#get-registered-users-num'/>
</iq>
<iq from='foobar.com' to='greg#foobar.com/36523779951251567671615394' id='get-registred-users-num-1' type='error'>
<command xmlns='http://jabber.org/protocol/commands' action='execute' node='http://jabber.org/protocol/admin#get-registered-users-num'/>
<error code='404' type='cancel'>
<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
I don't understand why i get a , i could not see any particular options to tell the server to accept commands from remote ?
Maybe mod_configure is simply not loaded on the distant server.
You can check via lists:member(mod_configure, gen_mod:loaded_modules("foobar.com")). in an ejabberd admin shell.
I cannot imagine that this is about being a remote user, because no s2s connection is needed between foobar.com and greg#foobar.com.
Looking in the mod_configure.erl source code there seems to be an ACL check to make sure the configure adhoc commands are only allowed when the requester is on a user account has configure priv on that virtual host. By default I think they don't.
acl:match_rule(LServer, configure, From)
You may need to add something like...
{access, configure, [{allow, greg#foobar.com}]}.
...to your ejabberd.cfg file.