question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to connect to socket and send command /tmp/suricata-command.socket: [Errno 2] No such file or directory

See original GitHub issue

Summary:

After running cape2.sh and trying both the base and suricata argument, the suricata processing module is still unable to find the socket file:

2020-09-22 17:54:34,334 [modules.processing.suricata] WARNING: Failed to connect to socket and send command /tmp/suricata-command.socket: [Errno 2] No such file or directory

Digging into /var/log/suricata/suricata.log I discovered:

<Error> - [ERRCODE: SC_ERR_UID_FAILED(155)] - unable to get the user ID, check if user exist!!

Question Answer
OS version Ubuntu 20.04
CAPEv2 Version Latest
Suricata Service SystemD

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
doomedravencommented, Sep 23, 2020

thanks, my solution is simplier 😉

0reactions
r1n9w0rmcommented, Sep 23, 2020

should be fixed now, thanks

Noice. As far as that one liner goes for ensuring the crontab doesn’t exist, this works for me:

crontab -l 2>/dev/null | grep 'suricata-update' &>/dev/null || (crontab -l 2>/dev/null; echo "15 * * * * /usr/bin/suricata-update --suricata /usr/bin/suricata --suricata-conf /etc/suricata/suricata.yaml -o /etc/suricata/rules/ && /usr/bin/suricatasc -c reload-rules /tmp/suricata-command.socket &>/dev/null") | crontab -

Read more comments on GitHub >

github_iconTop Results From Across the Web

Suricatasc can not find /var/run/suricata-command.socket: - Help
Unable to connect to socket /var/run/suricata-command.socket: [Errno 2] No such file or directory. Am I missing something here ? Regards.
Read more >
Bug #1973: suricata fails to start because of unix socket
suricata fails to start because of unix socket ... Unix socket: UNIX socket bind(/var/run/suricata/suricata-command.socket) error: No such file or directory ...
Read more >
20. Interacting via Unix Socket — Suricata 6.0.0 documentation
An example script called suricatasc is provided in the source and installed automatically when installing/updating Suricata. The unix socket is always enabled ...
Read more >
Permission denied opening suricata-command.socket
Description of problem: Unix socket: UNIX socket bind(/var/run/suricata/suricata-command.socket) error: Permission denied Unable to create unix command ...
Read more >
#839146 - Suricata init with unix-command socket broken
... /usr/bin/suricatasc -c reload-rules Unable to connect to socket /var/run//suricata-command.socket: [Errno 2] No such file or directory ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found