processone / ejabberd

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

Stream closed by local host: has been kicked (policy-violation) #4203

Closed logicwonder closed 2 months ago

logicwonder commented 2 months ago

Environment

Bug description

I am intermittently observing the following log line in ejabberd.yml for few users:

2024-04-18 10:40:36.673207+05:30 [info] <0.27487.1212>@ejabberd_c2s:process_terminated/2:291 (tls|<0.27487.1212>) Closing c2s session for xyz@xxxx.yyyy.zzz/client: Stream closed by local host: has been kicked (policy-violation)

I am observing this message multiple times during a certain time period during the day. I tried disabling mod_fail2ban for last 24 hours. But the message still keeps coming.

Does anyone know the reason behind this or how to debug the root cause?

Please help.

prefiks commented 2 months ago

This error would suggest that this was done with kick_user command (or server admin mod_adhoc invocation for kicking, which does use that internally).

logicwonder commented 2 months ago

Thanks @prefiks You were right. I was using the kick_user API. Need to investigate further.