Details
Description
The /etc/init.d/couchbase-server script to manage starting/stopping/status of Couchbase server on CentOS fails on CentOS 6.6:
[root@rgco66 ~]# service couchbase-server start
Starting couchbase-server/usr/bin/dirname: extra operand `2>&1.pid'
Try `/usr/bin/dirname --help' for more information.
[ OK ]
[root@rgco66 ~]# service couchbase-server stop
Stopping couchbase-server/usr/bin/dirname: extra operand `-k.pid'
Try `/usr/bin/dirname --help' for more information.
[ OK ]
Despite these error messages Couchbase is running:
[root@rgco66 ~]# service couchbase-server status
couchbase-server is running
and also initialising the server via the CLI works Ok:
[root@rgco66 ~]# /opt/couchbase/bin/couchbase-cli cluster-init -c 127.0.0.1:8091 -u Administrator -p admin123 --cluster-init-ramsize=256
SUCCESS: init 127.0.0.1
On CentOS 6.5 it does not give these error messages. But a quick look shows that the root cause in the init script was already present (additional parameter (-k and 2>&1) to daemon function), only it now shows up due to a change in /etc/init.d/functions in CentOS 6.6.
Attached is the output of /etc/init.d/couchbase-server start|stop on both 6.5 and 6.6, with tracing via 'set -x'.