Description of problem: Cumin init.d script allow to run more than one cumin. Version-Release number of selected component (if applicable): cumin-0.1.4369-1 How reproducible: 100% Steps to Reproduce: 1. run 'service cumin start' # service cumin start Starting cumin: [ OK ] 2. run 'service cumin start' again and wait about 30 seconds # service cumin start Starting cumin: [ OK ] [root@host ~]# Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap self.run() File "/usr/share/cumin/python/wooly/server.py", line 213, in run self.wsgi_server.start() File "/usr/share/cumin/python/wooly/wsgiserver/__init__.py", line 1660, in start raise socket.error(msg) error: (98, 'Address already in use') Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap self.run() File "/usr/share/cumin/python/mint/update.py", line 52, in run update.process(self) File "/usr/share/cumin/python/mint/update.py", line 194, in process except UpdateException, e: NameError: global name 'UpdateException' is not defined Actual results: both cumin are running, error appears # ps -eaf | grep cumin cumin 14445 1 0 07:33 ? 00:00:00 /bin/bash /usr/bin/cumin cumin 14446 14445 2 07:33 ? 00:00:02 /usr/bin/python /usr/bin/cumin-data cumin 14448 14445 2 07:33 ? 00:00:01 /usr/bin/python /usr/bin/cumin-web postgres 14451 13540 0 07:33 ? 00:00:00 postgres: cumin cumin 127.0.0.1(59873) idle in transaction cumin 14583 1 0 07:33 ? 00:00:00 /bin/bash /usr/bin/cumin cumin 14584 14583 3 07:33 ? 00:00:02 /usr/bin/python /usr/bin/cumin-data cumin 14585 14583 2 07:33 ? 00:00:01 /usr/bin/python /usr/bin/cumin-web postgres 14589 13540 0 07:33 ? 00:00:00 postgres: cumin cumin 127.0.0.1(59878) idle cumin 14617 14445 0 07:34 ? 00:00:00 sleep 30 cumin 14618 14583 0 07:34 ? 00:00:00 sleep 30 Expected results: only one instance of cumin service should be allowed to run Additional info:
*** This bug has been marked as a duplicate of bug 673273 ***
Reopening this bug back. It is not the same. This makes sense to be fixed in 1.3.2, the other (673273) does not.
Modified /etc/init.d/cumin (actually cumin/etc/sysvinit-cumin in the source tree) to check for running service and report "OK" if it is already running. Fixed in trunk, revision 4518.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause The /etc/init.d/cumin script does not check to see if the cumin service is already running before starting another instance of the service when the /sbin/service cumin start command is issued. Consequence It is possible to unintentionally run multiple instances of cumin with new instances failing if they try to bind to the same port or succeeding if they use different ports. This will consume extra resources and log files will be interleaved. Fix The /etc/init.d/cumin script checks to see if the cumin service is already running before starting an instance of the service. Result If the service is already running, the script reports success and exits. If it is not, a new instance is started.
# service cumin start Starting cumin: [ OK ] # service cumin start Starting cumin: [ OK ] Is this all right? I wonder, should it fail on next try to start?
Hi Jan, I tried postgresql, condor, and qpidd just to see what other services do. I am not sure there is a standard for this. I think "FAIL" is misleading, silence or OK seems to be the way to go. What is your experience with other services? With the services running, here is what these others do on RHEL5: [root@RHEL5Virt-tmckay ~]# /sbin/service postgresql start Starting postgresql service: [ OK ] [root@RHEL5Virt-tmckay ~]# /sbin/service postgresql start Starting postgresql service: [ OK ] [root@RHEL5Virt-tmckay ~]# /sbin/service condor start Starting Condor daemons: [ OK ] [root@RHEL5Virt-tmckay ~]# /sbin/service condor start # Sorry, I have trace on.... [root@RHEL5Virt-tmckay ~]# /sbin/service qpidd start Starting Qpid AMQP daemon: 2011-04-07 10:06:06 debug Forked daemon child process 2011-04-07 10:06:06 debug Forked daemon child process [ OK ] [root@RHEL5Virt-tmckay ~]# /sbin/service qpidd start Starting Qpid AMQP daemon: [root@RHEL5Virt-tmckay ~]#
Condor returns to prompt, forgot to include it. > > [root@RHEL5Virt-tmckay ~]# /sbin/service condor start > Starting Condor daemons: [ OK ] > [root@RHEL5Virt-tmckay ~]# /sbin/service condor start >
Excuse me, I think you are right, just wanted to make sure. Verified in cumin-0.1.4695-1.el5
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2011-0889.html