processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6.07k stars 1.51k forks source link

user gets kicked, no idea why #355

Closed frederikbosch closed 9 years ago

frederikbosch commented 9 years ago

We made a chat room for error logging. When some error occurs on one of our services, this printed in this room. Sometimes the error logging is kicked from the room. I cannot resolve why this happends.

Error Logger left the room (This participant is kicked from the room because he sent an error message to another participant: service-unavailable).

I tried to look this up in the code, and I have found line 1296 in https://github.com/processone/ejabberd/blob/master/src/mod_muc_room.erl, but that does not help me what to do to fix this. The logs also do not help me. It could be the message, but when I send the same message with my own user, I am not kicked. It has to do with connection, or something like that. The error logging user disconnects immediately after he has sent the mesage.

We are running Debian Wheezy, ejabberd (2.1.10-4+deb7u1) . Anyone any idea?

mremond commented 9 years ago

Is this user from a remote server ? The error means that when trying to send a message to the user resource, it was not online. Thus, the MUC module is doing the right thing and need to clean the participant list for consistency.

frederikbosch commented 9 years ago

Its a logger bot, who connects, puts a message in a room and disconnects. But 50% of the times, the bot is kicked before he is done sending his message. Is there a setting to prevent this?

mremond commented 9 years ago

No, there is no setting for that, but I guess this is an issue with bots as we do not see that with the bot we used. The best approach however is more likely to have a module or command that accept the bot messages without requiring the bot to be in the room.

mremond commented 9 years ago

Is the XMPP bot code public ?

frederikbosch commented 9 years ago

Actually, it is an implementation on public code. See the following gist. It requires Monolog and a php implementation of xmpp.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.