Hi Ralph,
I have run into what seems to me a bug in procServ 2.6.0 when running on RHEL6/Centos6. The problem occurs when trying to start another procServ process using the same telnet port
as an existing procServ process.
This is what I observe when running on Fedora 15 (Linux version 2.6.43.8-1) or on Centos7 (Linux version 3.10.0-229)
[det@ppu071 linux-x86_64]$ /usr/local/bin/procServ -L /home/det/test.log 30000 /bin/bash
/usr/local/bin/procServ: spawning daemon process: 41899
[det@ppu071 linux-x86_64]$ /usr/local/bin/procServ -L /home/det/test.log 30000 /bin/bash
Caught an exception creating the initial control telnet port: Address already in use
/usr/local/bin/procServ: Exiting with error code: 98
I think this is the correct behavior. procServ should exit with an error if the telnet port is already in use. This is a protection against accidentally starting the same procServ
process twice.
However, on Centos6/RHEL6 (Linux version 2.6.32-431) I observe the following:
det@dec1248:~> /usr/local/bin/procServ -L /home/det/test.log 30000 /bin/bash
/usr/local/bin/procServ: spawning daemon process: 60423
det@dec1248:~> /usr/local/bin/procServ -L /home/det/test.log 30000 /bin/bash
/usr/local/bin/procServ: spawning daemon process: 60555
det@dec1248:~> /usr/local/bin/procServ -L /home/det/test.log 30000 /bin/bash
/usr/local/bin/procServ: spawning daemon process: 60610
So procServ happily creates multiple procServ processes listening on the same telnet port. These are all running:
det@dec1248:~> ps ax | grep procServ
60423 ? Ss 0:00 /usr/local/bin/procServ -L /home/det/test.log 30000 /bin/bash
60555 ? Ss 0:00 /usr/local/bin/procServ -L /home/det/test.log 30000 /bin/bash
60610 ? Ss 0:00 /usr/local/bin/procServ -L /home/det/test.log 30000 /bin/bash
This seems like a bug to me? It is definitely inconvenient because if someone accidentally types the command to start a particular procServ without realizing that it is already running
it can cause problems.
Is there something I can do to work around this issue?
Thanks,
Mark