I successfully created a muc service and create a room. After i create the room "testroom@conference.xmpp.messenger.local" i enter the room with my client "client@xmpp.messenger.local". (My client is also the owner of the muc room) in this case it works and i am able to send any messages to the muc room.
My problem came up if i reload the page and reconnect to my ejabberd server. After reconnect i read all rooms of a client and try to join the room with the following presence stanza (described in XEP-0045 // 16.7.1):
<presence to='testroom@conference.xmpp.messenger.local'>
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>
Now i get the error code 409 which contains the following error message: "That nickname is registered by another person"
i can't understand why it says i registered this nickname by another person -> it is the same person
btw i also tried to re-enter with:
<presence
from='client@xmpp.messenger.local'
id='n13mt3l'
to='testroom@conference.xmpp.messenger.local'>
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>
At least i tried to enter the room with different nicknames, but this causes an instant disconnect without any error message.
I hope anyone else can figure out the problem and could help me to find a solution.