I have a system where the agent has started to intermittently fail, and im not sure where to go from here. Ive tried everything I can think of, and still ending up with the same problem. This agent was working fine, and then about 3 days ago, started having problems.
Server: `zabbix-server-mysql 1:7.0.0~beta1-4+debian12`
Agent: `zabbix-agent2 1:7.0.0~beta2-4+debian12`
Server Side Error: `zabbix_server[902554]: SSL_shutdown() with $AGENT set result code to 1: file ../ssl/ssl_lib.c line 2259 func SSL_shutdown: error:0A000197:SSL routines::shutdown while in init`
Agent Side Error: `zabbix_agent2[2131144]: failed to process an incoming connection from $SERVER: EOF`
I've double checked that the TLS settings on both sides are set correctly, and as mentioned, the problem is intermittent. For example, ill get a bunch of data from this agent, and then about 40 lines of those error messages. The data being received is different each time, meaning that in one run:
- Data for `Network interface discovery: Interface wg0: Outbound packets discarded net.if.out["wg0",dropped]` succeeds
- Data for `Network interface discovery: Interface wg0: Outbound packets with errors net.if.out["wg0",errors]` fails
The next run, it might be flipped, it might not.
Things Ive tried / verified:
- Multiple verifications that this is not network related.
- The system the agent is running on is a proxmox host, and all of the VMs are running fine, etc, including constant data streaming, without problem. Their agents are also not showing any problems. This is the only problem agent.
- Verified that the certs are valid, everything is in order, and the chain can be validated.
- Restarted both agent and server.
- Tried toying with `TLSConnect` and `TLSAccept`, neither made any difference. Current settings are:
- `TLSConnect`: Not set
- `TLSAccept`: `cert`
- Verified that `cert` In Zabbix is selected for this host. Tried toying with these options. No change
- Turned up logging on both sides to `trace`, and nothing was immediately sticking out. Output is below.
AGENT:
```
received passive check request: '{"request":"passive checks","data":[{"key":"net.if.out["wg0",dropped]","timeout":3}]}' from '$SERVER'
[1] processing update request (1 requests)
[1] adding new request for key: 'net.if.out["wg0",dropped]'
[1] created direct exporter task for plugin 'NetIf' itemid:0 key 'net.if.out["wg0",dropped]'
executing direct exporter task for key 'net.if.out["wg0",dropped]'
executed direct exporter task for key 'net.if.out[[wg0 dropped]]'
sending passive check response: '{"version":"7.0.0","data":[{"value":"0"}]}' to '$SERVER'
Calling C function "tls_connected()"
Calling C function "tls_write()"
Calling C function "tls_recv()"
Calling C function "tls_recv()"
Calling C function "tls_close()"
Calling C function "tls_free()"
Calling C function "tls_new_server()"
Calling C function "tls_free()"
Calling C function "tls_ready()"
Calling C function "tls_send()"
Calling C function "tls_connected()"
Calling C function "tls_accept()"
Calling C function "tls_recv()"
Calling C function "tls_send()"
Calling C function "tls_accept()"
Calling C function "tls_recv()"
Calling C function "tls_recv()"
Calling C function "tls_recv()"
failed to process an incoming connection from $SERVER: EOF
Calling C function "tls_new_server()"
Calling C function "tls_free()"
Calling C function "tls_ready()"
Calling C function "tls_send()"
Calling C function "tls_connected()"
Calling C function "tls_accept()"
Calling C function "tls_recv()"
Calling C function "tls_send()"
Calling C function "tls_accept()"
Calling C function "tls_recv()"
Calling C function "tls_recv()"
Calling C function "tls_recv()"
failed to process an incoming connection from $SERVER: EOF
```
SERVER:
```
zbx_tls_connect() peer certificate issuer:"CN=PROTECTED" subject:"CN=PROTECTED"
End of zbx_tls_connect():SUCCEED (established TLSv1.3 TLS_CHACHA20_POLY1305_SHA256)
agent_task_process() step 'send' event:2 itemid:47982
Sending [net.if.in["vmbr1",errors]] itemid:47982
End of async_event():ZBX_ASYNC_TASK_READ
In zbx_ipc_async_socket_recv() timeout:0
End of zbx_ipc_async_socket_recv():0
itemid:41993 hostid:10499 templateid:0
itemid:41994 hostid:10499 templateid:0
itemid:41995 hostid:10499 templateid:0
itemid:41996 hostid:10499 templateid:0
itemid:41997 hostid:10499 templateid:0
itemid:41998 hostid:10499 templateid:0
itemid:41999 hostid:10499 templateid:0
itemid:42000 hostid:10499 templateid:0
itemid:42001 hostid:10499 templateid:0
itemid:42002 hostid:10499 templateid:0
itemid:42003 hostid:10499 templateid:0
itemid:42004 hostid:10499 templateid:0
itemid:42005 hostid:10500 templateid:0
itemid:42006 hostid:10500 templateid:0
itemid:42007 hostid:10500 templateid:0
itemid:42008 hostid:10500 templateid:0
itemid:42009 hostid:10500 templateid:0
itemid:42010 hostid:10500 templateid:0
itemid:42011 hostid:10500 templateid:0
itemid:42012 hostid:10500 templateid:0
itemid:42013 hostid:10500 templateid:0
itemid:42014 hostid:10500 templateid:0
itemid:42015 hostid:10500 templateid:0
itemid:42016 hostid:10500 templateid:0
itemid:42017 hostid:10500 templateid:0
itemid:42018 hostid:10500 templateid:0
itemid:42019 hostid:10500 templateid:0
itemid:42020 hostid:10500 templateid:0
itemid:42021 hostid:10500 templateid:0
itemid:42022 hostid:10500 templateid:0
itemid:42023 hostid:10500 templateid:0
itemid:42024 hostid:10500 templateid:0
itemid:42025 hostid:10500 templateid:0
itemid:42026 hostid:10501 templateid:0
itemid:42027 hostid:10501 templateid:0
itemid:42028 hostid:10501 templateid:0
itemid:42029 hostid:10501 templateid:0
itemid:42030 hostid:10501 templateid:0
SSL_shutdown() with $AGENT set result code to 1: file ../ssl/ssl_lib.c line 2259 func SSL_shutdown: error:0A000197:SSL routines::shutdown while in init
SSL_shutdown() with $AGENT set result code to 1: file ../ssl/ssl_lib.c line 2259 func SSL_shutdown: error:0A000197:SSL routines::shutdown while in init
SSL_shutdown() with $AGENT set result code to 1: file ../ssl/ssl_lib.c line 2259 func SSL_shutdown: error:0A000197:SSL routines::shutdown while in init
SSL_shutdown() with $AGENT set result code to 1: file ../ssl/ssl_lib.c line 2259 func SSL_shutdown: error:0A000197:SSL routines::shutdown while in init
```
Server: `zabbix-server-mysql 1:7.0.0~beta1-4+debian12`
Agent: `zabbix-agent2 1:7.0.0~beta2-4+debian12`
Server Side Error: `zabbix_server[902554]: SSL_shutdown() with $AGENT set result code to 1: file ../ssl/ssl_lib.c line 2259 func SSL_shutdown: error:0A000197:SSL routines::shutdown while in init`
Agent Side Error: `zabbix_agent2[2131144]: failed to process an incoming connection from $SERVER: EOF`
I've double checked that the TLS settings on both sides are set correctly, and as mentioned, the problem is intermittent. For example, ill get a bunch of data from this agent, and then about 40 lines of those error messages. The data being received is different each time, meaning that in one run:
- Data for `Network interface discovery: Interface wg0: Outbound packets discarded net.if.out["wg0",dropped]` succeeds
- Data for `Network interface discovery: Interface wg0: Outbound packets with errors net.if.out["wg0",errors]` fails
The next run, it might be flipped, it might not.
Things Ive tried / verified:
- Multiple verifications that this is not network related.
- The system the agent is running on is a proxmox host, and all of the VMs are running fine, etc, including constant data streaming, without problem. Their agents are also not showing any problems. This is the only problem agent.
- Verified that the certs are valid, everything is in order, and the chain can be validated.
- Restarted both agent and server.
- Tried toying with `TLSConnect` and `TLSAccept`, neither made any difference. Current settings are:
- `TLSConnect`: Not set
- `TLSAccept`: `cert`
- Verified that `cert` In Zabbix is selected for this host. Tried toying with these options. No change
- Turned up logging on both sides to `trace`, and nothing was immediately sticking out. Output is below.
AGENT:
```
received passive check request: '{"request":"passive checks","data":[{"key":"net.if.out["wg0",dropped]","timeout":3}]}' from '$SERVER'
[1] processing update request (1 requests)
[1] adding new request for key: 'net.if.out["wg0",dropped]'
[1] created direct exporter task for plugin 'NetIf' itemid:0 key 'net.if.out["wg0",dropped]'
executing direct exporter task for key 'net.if.out["wg0",dropped]'
executed direct exporter task for key 'net.if.out[[wg0 dropped]]'
sending passive check response: '{"version":"7.0.0","data":[{"value":"0"}]}' to '$SERVER'
Calling C function "tls_connected()"
Calling C function "tls_write()"
Calling C function "tls_recv()"
Calling C function "tls_recv()"
Calling C function "tls_close()"
Calling C function "tls_free()"
Calling C function "tls_new_server()"
Calling C function "tls_free()"
Calling C function "tls_ready()"
Calling C function "tls_send()"
Calling C function "tls_connected()"
Calling C function "tls_accept()"
Calling C function "tls_recv()"
Calling C function "tls_send()"
Calling C function "tls_accept()"
Calling C function "tls_recv()"
Calling C function "tls_recv()"
Calling C function "tls_recv()"
failed to process an incoming connection from $SERVER: EOF
Calling C function "tls_new_server()"
Calling C function "tls_free()"
Calling C function "tls_ready()"
Calling C function "tls_send()"
Calling C function "tls_connected()"
Calling C function "tls_accept()"
Calling C function "tls_recv()"
Calling C function "tls_send()"
Calling C function "tls_accept()"
Calling C function "tls_recv()"
Calling C function "tls_recv()"
Calling C function "tls_recv()"
failed to process an incoming connection from $SERVER: EOF
```
SERVER:
```
zbx_tls_connect() peer certificate issuer:"CN=PROTECTED" subject:"CN=PROTECTED"
End of zbx_tls_connect():SUCCEED (established TLSv1.3 TLS_CHACHA20_POLY1305_SHA256)
agent_task_process() step 'send' event:2 itemid:47982
Sending [net.if.in["vmbr1",errors]] itemid:47982
End of async_event():ZBX_ASYNC_TASK_READ
In zbx_ipc_async_socket_recv() timeout:0
End of zbx_ipc_async_socket_recv():0
itemid:41993 hostid:10499 templateid:0
itemid:41994 hostid:10499 templateid:0
itemid:41995 hostid:10499 templateid:0
itemid:41996 hostid:10499 templateid:0
itemid:41997 hostid:10499 templateid:0
itemid:41998 hostid:10499 templateid:0
itemid:41999 hostid:10499 templateid:0
itemid:42000 hostid:10499 templateid:0
itemid:42001 hostid:10499 templateid:0
itemid:42002 hostid:10499 templateid:0
itemid:42003 hostid:10499 templateid:0
itemid:42004 hostid:10499 templateid:0
itemid:42005 hostid:10500 templateid:0
itemid:42006 hostid:10500 templateid:0
itemid:42007 hostid:10500 templateid:0
itemid:42008 hostid:10500 templateid:0
itemid:42009 hostid:10500 templateid:0
itemid:42010 hostid:10500 templateid:0
itemid:42011 hostid:10500 templateid:0
itemid:42012 hostid:10500 templateid:0
itemid:42013 hostid:10500 templateid:0
itemid:42014 hostid:10500 templateid:0
itemid:42015 hostid:10500 templateid:0
itemid:42016 hostid:10500 templateid:0
itemid:42017 hostid:10500 templateid:0
itemid:42018 hostid:10500 templateid:0
itemid:42019 hostid:10500 templateid:0
itemid:42020 hostid:10500 templateid:0
itemid:42021 hostid:10500 templateid:0
itemid:42022 hostid:10500 templateid:0
itemid:42023 hostid:10500 templateid:0
itemid:42024 hostid:10500 templateid:0
itemid:42025 hostid:10500 templateid:0
itemid:42026 hostid:10501 templateid:0
itemid:42027 hostid:10501 templateid:0
itemid:42028 hostid:10501 templateid:0
itemid:42029 hostid:10501 templateid:0
itemid:42030 hostid:10501 templateid:0
SSL_shutdown() with $AGENT set result code to 1: file ../ssl/ssl_lib.c line 2259 func SSL_shutdown: error:0A000197:SSL routines::shutdown while in init
SSL_shutdown() with $AGENT set result code to 1: file ../ssl/ssl_lib.c line 2259 func SSL_shutdown: error:0A000197:SSL routines::shutdown while in init
SSL_shutdown() with $AGENT set result code to 1: file ../ssl/ssl_lib.c line 2259 func SSL_shutdown: error:0A000197:SSL routines::shutdown while in init
SSL_shutdown() with $AGENT set result code to 1: file ../ssl/ssl_lib.c line 2259 func SSL_shutdown: error:0A000197:SSL routines::shutdown while in init
```
Comment