Couchbase Server 4.63 upgrade to 5.0.1 - server won't start

I have a single node couchbase server running 4.6.3, I shut it down and created/deployed a new docker image (using couchbase:community-5.0.1 ) and now the server won’t start. It’s running in a docker container and the output at start up is:

Attaching to acmaster_couchbase-server_1
couchbase-server_1  | Waiting 20 seconds for Couchbase service to start
couchbase-server_1  | Starting Couchbase Server -- Web UI available at http://<ip>:8091 and logs available in /opt/couchbase/var/lib/couchbase/logs
couchbase-server_1  | ERROR: Unable to connect to host at http://localhost:8091
couchbase-server_1  | Couchbase server is ready
couchbase-server_1  | /entrypoint.sh couchbase-server

This is my first upgrade of Couchbase - I could’t find any release specific upgrade instructions on the website; the server automatically upgrades itself at start up?

Here is the cbcollect_info data: https://www.dropbox.com/s/q1odznji8mjv74m/output.zip?dl=0

Any assistance is greatly appreciated.

Hi @saschwarz,

I’m assuming you followed the steps Running Couchbase Server using Docker to run your Couchbase Server container.

To upgrade follow these steps -

  • Backup your cluster using cbbackupmgr backup in Enterprise or cbbackup in Community Edition
  • Delete the Couchbase Server 4.6.3 container not just stop since its mapped to ports (8091-8094:8091-8094 -p 11210-11211:11210-11211)
  • Run the couchbase:community-5.0.1 container image by following the steps in Running Couchbase Server using Docker
  • Restore data from backup using cbbackupmgr restore in Enterprise or cbrestore

Let us know if that fixes your issue.

Thanks!

Anil Kumar

1 Like

Hi @anil
Thanks for your help. My setup is based on FakeIt Series: Rapid Mobile Development with Sync-Gateway which worked perfectly for 4.6.3

I followed your instructions but when I start the new container and my entry script runs to configure the cluster it can’t connect to the couchbase server on it’s local host port. Here’s my script that worked with the previous version

set -m

/entrypoint.sh couchbase-server &

/opt/couchbase/bin/couchbase-server -v
echo 'Waiting 30 seconds for Couchbase service to start'
sleep 30

source /run/secrets/couchbase

# configure the cluster
echo 'Configuring Cluster'
/opt/couchbase/bin/couchbase-cli cluster-init -c localhost:8091 \
    --cluster-username=$USERNAME \
    --cluster-password=$PASSWORD \
    --cluster-port=8091 \
    --cluster-ramsize=512 \
    --service=data

I get these logs:

couchbase-server_1  | Couchbase Server 5.0.1-5003 (CE)
couchbase-server_1  | Waiting 30 seconds for Couchbase service to start
couchbase-server_1  | Configuring Cluster
couchbase-server_1  | ERROR: Unable to connect to host at http://localhost:8091

When I exec into the container and run ps- ef:

# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 14:51 ?        00:00:00 /bin/bash /entrypoint.sh /opt/co
root         7     1  0 14:51 ?        00:00:00 runsvdir -P /etc/service log: ..
root        10     7  0 14:51 ?        00:00:00 runsv couchbase-server
couchba+    13    10  0 14:51 ?        00:00:04 /opt/couchbase/lib/erlang/erts-5
couchba+    30     1  0 14:51 ?        00:00:00 /opt/couchbase/lib/erlang/erts-5

So it looks like the server is running. Should there be other processes?

Running netstat -a doesn’t show any listeners on 8091.

I’m not sure where to look next. Using 4.6.3 everything “just worked”.

Thanks

I reverted to 4.63 and your process works fine. And to answer my own question there are a lot more processes running. So 5.0.1-5003 (CE) apparently isn’t starting up correctly. I’ll try the non-CE image.

OK I figured out what was going on. Even though I was creating a new container based on 5.0.1 CE it was re-using the /opt/couchbase/var Docker Volume which had 4.63 config/data persisted in it. So once I saved my backup I deleted the volume, created the new image, started the container and then everything started correctly.