Event Guard

Status
Not open for further replies.

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
Is anyone using FusionPBX 5 with this enabled?

I am seeing it consume 100% CPU and it looks like it should be blocking in IP tables but IP tables is clean, the two chains it creates appear to have no entries blocking.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
A simple restart of the service has brought it down to almost nothing.

I still need to do some testing and fine out why there are no ip tables entries though.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
Same issue here.
How can I disable event guard?

that would be something along the lines of:

Code:
systemctl stop event_guard
systemctl disable event_guard

I have to say though, I need to read the code more to see what it is doing but after doing a:

Code:
systemctl restart event_guard

The CPU usage dropped to almost nothing, IP tables is getting populated and it seems to be doing a good job.
 
  • Like
Reactions: Mikeme

hfoster

Active Member
Jan 28, 2019
684
81
28
34
Wouldn't be surprised if some garbage text caused it to loop. All sorts of nonsense in INVITES and REGISTERS designed to crash or break SBCs and PBXs.

Also, is it just me or is nobody else able to unblock an address? - It's just me... the permission was renamed to 'unblock'
 
Last edited:
  • Like
Reactions: Mikeme

kish.https

New Member
Sep 4, 2022
5
0
1
44
systemctl stop event_guard
Failed to stop event_guard.service: Access denied
See system logs and 'systemctl status event_guard.service' for details.
 

markjcrane

Active Member
Staff member
Jul 22, 2018
503
177
43
49
Restarting a service can be done using sudo or escalate authority to root. The high CPU load restart service should fix it. There was a bug discovered and latest version hopefully fixed. It would occur if event socket was started when freeswitch event socket is not running.
 
  • Like
Reactions: datafanatics

kish.https

New Member
Sep 4, 2022
5
0
1
44
Restarting a service can be done using sudo or escalate authority to root. The high CPU load restart service should fix it. There was a bug discovered and latest version hopefully fixed. It would occur if event socket was started when freeswitch event socket is not running.
I did reboot the server an restore to the date which everything were normal but still same issue, i tried sudo reboot too but no luck
 
Last edited:

dbbrito

Member
Oct 27, 2021
44
1
8
45
It worked with systemctl restart event_guard , but when will the fix be made so that we no longer have to type this command every time we restart?
Thanks
 

hfoster

Active Member
Jan 28, 2019
684
81
28
34
You can always just edit: /etc/systemd/system/event_guard.service and put freeswitch.service in the After part:

After=network.target network-online.target local-fs.target postgresql.service freeswitch.service

This means the service won't start until freeswitch has.
 

markjcrane

Active Member
Staff member
Jul 22, 2018
503
177
43
49
This event guard high CPU issue should be fixed. It is working fine for me now in all tests.

Tested the following scenarios.
1. FreeSWITCH stopped and event_guard service started (failed) - Result High CPU load (Fixed 20 Oct 2022)
2. event_guard service started when FreeSWITCH was running then FreeSWITCH restarted (Fixed on 4th Oct 2022)

The PHP event_socket class has a recently added connected method it wasn't working in Scenario 1. Following Changes to the event_socket connected method appears to solves the problem.
- https://github.com/fusionpbx/fusionpbx/commit/88b43cfa143e045b03719bed96f4e4b822ee0e96

Please update the source code and restart the event_guard service to apply the fixed source code.
 
Last edited:
  • Like
Reactions: mcs3ss2
Status
Not open for further replies.