Project

General

Profile

Bug #311

Prelude-manager refuses to handle incoming connections

Added by over 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
Due date:
% Done:

0%

Resolution:
fixed

Description

prelude-manager: ERROR: accept error: Too many open files. (server-generic.c:415 accept_connection)

prelude-manager: ERROR: couldn't accept connection. (server-generic.c:444 handle_connection)

These errors are in log. Total established connections to tcp/4690 (via netstat) - 193. The problem has came after upgrading libprelude from 0.9.17.2 to the 0.9.19. Prelude-manager was 0.9.12.1 but upgrading to 0.9.14.2 doesn't solve the problem. Before upgrading there were no such errors.

During next minutes since errors about connections have been observed prelude-manager crashed:

kernel: prelude-managerr8567: segfault at bf7e4ffc eip 412bef04 esp bf7e5000 error 6

Associated revisions

Revision 37f28df5 (diff)
Added by Yoann VANDOORSELAERE over 12 years ago

Bind stdin, stdout, and stderr to '/dev/null'. Correctly fixes #311.

git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11002 09c5ec92-17d4-0310-903a-819935f44dba

History

#1 Updated by over 12 years ago

I was able to reproduce the problem described in this #

1. Start prelude-manager as usual (prelude-manager -d)
2. Send SIGHUP to prelude-manager process (killall -1 prelude-manager)
3. Although prelude-manager seems to restarts itself, it doesn't listen on specified ports anymore. Can be stopped only with killall -9 prelude-manager
4. In /var/log/messages:

Sep 12 16:24:59 hids1 prelude-manager: WARNING: signal 1 received, will restart prelude-manager.

Sep 12 16:24:59 hids1 prelude-manager: INFO: Waiting queued message to be processed.

Sep 12 16:24:59 hids1 prelude-manager: INFO: Restarting Prelude Manager (prelude-manager).

Sep 12 16:24:59 hids1 prelude-manager: INFO: server started (listening on 127.0.0.1 port 4690).

Sep 12 16:24:59 hids1 prelude-manager: INFO: server started (listening on 10.3.80.1 port 4690).

Sep 12 16:24:59 hids1 prelude-manager: INFO: Subscribing db[default] to active reporting plugins.

Sep 12 16:24:59 hids1 prelude-manager: INFO: Subscribing Debug[default] to active reporting plugins.

Sep 12 16:24:59 hids1 prelude-manager: INFO: Subscribing [[TextMod]][default] to active reporting plugins.

Sep 12 16:24:59 hids1 prelude-manager: INFO: Subscribing IDMEF-Criteria to filtering plugin with plugin hook db[default].

Sep 12 16:25:59 hids1 prelude-manager: ERROR: accept error: Socket operation on non-socket. (server-generic.c:415 accept_conne

ction)

Sep 12 16:25:59 hids1 prelude-manager: ERROR: couldn't accept connection. (server-generic.c:444 handle_connection)

Sep 12 16:25:59 hids1 prelude-manager: ERROR: accept error: Socket operation on non-socket. (server-generic.c:415 accept_conne

ction)

Sep 12 16:25:59 hids1 prelude-manager: ERROR: couldn't accept connection. (server-generic.c:444 handle_connection)

#2 Updated by Yoann VANDOORSELAERE over 12 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

(In r10998) Only close stdin/stdout/stderr if they are connected to a terminal. This
prevent closing invalid descriptor. (fix #311).

#3 Updated by Yoann VANDOORSELAERE over 12 years ago

(In r11002) Bind stdin, stdout, and stderr to '/dev/null'. Correctly fixes #311.

#4 Updated by Yoann VANDOORSELAERE almost 12 years ago

  • Project changed from PRELUDE SIEM to Libprelude
  • Category deleted (1)
  • Target version deleted (0.9.21)

Also available in: Atom PDF