Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-4067

cluster_restore : memcached fails to start with "unable to open database file" error after restoring data files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Blocker
    • 1.7.1
    • 1.7.1
    • ns_server
    • Security Level: Public
    • None

    Description

      saw this issue earlier today but i thought its a user error.

      i tried this many times on ubuntu,centos on local vms and amazon vms and faced the same issue.

      memcached<0.269.0>: sqlite error: unable to open database file
      memcached<0.269.0>: sqlite error: unable to open database file
      memcached<0.269.0>: sqlite error: unable to open database file
      memcached<0.269.0>: sqlite error: unable to open database file
      memcached<0.269.0>: Failed to create database: unable to open database file while building query: ``-- Initialization parameters for sqlite backend for membase buckets.
      memcached<0.269.0>: pragma auto_vacuum = none;''
      memcached<0.269.0>: No access to "/opt/membase/var/lib/membase/data/default-data/default".
      memcached<0.269.0>:
      memcached<0.269.0>: sqlite error: unable to open database file
      memcached<0.269.0>: sqlite error: unable to open database file

      copied the set of steps i ran :
      in node 1:

      [root@domU-12-31-38-04-E2-F1 ~]# /etc/init.d/membase-server stop
      Stopping membase-server [ OK ]
      [root@domU-12-31-38-04-E2-F1 ~]# mkdir /home/data
      [root@domU-12-31-38-04-E2-F1 ~]# cp /opt/membase/var/lib/membase/data/
      default-data/ isasl.pw ns_log
      [root@domU-12-31-38-04-E2-F1 ~]# cp /opt/membase/var/lib/membase/data/
      default-data/ isasl.pw ns_log
      [root@domU-12-31-38-04-E2-F1 ~]# cp -r /opt/membase/var/lib/membase/data /home/data/
      [root@domU-12-31-38-04-E2-F1 ~]# ls /home/data/
      default-data isasl.pw ns_log

      in node2:
      root@ip-10-122-58-61 ~]# /etc/init.d/membase-server stop
      Stopping membase-server [ OK ]
      [root@ip-10-122-58-61 ~]# cp -r /opt/membase/var/lib/membase/data /home/data/
      [root@ip-10-122-58-61 ~]# cd /home/data/
      default-data/ isasl.pw ns_log
      [root@ip-10-122-58-61 ~]# cd /home/data/
      default-data/ isasl.pw ns_log

      i stopped membase on node3,node4

      then i copied node1 files to node3 and node 2 files to node4
      [root@domU-12-31-38-04-E2-F1 ~]# scp -r /home/data root@ec2-50-17-34-192.compute-1.amazonaws.com:/opt/membase/var/lib/membase/
      root@ec2-50-17-34-192.compute-1.amazonaws.com's password:
      default-3.mb 100% 2791KB 2.7MB/s 00:00
      default-1.mb 100% 2797KB 2.7MB/s 00:00
      default-2.mb 100% 2797KB 2.7MB/s 00:00
      default 100% 51KB 51.0KB/s 00:00
      default-0.mb 100% 2791KB 2.7MB/s 00:00
      ns_log 100% 602 0.6KB/s 00:00
      isasl.pw

      [root@ip-10-122-58-61 ~]# scp -r /home/data root@ec2-50-19-202-22.compute-1.amazonaws.com:/opt/membase/var/lib/membase/
      The authenticity of host 'ec2-50-19-202-22.compute-1.amazonaws.com (10.88.165.188)' can't be established.
      RSA key fingerprint is ea:dc:10:1f:9b:07:0b:3e:06:2b:ff:26:13:09:67:c7.
      Are you sure you want to continue connecting (yes/no)? yes
      Warning: Permanently added 'ec2-50-19-202-22.compute-1.amazonaws.com,10.88.165.188' (RSA) to the list of known hosts.
      root@ec2-50-19-202-22.compute-1.amazonaws.com's password:
      default-3.mb 100% 2791KB 2.7MB/s 00:00
      default-1.mb 100% 2797KB 2.7MB/s 00:01
      default-2.mb 100% 2797KB 2.7MB/s 00:00
      default 100% 51KB 51.0KB/s 00:00
      default-0.mb 100% 2791KB 2.7MB/s 00:00
      ns_log 100% 617 0.6KB/s 00:00
      isasl.pw

      then started membase-server on node3 and node4

      then created a defualt bucket

      Attachments

        1. cr.log
          7.34 MB
        2. default
          51 kB
        3. default-0.mb
          2.73 MB
        4. default-1.mb
          2.73 MB
        5. default-2.mb
          2.73 MB
        6. default-3.mb
          2.73 MB
        7. Screen shot 2011-07-13 at 9.24.38 PM.png
          Screen shot 2011-07-13 at 9.24.38 PM.png
          26 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            farshid Farshid Ghods (Inactive)
            farshid Farshid Ghods (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty