cPHulk errors, and not setting firewall rules
AnsweredI have cPHulk enabled and it does not appear to be setting the firewall rules. Option "Block IP addresses at the firewall level if they trigger a one-day block" is selected, yet when I look in firewalld and iptables, I don't see any rules related to cphulk. Shouldn't there be rules there?
The various cPHulk reports are showing failed logins, blocked IP addresses, and one-day blocks. So, cPHulk appears to be working in general. Using cPanel/WHM 124.0.28 on AlmaLinux 9.5 with the default firewalld (not CSF).
Errors are appearing in /usr/local/cpanel/logs/cphulkd_errors.log
[2025-02-07 17:20:05 -0500] warn [cPhulkd] Failed to connect to socket: /var/run/cphulkd_db.sock: No such file or directory
Use of uninitialized value $result in index at /usr/local/cpanel/Cpanel/Hulk.pm line 142.
[2025-02-07 19:28:58 -0500] info [cPhulkd] The system encountered an error while processing a request: Broken pipe
Use of uninitialized value $result in index at /usr/local/cpanel/Cpanel/Hulk.pm line 142.
Use of uninitialized value $result in index at /usr/local/cpanel/Cpanel/Hulk.pm line 142.
Use of uninitialized value $result in index at /usr/local/cpanel/Cpanel/Hulk.pm line 142.
Use of uninitialized value $result in index at /usr/local/cpanel/Cpanel/Hulk.pm line 142.
panic: fold_constants JMPENV_PUSH returned 2.
[2025-02-12 01:30:26 -0500] warn [cPhulkd] Failed to connect to socket: /var/run/cphulkd_db.sock: Connection refused
[2025-02-12 01:30:26 -0500] warn [cPhulkd] Failed to connect to socket: /var/run/cphulkd_db.sock: Connection refused
[2025-02-12 01:30:26 -0500] warn [cPhulkd] Failed to connect to socket: /var/run/cphulkd_db.sock: Connection refused
[2025-02-12 01:30:26 -0500] warn [cPhulkd] Failed to connect to socket: /var/run/cphulkd_db.sock: Connection refused
[2025-02-12 01:30:26 -0500] warn [cPhulkd] Failed to connect to socket: /var/run/cphulkd_db.sock: Connection refused
[2025-02-12 01:30:26 -0500] warn [cPhulkd] Failed to connect to socket: /var/run/cphulkd_db.sock: Connection refused
[2025-02-12 01:30:26 -0500] warn [cPhulkd] Failed to connect to socket: /var/run/cphulkd_db.sock: Connection refused
[2025-02-12 18:39:52 -0500] warn [cPhulkd] Failed to connect to socket: /var/run/cphulkd_db.sock: Connection refused
[2025-02-12 18:39:52 -0500] info [cPhulkd] Internal Failure (state:preauth login_service:): Failed to connect to dbprocess socket at /usr/local/cpanel/Cpanel/Hulkd/Processor.pm line 1441, <GEN103> line 2.
[2025-02-13 01:56:31 -0500] die [cPhulkd] Timeout while waiting for response
[2025-02-13 01:56:31 -0500] info [cPhulkd] The system encountered an error while processing a request: exit level [die] [pid=389038] (Timeout while waiting for response)
[2025-02-14 19:41:43 -0500] die [cPhulkd] Timeout while waiting for response
[2025-02-14 19:41:43 -0500] info [cPhulkd] The system encountered an error while processing a request: exit level [die] [pid=521782] (Timeout while waiting for response)
[2025-02-14 20:33:48 -0500] warn [cPhulkd] Timed out (2 seconds) while reading from socket.
[2025-02-14 20:33:48 -0500] info [cPhulkd] Internal Failure (state:preauth login_service:): Failed to execute db read command: 0 at /usr/local/cpanel/Cpanel/Hulkd/Processor.pm line 1444, <GEN2> line 2.
[2025-02-14 20:33:50 -0500] warn [cPhulkd] Timed out (2 seconds) while reading from socket.
Use of uninitialized value $result in index at /usr/local/cpanel/Cpanel/Hulk.pm line 142, <GEN3> line 2.
[2025-02-14 20:33:50 -0500] warn [cPhulkd] Timed out (2 seconds) while reading from socket.
Use of uninitialized value $result in index at /usr/local/cpanel/Cpanel/Hulk.pm line 142, <GEN4> line 2.
[2025-02-14 20:33:50 -0500] info [cPhulkd] The system encountered an error while processing a request:
[2025-02-14 20:33:50 -0500] info [cPhulkd] The system encountered an error while processing a request:
Thanks.
-
From what is recommended in the cPanel article "How to Configure Your Firewall for cPanel & WHM Services", I plan on removing firewalld, and installing nftables and CSF.
0 -
The error messages stopped after I restarted the cphulkd service. Not sure why that was needed.
sudo systemctl restart cphulkd
0 -
I'm glad you found a solution and that things are working well now after the firewall adjustment!
0
Please sign in to leave a comment.
Comments
3 comments