Modify

Ticket #281 (closed defect: fixed)

Opened 17 years ago

Last modified 17 years ago

bcfg2-server silently allows multiple instances

Reported by: naapuri Owned by: desai
Priority: trivial Milestone: Bcfg2 0.8.7 Release (LISA)
Component: bcfg2-server Version:
Keywords: init.d socket listen tcp Cc:

Description

bcfg2-server seems to allow multiple instances to be listening on the same port. (I didn't know this was even possible!) This might cause confusion.

How to reproduce (at least on my debian etch with svn build 2531):

  1. Start bcfg2-server: # /etc/init.d/bcfg2-server start
  1. Start bcfg2-server manually: # bcfg2-server &
  1. See netstat output:
# netstat -plunt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 x.x.x.x:6789          0.0.0.0:*               LISTEN     3909/python
tcp        0      0 x.x.x.x:6789          0.0.0.0:*               LISTEN     3906/python
(...)

How to fix: bcfg2-server should detect the situation where someone is already listening on the port and refuse to start.

Attachments

Change History

comment:1 Changed 17 years ago by desai

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to Bcfg2 0.8.7 Release (LISA)

I have fixed this in [820b2a677475e26aa29a23cd9c4eadcaf4ec4730] (SVN r2533). Upon running a second instance of the server, i now get:

[0:20] sudo ./src/sbin/bcfg2-server                                                                                                                                 
Failed to bind to socket

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.