Project

General

Profile

Problems creating new rooms with tigase-muc-2.2.2-SNAPSHOT

kodjo baah
Added almost 5 years ago

Hi,

I cloned tigase-server 5.3.0-SNAPSHOT-b3491 and replaced the tigase-muc jar with tigase-muc-2.2.2-SNAPSHOT.jar.

I am logged in as an admin user(admin/my) and have successfully been authenticated.

When I send the following presence to the server nothing is returned:

<presence id="KiwjP-4" to="room220@muc.testme.my/JustMe"><priority>0</priority><x xmlns="http://jabber.org/protocol/muc"></x></presence>

The below is the entry in tig_pairs for vhost-list

I created the vhost using the add hoc command comp-repo-item-add

<vhost anon="true" hostname="localhost" domain-filter="ALL" s2s-secret="38bb6937-d38f-48c2-bfde-717af2d03ed1" enabled="true" register="true" tls-required="false" max-users="0"><comps/><other/></vhost>

<vhost anon="true" hostname="muc.testme.my" domain-filter="ALL" s2s-secret="ee54379d-354a-465d-8015-1c04cb13a579" enabled="true" register="true" owner="admin@my" tls-required="false" max-users="0"><comps/><other/></vhost>

<vhost anon="true" hostname="muc.testme.my.xe" domain-filter="ALL" s2s-secret="82ac73a3-1c0c-4bd9-b2cb-5c3243d92190" enabled="true" register="true" owner="admin@my" tls-required="false" max-users="0"><comps/><other/></vhost>

<vhost anon="true" hostname="my" domain-filter="ALL" s2s-secret="36c9953d-965e-40f8-b749-ba19ebed82b5" enabled="true" register="true" tls-required="false" max-users="0"><comps/><other/></vhost> |

Below are the different ways I have tried to created the room.

    import org.jivesoftware.smack.packet.Presence
        val  presence = new Presence(Presence.Type.available)
        presence.setPriority(0)
    presence.setTo("room220@muc.testme.my.xe/JustMe")

    import org.jivesoftware.smackx.packet.MUCInitialPresence
    val init = new MUCInitialPresence()
    presence.addExtension(init)
        conn.sendPacket(presence)

I also tried different variants of the to: ie. room220@muc.testme.my/JustMe

I also tried this approach using different variants of the node argument.

      // Create a MultiUserChat using a Connection for a room
      import org.jivesoftware.smackx.muc.MultiUserChat
      val muc: MultiUserChat = new MultiUserChat(conn, "room223@muc.testme.my")

      // Create the room
      muc.create("JustMe")

      // Send an empty room configuration form which indicates that we want
      // an instant room
      import org.jivesoftware.smackx.Form
      muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));


Replies (2)

Added by kodjo baah almost 5 years ago

After performing a clean install:

The snippet of code below was executed and nothing was returned.

 val conn: XMPPConnection = new XMPPConnection(config)
      import org.jivesoftware.smack.XMPPException
      try { 
          conn.connect()  
         System.out.println("---ABLE TO CONNECT:"+conn.isConnected())
          conn.login("admin", "tigase")
     System.out.println("success:"+conn.isAuthenticated())
        System.out.println("---ABLE TO LOGIN")

      // Create a MultiUserChat using a Connection for a room
      import org.jivesoftware.smackx.muc.MultiUserChat
      import scala.collection.JavaConversions._
      val hostedRooms = MultiUserChat.getHostedRooms(conn, "muc.my")


      for(hostedRoom <- hostedRooms) {
         System.out.println("hosted room jid["+hostedRoom.getJid()+"] room name["+hostedRoom.getName()+"]")
      }

Then a new vhost was added using comp-repo-item-add command.

Then the same snippet of code was run with this change

 val hostedRooms = MultiUserChat.getHostedRooms(conn, "muc.testme.my")

The following was returned

hosted room jid[ssend@muc.testme.my] room name[Undefined description]
hosted room jid[cl-comp@muc.testme.my] room name[Cluster connection manager]
hosted room jid[c2s@muc.testme.my] room name[Client connection manager clustered]
hosted room jid[basic-conf@muc.testme.my] room name[Configuration management]
hosted room jid[s2s@muc.testme.my] room name[S2S connection manager clustered]
hosted room jid[cluster-contr@muc.testme.my] room name[Cluster controller]
hosted room jid[rest@muc.testme.my] room name[Undefined description]
hosted room jid[bosh@muc.testme.my] room name[Bosh connection manager clustered]
hosted room jid[vhost-man@muc.testme.my] room name[VHost Manager]
hosted room jid[sess-man@muc.testme.my] room name[Session manager clustered, basic strategy]
hosted room jid[ws2s@muc.testme.my] room name[Websocket connection manager clustered]
hosted room jid[stats@muc.testme.my] room name[Server statistics]
hosted room jid[message-archive@muc.testme.my] room name[Message Archiving (XEP-0136) Support]
hosted room jid[srecv.muc.testme.my] room name[Stanza Receiver]
hosted room jid[monitor@muc.testme.my] room name[Monitor]
hosted room jid[muc.muc.testme.my] room name[Multi User Chat]

As you can see when you create new host certain items are automatically created...creating the vhost without the muc prefix seems to have fixed everything.

Added by Wojciech Kapcia TigaseTeam almost 5 years ago

kodjo baah wrote:

creating the vhost without the muc prefix seems to have fixed everything.

Just for clarification - VHost is the global host/domain that you want to serve and you SHOULD NOT add as VHost items that would duplicate enabled components as it will break packet routing and therefore cause issues with delivering packets. All needed names for components (muc.my.domain.tld, pubsub.my.domain.tld, component-x.my.domain.tld) are automatically generated based on the component name (muc, pubsub, any item from init.properties starting with @--comp-name-x=…@) concatenated with configured VHosts (eg." @my.domain.tld@).

    (1-2/2)