hello, I just have installed Suricata v5.0.3 on my ubuntu virtual machine, but whenever i check its status, it always fails to start:
emna@emna-VirtualBox:~$ sudo systemctl status suricata
× suricata.service - Suricata Intrusion Detection Service
Loaded: loaded (/etc/systemd/system/suricata.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2024-03-14 09:17:08 CET; 8s ago
Process: 4334 ExecStartPre=/bin/rm -f /var/run/suricata.pid (code=exited, status=0/SUCCESS)
Process: 4335 ExecStart=/usr/bin/suricata -c /etc/suricata/suricata.yaml --pidfile /var/run/suricata.pid $OPTIONS (code=exited,>
Main PID: 4335 (code=exited, status=1/FAILURE)
CPU: 23ms
مارس 14 09:17:08 emna-VirtualBox suricata[4335]: --simulate-ips : force engine into IPS mode. Useful >
مارس 14 09:17:08 emna-VirtualBox suricata[4335]: --user <user> : run suricata as this user after init
مارس 14 09:17:08 emna-VirtualBox suricata[4335]: --group <group> : run suricata as this group after in>
مارس 14 09:17:08 emna-VirtualBox suricata[4335]: --erf-in <path> : process an ERF file
مارس 14 09:17:08 emna-VirtualBox suricata[4335]: --unix-socket[=<file>] : use unix socket to control suricata>
مارس 14 09:17:08 emna-VirtualBox suricata[4335]: --set name=value : set a configuration value
مارس 14 09:17:08 emna-VirtualBox suricata[4335]: To run the engine with default configuration on interface eth0 with signature file>
مارس 14 09:17:08 emna-VirtualBox suricata[4335]: /usr/bin/suricata -c suricata.yaml -s signatures.rules -i eth0
مارس 14 09:17:08 emna-VirtualBox systemd[1]: suricata.service: Main process exited, code=exited, status=1/FAILURE
مارس 14 09:17:08 emna-VirtualBox systemd[1]: suricata.service: Failed with result 'exit-code'.
Here’s what suricata.log shows:
emna@emna-VirtualBox:~$ sudo tail -f /var/log/suricata/suricata.log
13/3/2024 -- 23:08:45 - <Notice> - This is Suricata version 5.0.3 RELEASE running in SYSTEM mode
13/3/2024 -- 23:08:45 - <Info> - CPUs/cores online: 2
13/3/2024 -- 23:08:45 - <Info> - Found an MTU of 1500 for 'enp0s3'
13/3/2024 -- 23:08:45 - <Info> - Found an MTU of 1500 for 'enp0s3'
13/3/2024 -- 23:08:45 - <Error> - [ERRCODE: SC_ERR_INITIALIZATION(45)] - pid file '/run/suricata.pid' exists but appears stale. Make sure Suricata is not running and then remove /run/suricata.pid. Aborting!
13/3/2024 -- 23:09:52 - <Notice> - This is Suricata version 5.0.3 RELEASE running in SYSTEM mode
13/3/2024 -- 23:09:52 - <Info> - CPUs/cores online: 2
13/3/2024 -- 23:09:52 - <Info> - Found an MTU of 1500 for 'enp0s3'
13/3/2024 -- 23:09:52 - <Info> - Found an MTU of 1500 for 'enp0s3'
13/3/2024 -- 23:09:52 - <Error> - [ERRCODE: SC_ERR_INITIALIZATION(45)] - pid file '/run/suricata.pid' exists but appears stale. Make sure Suricata is not running and then remove /run/suricata.pid. Aborting!
even after stopping suricata, removing /run/suricata.pid and restarting it that issue persists. I also changed the eth0 interface name to enp0s3 in suricata.yaml but I still have the same problem. so could anyone help me please?