I am crating room using android application using smack library.
Following are the code for create group chat(room) using muc:
MultiUserChatManager manager = MultiUserChatManager.getInstanceFor(connection);
muc = manager.getMultiUserChat("[email protected]");
muc.create("myroom");
muc.sendConfigurationForm(new Form(DataForm.Type.submit));
Following are the log when perform above commands for create group in MUC:
<presence to='[email protected]/myroom' id='wvAb9-11'><x xmlns='http://jabber.org/protocol/muc'></x><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.igniterealtime.org/projects/smack' ver='NfJ3flI83zSdUDzCEICtbypursw='/></presence>
<presence type="error" xmlns="jabber:client" id="wvAb9-11" from="[email protected]/myroom" to="dk@yama/Smack"><x xmlns="http://jabber.org/protocol/muc"/><c xmlns="http://jabber.org/protocol/caps" node="http://www.igniterealtime.org/projects/smack" hash="sha-1" ver="NfJ3flI83zSdUDzCEICtbypursw="/><error type="cancel" code="404"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xml:lang="en" xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">S2S - destination host not found</text></error></presence>
org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError: remote-server-not-found - cancel
at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:232)
at org.jivesoftware.smackx.muc.MultiUserChat.enter(MultiUserChat.java:311)
at org.jivesoftware.smackx.muc.MultiUserChat.createOrJoin(MultiUserChat.java:400)
at org.jivesoftware.smackx.muc.MultiUserChat.createOrJoin(MultiUserChat.java:376)
<presence to='[email protected]/myroom' id='wvAb9-11'><x xmlns='http://jabber.org/protocol/muc'></x><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.igniterealtime.org/projects/smack' ver='NfJ3flI83zSdUDzCEICtbypursw='/></presence>
<presence type="error" xmlns="jabber:client" id="wvAb9-11" from="[email protected]/myroom" to="dk@yama/Smack"><x xmlns="http://jabber.org/protocol/muc"/><c xmlns="http://jabber.org/protocol/caps" node="http://www.igniterealtime.org/projects/smack" hash="sha-1" ver="NfJ3flI83zSdUDzCEICtbypursw="/><error type="cancel" code="404"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xml:lang="en" xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">S2S - destination host not found</text></error></presence>
org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError: remote-server-not-found - cancel
at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:232)
at org.jivesoftware.smackx.muc.MultiUserChat.enter(MultiUserChat.java:311)
at org.jivesoftware.smackx.muc.MultiUserChat.createOrJoin(MultiUserChat.java:400)
at org.jivesoftware.smackx.muc.MultiUserChat.createOrJoin(MultiUserChat.java:376)
at org.jivesoftware.smackx.muc.MultiUserChat.create(MultiUserChat.java:354)
at com.example.sufalam.tigasechatdemo.UserListActivity$3.onClick(UserListActivity.java:72)
at android.view.View.performClick(View.java:4780)
at android.view.View$PerformClick.run(View.java:19866)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)at org.jivesoftware.smackx.muc.MultiUserChat.create(MultiUserChat.java:354)
at com.example.sufalam.tigasechatdemo.UserListActivity$3.onClick(UserListActivity.java:72)
at android.view.View.performClick(View.java:4780)
at android.view.View$PerformClick.run(View.java:19866)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
You're trying to create the room
myroom
at the conference serverconference.192.168.1.4
, but in return you get aremote-server-not-found
error.The server name
conference.192.168.1.4
looks odd, as it is a mix of a hostname and an IP address. You need to figure out what the conference server is actually called, either by checking its configuration, or (if the conference server is running as a component of the server you're connecting to) by performing an "items" service discovery request.I'm not familiar with Tigase, but it appears that its MUC service comes in a separate component. You may want to check that it's been installed and started properly.