[MB-7298] ubuntu 64-bit 12.04 upgrading couchbase server from 1.8.1 to 2.0 works but prints out error in the end when starting the server ( * Failed to start couchbase-server dpkg: error processing couchbase-server (--install) ) Created: 30/Nov/12  Updated: 31/Jan/14  Resolved: 26/Dec/12

Status: Closed
Project: Couchbase Server
Component/s: installer
Affects Version/s: 2.0
Fix Version/s: 2.0.1
Security Level: Public

Type: Bug Priority: Major
Reporter: Farshid Ghods (Inactive) Assignee: Pavel Paulau
Resolution: Fixed Votes: 0
Labels: 2.0-release-notes
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
ubuntu@ip-10-190-47-53:~$ sudo dpkg -i couchbase-server-community_x86_64_2.0.0-1969-rel.deb
(Reading database ... 31702 files and directories currently installed.)
Preparing to replace couchbase-server 1.8.1 (using couchbase-server-community_x86_64_2.0.0-1969-rel.deb) ...

=INFO REPORT==== 30-Nov-2012::22:42:06 ===
Initiated server shutdown** at node ns_1@127.0.0.1 **

=INFO REPORT==== 30-Nov-2012::22:42:14 ===
Stopped ns_server application** at node ns_1@127.0.0.1 **
 * Stopped couchbase-server
libssl0.9.8 is installed. Continue installing
Upgrading previous couchbase ... (1.8.1)
Stopping previous couchbase ... (1.8.1)
 * Failed to stop couchbase-server
Saving previous couchbase config.dat ...
Cleaning symlinks ...
Unpacking replacement couchbase-server ...
Setting up couchbase-server (2.0.0) ...
Upgrading couchbase-server ...
  /opt/couchbase/bin/install/cbupgrade -c /opt/couchbase/var/lib/couchbase/config -a yes
Automatic mode: running without interactive questions or confirmations.
Upgrading your Couchbase Server to 2.0.0-1969-rel.
The upgrade process might take awhile.
Analysing...
Previous config.dat file is /opt/couchbase/var/lib/couchbase/config/config.dat.debsave
Target node: ns_1@127.0.0.1

Couchbase should not be running.
  Please use: /etc/init.d/couchbase-server stop

Database dir: /opt/couchbase/var/lib/couchbase/data

Buckets to upgrade: default

Checking disk space available for buckets in directory:
  /opt/couchbase/var/lib/couchbase/data
  Free disk bucket space wanted: 997652480.0
  Free disk bucket space available: 6136127488
  Free disk space factor: 2.0
  Ok.

Analysis complete.

Copying /opt/couchbase/var/lib/couchbase/config/config.dat.debsave
    cp /opt/couchbase/var/lib/couchbase/config/config.dat.debsave /opt/couchbase/bin/install/../../var/lib/couchbase/config/config.dat
Ensuring bucket data directories.
Ensuring bucket data directory: /opt/couchbase/var/lib/couchbase/data/default
    mkdir -p /opt/couchbase/var/lib/couchbase/data/default
Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data
    chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data
Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data
    chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data
Upgrading buckets.
Upgrading bucket: default
    /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///opt/couchbase/var/lib/couchbase/data -b default --source-vbucket-state=active --destination-vbucket-state=active
cbdbupgrade pid: 3328
  [####################] 100.0% (219036/219036 msgs)
bucket: default, msgs transferred...
       : total | last | per sec
 batch : 2019 | 2019 | 27.5
 byte : 449104863 | 449104863 | 6106649.5
 msg : 219036 | 219036 | 2978.3
done
cbdbupgrade err: 0
Upgrading bucket: default
    /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///opt/couchbase/var/lib/couchbase/data -b default --source-vbucket-state=replica --destination-vbucket-state=replica
cbdbupgrade pid: 3337
..............................................................................................................................................................................................................
bucket: default, msgs transferred...
       : total | last | per sec
 batch : 1025 | 1025 | 464.5
 byte : 0 | 0 | 0.0
 msg : 0 | 0 | 0.0
done
cbdbupgrade err: 0
Upgrading bucket: default
    /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///opt/couchbase/var/lib/couchbase/data -b default --source-vbucket-state=pending --destination-vbucket-state=pending
cbdbupgrade pid: 3346
..............................................................................................................................................................................................................
bucket: default, msgs transferred...
       : total | last | per sec
 batch : 1025 | 1025 | 420.4
 byte : 0 | 0 | 0.0
 msg : 0 | 0 | 0.0
done
cbdbupgrade err: 0
Upgrading bucket: default
    /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///opt/couchbase/var/lib/couchbase/data -b default --source-vbucket-state=dead --destination-vbucket-state=dead
cbdbupgrade pid: 3355
..............................................................................................................................................................................................................
bucket: default, msgs transferred...
       : total | last | per sec
 batch : 1025 | 1025 | 473.6
 byte : 0 | 0 | 0.0
 msg : 0 | 0 | 0.0
done
cbdbupgrade err: 0
Ensuring bucket owner/group: /opt/couchbase/var/lib/couchbase/data/default
    chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data/default

Done.
 * Failed to start couchbase-server
dpkg: error processing couchbase-server (--install):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for ureadahead ...
Errors were encountered while processing:
 couchbase-server
ubuntu@ip-10-190-47-53:~$ service couchbase-server start
 * Must run as root
ubuntu@ip-10-190-47-53:~$ sudo service couchbase-server start
 * couchbase-server is already started
ubuntu@ip-10-190-47-53:~$


 Comments   
Comment by kzeller [ 05/Dec/12 ]
Added to RN:

    On Ubuntu 64-bit 12.04, when you
        upgrade Couchbase Server from 1.8.1 to 2.0 the upgrade will work, however
         the server erroneously returns an error in the end when it starts.
         The error is: "Failed to start couchbase-server dpkg: error processing couchbase-server (--install)". Ignore this error message.
Comment by Bin Cui [ 14/Dec/12 ]
http://review.couchbase.org/#/c/23306/
Comment by Bin Cui [ 14/Dec/12 ]
This is the same bug as MB-7288
Generated at Sat Aug 30 12:17:15 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.