Hi there,
I have a wazuh server with 8 agents, one of them is a pfSense FreeBSD 14.0 + Snort + custom decoders and rules.
Lately I've been having problems where the agent is still active but it doesn't send my IDS logs anymore, it only sends them again when I restart the agent.
Searching through the agent logs I found that these logs may point to the problem, but I couldn't find any solution online:
$ cat /var/ossec/logs/ossec.log
2024/06/13 08:27:45 wazuh-logcollector: ERROR: socketerr (not available).
2024/06/13 08:27:45 wazuh-logcollector: ERROR: Unable to send message to 'queue/sockets/queue' after a successfull reconnection...
2024/06/13 08:27:45 wazuh-logcollector: ERROR: socketerr (not available).
2024/06/13 08:27:45 wazuh-logcollector: ERROR: Unable to send message to 'queue/sockets/queue' (wazuh-agentd might be down). Attempting to reconnect.
2024/06/13 08:27:45 wazuh-logcollector: INFO: Successfully reconnected to 'queue/sockets/queue'
Yesterday Wazuh stopped receiving pfSense logs at 17:11:

-----
Note that even with these various error messages, the logs were being sent without problems, but when the error stops, so do the logs.
I don't think it's something to do with the number of alerts per second, since when I first installed the agent, snort flooded the server with lots of alerts and it worked without any problems, now I'm filtering the false positives directly through snort, so it doesn't generate unnecessary logs for wazuh to process and the problem started to appear.
-----------------------------------------
Here are some command outputs and ossec.conf (attached) to see if anyone can help me:
$ tail /var/ossec/logs/ossec.log
2024/06/13 08:45:45 wazuh-logcollector: ERROR: Unable to send message to 'queue/sockets/queue' (wazuh-agentd might be down). Attempting to reconnect.
2024/06/13 08:45:45 wazuh-logcollector: INFO: Successfully reconnected to 'queue/sockets/queue'
2024/06/13 08:51:45 wazuh-logcollector: ERROR: socketerr (not available).
2024/06/13 08:51:45 wazuh-logcollector: ERROR: Unable to send message to 'queue/sockets/queue' (wazuh-agentd might be down). Attempting to reconnect.
2024/06/13 08:51:45 wazuh-logcollector: INFO: Successfully reconnected to 'queue/sockets/queue'
2024/06/13 08:51:45 wazuh-logcollector: ERROR: socketerr (not available).
2024/06/13 08:51:45 wazuh-logcollector: ERROR: Unable to send message to 'queue/sockets/queue' after a successfull reconnection...
2024/06/13 08:51:45 wazuh-logcollector: ERROR: socketerr (not available).
2024/06/13 08:51:45 wazuh-logcollector: ERROR: Unable to send message to 'queue/sockets/queue' (wazuh-agentd might be down). Attempting to reconnect.
2024/06/13 08:51:45 wazuh-logcollector: INFO: Successfully reconnected to 'queue/sockets/queue'
$ /var/ossec/bin/wazuh-control status
wazuh-modulesd is running...
wazuh-logcollector is running...
wazuh-syscheckd is running...
wazuh-agentd is running...
wazuh-execd is running...
$ ps aux | grep wazuh
root 2771 0.0 0.0 20464 7688 - S 07:57 0:00.05 /var/ossec/bin/wazuh-execd
wazuh 10590 0.0 0.0 38460 10468 - S 07:57 0:00.59 /var/ossec/bin/wazuh-agentd
root 19934 0.0 0.0 35504 12688 - SN 07:57 0:01.91 /var/ossec/bin/wazuh-syscheckd
root 21529 0.0 0.0 53384 10860 - S 07:57 0:00.39 /var/ossec/bin/wazuh-logcollector
root 29530 0.0 0.0 151808 22556 - I 07:57 0:00.43 /var/ossec/bin/wazuh-modulesd
root 48619 0.0 0.0 12752 2360 0 S+ 08:52 0:00.00 grep wazuh
$ ls -lrt /var/ossec/queue/sockets/queue
srw-rw---- 1 wazuh wazuh 0 Jun 13 07:57 /var/ossec/queue/sockets/queue