Project

General

Profile

No reply from MUC when try to configure a Reserved Room

Hamid Alimohammadi
Added about 4 years ago

Hi,

When owner of a room try to change the default setting of a room (to make it Persistent, etc), we follow the XEP-0045 instructions and server responds to the Stanzas properly until the section that Owner Submits Configuration Form [[[http://xmpp.org/extensions/xep-0045.html#example-159]]]

Then the room owner fill out the bellow form accordingly and submit it to the service:

(The name of room is "testroom" and the owner is admin@test.net)

<iq to='testroom@muc.test.net' id='uid-05e6b860-00000009' type='set' from='admin@test.net/*' xmlns='jabber:client'>
    <query xmlns='http://jabber.org/protocol/muc#owner'>
        <x xmlns='jabber:x:data' type='form'>
            <field type='text-single' var='muc#roomconfig_roomname' label='Natural-Language Room Name'>
                <value/>
            </field>
            <field type='text-single' var='muc#roomconfig_roomdesc' label='Short Description of Room'>
                <value/>
            </field>
            <field type='boolean' var='muc#roomconfig_persistentroom' label='Make Room Persistent?'>
                <value>1</value>
            </field>
            <field type='boolean' var='muc#roomconfig_publicroom' label='Make Room Publicly Searchable?'>
                <value>0</value>
            </field>
            <field type='boolean' var='muc#roomconfig_moderatedroom' label='Make Room Moderated?'>
                <value>1</value>
            </field>
            <field type='boolean' var='muc#roomconfig_membersonly' label='Make Room Members Only?'>
                <value>1</value>
            </field>
            <field type='boolean' var='muc#roomconfig_passwordprotectedroom' label='Password Required to Enter?'>
                <value>0</value>
            </field>
            <field type='text-single' var='muc#roomconfig_roomsecret' label='Password'>
                <value/>
            </field>
            <field type='list-single' var='muc#roomconfig_anonymity' label='Room anonymity level:'>
                <option label='Fully-Anonymous Room'>
                    <value>fullanonymous</value>
                </option>
                <option label='Non-Anonymous Room'>
                    <value>nonanonymous</value>
                </option>
                <option label='Semi-Anonymous Room'>
                    <value>semianonymous</value>
                </option>
                <value>semianonymous</value>
            </field>
            <field type='boolean' var='muc#roomconfig_changesubject' label='Allow Occupants to Change Subject?'>
                <value>0</value>
            </field>
            <field type='boolean' var='muc#roomconfig_enablelogging' label='Enable Public Logging?'>
                <value>0</value>
            </field>
            <field type='list-single' var='logging_format' label='Logging format:'>
                <option label='HTML'>
                    <value>html</value>
                </option>
                <option label='Plain text'>
                    <value>plain</value>
                </option>
                <value>html</value>
            </field>
            <field type='text-single' var='muc#maxhistoryfetch' label='Maximum Number of History Messages Returned by Room'>
                <value>50</value>
            </field>
            <field type='list-single' var='tigase#presence_delivery_logic' label='Presence delivery logic'>
                <option label='PREFERE_LAST'>
                    <value>PREFERE_LAST</value>
                </option>
                <option label='PREFERE_PRIORITY'>
                    <value>PREFERE_PRIORITY</value>
                </option>
                <value>PREFERE_PRIORITY</value>
            </field>
            <field type='boolean' var='tigase#presence_filtering' label='Enable filtering of presence (broadcasting presence only between selected groups'>
                <value>0</value>
            </field>
            <field type='list-multi' var='tigase#presence_filtered_affiliations' label='Affiliations for which presence should be delivered'>
                <option label='admin'>
                    <value>admin</value>
                </option>
                <option label='member'>
                    <value>member</value>
                </option>
                <option label='none'>
                    <value>none</value>
                </option>
                <option label='outcast'>
                    <value>outcast</value>
                </option>
                <option label='owner'>
                    <value>owner</value>
                </option>
            </field>
        </x>
    </query>
</iq>

But from this step we don't get any respond from the server and room setting does not change.

Bellow is the init.properties of the server. Am I missing something in init.properties?

(The server version is 7.0.0-SNAPSHOT-b3785)

--comp-class-1 = tigase.muc.MUCComponent
--virt-hosts = test.net
--user-db-uri = jdbc:mysql://localhost/tigasedb?user=tigase&password=tigase12
--user-db = mysql
--admins = admin@test.net
config-type = --gen-config-all
--comp-name-1 = muc
--cluster-mode = false
--debug=server
--sm-plugins = +message-archive-xep-0136,+jabber:iq:auth,+urn:ietf:params:xml:ns:xmpp-sasl,+urn:ietf:params:xml:ns:xmpp-bind,+urn:ietf:params:xml:ns:xmpp-session,+jabber:iq:register,+jabber:iq:roster,+presence,+jabber:iq:privacy,+jabber:iq:version,+http://jabber.org/protocol/stats,+starttls,+msgoffline,+vcard-temp,+http://jabber.org/protocol/commands,+jabber:iq:private,-urn:xmpp:ping,-basic-filter,-domain-filter,-pep,-zlib
--monitoring=jmx:9050,http:9080,snmp:9060

Just to add users can create chat rooms with Psi successfully.

Thank you in advance for help


Replies (6)

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Hamid Alimohammadi wrote:

But from this step we don't get any respond from the server and room setting does not change.

What does the Tigase logs say? You can enable --debug=muc,component,component2 to investigate exact processing of this stanza. In principle it should work and your configuration looks ok.

Added by Hamid Alimohammadi about 4 years ago

Thank you for reply.

I enabled --debug=muc,component,component2 and bellow is the Tigase.log.0 file readouts:

Could you please take a look at logs to see if anything is wrong?


<x type="submit" xmlns="jabber:x:data"/></query></iq>, SIZE=223, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=ADMIN, TYPE=set
2015-02-24 13:47:52.874 [in_0-muc]         ModulesManager.process()           FINER:    Handled by module class tigase.muc.modules.RoomConfigurationModule
2015-02-24 13:47:52.875 [in_0-muc]         Room.getAffiliation()              FINEST:   Getting affiliations for: admin@test.net from set: {admin@test.net=owner}
2015-02-24 13:47:52.875 [in_0-muc]         Room.getAffiliation()              FINEST:   Getting affiliations for: admin@test.net from set: {admin@test.net=owner}
2015-02-24 13:47:52.875 [in_0-muc]         AbstractComponent$3.write()        FINER:    Sent: <iq from="testroom@muc.test.net" id="ab7da" type="result" xmlns="jabber:client" to="admin@test.net/Pars-PC002"/>
2015-02-24 13:47:52.876 [in_0-muc]         RoomConfigurationModule.processSet()  FINE:  Room testroom@muc.test.net is now unlocked
2015-02-24 13:47:52.877 [in_0-muc]         AbstractComponent$3.write()        FINER:    Sent: <message from="testroom@muc.test.net" type="groupchat" xmlns="jabber:client" to="admin@test.net/Pars-PC002"><body>Room is now unlocked</body></message>
2015-02-24 13:47:52.878 [in_0-muc]         PresenceFiltered.onSetAffiliation()  FINEST: Modifying affiliation of: admin@test.net on occupantsPresenceFiltered: [[admin@test.net]]
2015-02-24 13:47:52.878 [in_0-muc]         Room.getAffiliation()              FINEST:   Getting affiliations for: admin@test.net from set: {admin@test.net=owner}
2015-02-24 13:47:52.879 [in_0-muc]         ModulesManager.process()           FINEST:   Finished class tigase.muc.modules.RoomConfigurationModule
2015-02-24 13:48:16.552 [in_0-muc]         Ghostbuster2.update()              FINER:    Update activity of admin@test.net/Pars-PC002
2015-02-24 13:48:16.553 [in_0-muc]         AbstractComponent.processPacket()  FINER:    Received: <iq from="admin@test.net/Pars-PC002" id="uid-05e6b860-00000009" type="set" to="testroom@muc.test.net" xmlns="jabber:client"><query xmlns="http://jabber.org/protocol/muc#owner"><x type="form" xmlns="jabber:x:data"><field type="text-single" label="Natural-Language Room Name" var="muc#roomconfig_roomname"><value/></field><field type="text-single" label="Short Description of Room" var="muc#roomconfig_roomdesc"><value/></field><field type="boolean" label="Make Room Persistent?" var="muc#roomconfig_persistentroom"><value>1</value></field><field type="boolean" label="Make Room Publicly Searchable?" var="muc#roomconfig_publicroom"><value>0</value></field><field type="boolean" label="Make Room Moderated?" var="muc#roomconfig_moderatedroom"><value>1</value></field><field type="boolean" label="Make Room Members Only?" var="muc#roomconfig_membersonly"><value>1</value></field><field type="boolean" label="Password Required to Enter?" var="muc#roomconfig_passwordprotectedroom"><value>0</value></field><field type="text-single" label="Password" var="muc#roomconfig_roomsecret"><value/></field><field type="list-single" label="Room anonymity level:" var="muc#roomconfig_anonymity"><option label="Fully-Anonymous Room"><value>fullanonymous</value></option><option label="Non-Anonymous Room"><value>nonanonymous</value></option><option label="Semi-Anonymous Room"><value>semianonymous</value></option><value>semianonymous</value></field><field type="boolean" label="Allow Occupants to Change Subject?" var="muc#roomconfig_changesubject"><value>0</value></field><field type="boolean" label="Enable Public Logging?" var="muc#roomconfig_enablelogging"><value>0</value></field><field type="list-single" label="Logging format:" var="logging_format"><option label="HTML"><value>html</value></option><option label="Plain text"><value>plain</value></option><value>html</value></field><field type="text-single" label="Maximum Number of History Messages Returned by Room" var="muc#maxhistoryfetch"><value>50</value></field><field type="list-single" label="Presence delivery logic" var="tigase#presence_delivery_logic"><option label="PREFERE_LAST"><value>PREFERE_LAST</value></option><option label="PREFERE_PRIORITY"><value>PREFERE_PRIORITY</value></option><value>PREFERE_PRIORITY</value></field><field type="boolean" label="Enable filtering of presence (broadcasting presence only between selected groups" var="tigase#presence_filtering"><value>0</value></field><field type="list-multi" label="Affiliations for which presence should be delivered" var="tigase#presence_filtered_affiliations"><option label="admin"><value>admin</value></option><option label="member"><value>member</value></option><option label="none"><value>none</value></option><option label="outcast"><value>outcast</value></option><option label="owner"><value>owner</value></option></field></x></query></iq>
2015-02-24 13:48:16.553 [in_0-muc]         ModulesManager.process()           FINEST:   Processing packet: from=sess-man@test.net, to=null, DATA=<iq from="admin@test.net/Pars-PC002" id="uid-05e6b860-00000009" type="set" to="testroom@muc.test.net" xmlns="jabber:client"><query xmlns="http://jabber.org/protocol/muc#owner"><x type="form" xmlns="jabber:x:data"><field type="text-single" label="Natural-Language Room Name" var="muc#roomconfig_roomname"><value/></field><field type="text-single" label="Short Description of Room" var="muc#roomconfig_roomdesc"><value/></field><field type="boolean" label="Make Room Persistent?" var="muc#roomconfig_persistentroom"><value>1</value></field><field type="boolean" label="Make Room Publicly Searchable?" var="muc#roomconfig_publicroom"><value>0</value></field><field type="boolean" label="Make Room Moderated?" var="muc#roomconfig_moderatedroom"><value>1</value></field><field type="boolean" label="Make Room Members Only?" var="muc#roomconfig_membersonly"><value>1</value></field><field type="boolean" label="Password Required to Enter?" var="muc#roomconfig_passwordprotectedroom"><value>0</value></field><field type="te ... , SIZE=2869, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=ADMIN, TYPE=set
2015-02-24 13:48:16.553 [in_0-muc]         ModulesManager.process()           FINER:    Handled by module class tigase.muc.modules.RoomConfigurationModule
2015-02-24 13:48:16.554 [in_0-muc]         Room.getAffiliation()              FINEST:   Getting affiliations for: admin@test.net from set: {admin@test.net=owner}
2015-02-24 13:48:16.554 [in_0-muc]         Room.getAffiliation()              FINEST:   Getting affiliations for: admin@test.net from set: {admin@test.net=owner}
2015-02-24 13:48:16.554 [in_0-muc]         ModulesManager.process()           FINEST:   Finished class tigase.muc.modules.RoomConfigurationModule

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Hamid Alimohammadi wrote:

Thank you for reply.

I enabled --debug=muc,component,component2 and bellow is the Tigase.log.0 file readouts:

Could you please take a look at logs to see if anything is wrong?


[...]

Actually you've cut the logs right in the middle of processing. Or wasn't there anything afterwards?

Added by Hamid Alimohammadi about 4 years ago

Actually there was not there anything afterwards. Today I tried with another version (7.0.0-b3802), the last logfile line is like above log:

ModulesManager.process() FINEST: Finished class tigase.muc.modules.RoomConfigurationModule

And no more message is received. I run the XML with Psi XML console and my colleague with gloox, camaya.

Thanks again for help

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Hamid Alimohammadi wrote:

When owner of a room try to change the default setting of a room (to make it Persistent, etc), we follow the XEP-0045 instructions and server responds to the Stanzas properly until the section that Owner Submits Configuration Form [[[http://xmpp.org/extensions/xep-0045.html#example-159]]]

Then the room owner fill out the bellow form accordingly and submit it to the service:

(The name of room is "testroom" and the owner is admin@test.net)

Actually you've made a mistake in your query - you are sending a dataform of type form (which was received from server) instead of type submit (to, well, submit the form) as the specification requires.

<x xmlns='jabber:x:data' type='form'>

should be changed to

<x xmlns='jabber:x:data' type='submit'>

Added by Hamid Alimohammadi about 4 years ago

Right you are!

Sorry for my mistake that caused you to review the stanza and these long logs.

Thank you for help

    (1-6/6)