rbicelli / pfsense-zabbix-template

Zabbix Template for pfSense
Apache License 2.0
245 stars 108 forks source link

select() failed: [4] Interrupted system call #33

Closed crener closed 4 years ago

crener commented 4 years ago

Hey, Sorry if this isn't an issue with the template (I'm not the best with zabbix yet) but since using this pfsense doesn't connect to the zabbix server. If I look at the log inside /var/zabbix-agent/zabbix-agent.log I can see that there is some sort of issue from the log. I have't changed any network configurations and had it working with a standard template before so I know there is no network setting blocking connections or anything like that.

81929:20200715:001205.264 Starting Zabbix Agent [pfSense]. Zabbix 4.0.17 (revision a528a0a4bc). 81929:20200715:001205.264 Enabled features 81929:20200715:001205.265 IPv6 support: YES 81929:20200715:001205.265 TLS support: YES 81929:20200715:001205.265 ** 81929:20200715:001205.265 using configuration file: /usr/local/etc/zabbix40/zabbix_agentd.conf 81929:20200715:001205.265 agent #0 started [main process] 82054:20200715:001205.265 agent #1 started [collector] 82057:20200715:001205.266 agent #2 started [listener #1] 82069:20200715:001205.266 agent #3 started [listener #2] 82140:20200715:001205.266 agent #4 started [listener #3] 82057:20200715:001355.145 failed to accept an incoming connection: select() failed: [4] Interrupted system call 81929:20200715:001355.145 Got signal [signal:15(SIGTERM),sender_pid:59605,sender_uid:0,reason:65537]. Exiting ... 82069:20200715:001355.145 failed to accept an incoming connection: select() failed: [4] Interrupted system call 82140:20200715:001355.145 failed to accept an incoming connection: select() failed: [4] Interrupted system call

As per instructions my timeout is set to 6 and the user parameters are set. I have openVPN in use so I applied both templates if that makes a difference.

Do you know what is wrong from this or is it me? ... it's probably me being stupid :(

rbicelli commented 4 years ago

Hi, it seems that your pfSense can't communicate with Zabbix Server. Have you filled in both "Server" and "Server Active" fields on Zabbix configuration in pfSense? If yes, are you sure you can reach the zabbix server from pfsense box?

crener commented 4 years ago

So I just removed the Pfsense templates from the pfsense agent in my server and restarted the pfsense box (to force a reconnect cause I'm impatient) and with the "Template OS FreeBSD (Template Module Zabbix agent)" template it connects and works fine, which is a bit puzzling.

I do have openVPN in use and some more googling reveals that the error message might have todo with trying to connect a new client? https://forum.netgate.com/topic/143667/openvpn-client-interupted-code-4/2

I'd assume that the php script couldn't be responsible for this?

crener commented 4 years ago

So switching back and forth between them the default template connects immediately and starts populating values whereas switching to the Pfsense active template immediately makes it loose connection and fail to get any data (or even connect at all).

rbicelli commented 4 years ago

Please post the php script output called from pfsense cli without arguments. Maybe try stopping openvpn services and see if it works.

crener commented 4 years ago

output.txt

This is what the script outputs (Minus IP addresses and ports cause I didn't feel comfortable sharing that)

rbicelli commented 4 years ago

From the script output perspective it seems that everything is normal. Maybe you should try if it works with OpenVPN client turned off. I have a couple installs similar to yours and never faced this kind of problems.