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

Couchbase Server doesn't shutdown cleanly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 7.0.0
    • 6.5.1
    • ns_server
    • None
    • ubuntu 16
    • Untriaged
    • 1
    • Unknown

    Description

      Steps to repro:

      • install Couchbase Server on ubuntu
      • configure server (this step may not be needed)
      • run: sudo service couchbase-server stop

      Check systemd logs:

      $ sudo journalctl | tail -50 
      ...
      Jun 17 21:37:48 node1-cb650-ubuntu16 systemd[1]: Started Couchbase Server.
      Jun 17 21:37:48 node1-cb650-ubuntu16 couchbase[14044]: The maximum number of processes for the couchbase user is set too low (3808).
      Jun 17 21:37:48 node1-cb650-ubuntu16 couchbase[14044]: It must be at least 10000.
      Jun 17 21:37:48 node1-cb650-ubuntu16 couchbase[14044]: Normally this can be increased by adding the following lines to
      Jun 17 21:37:48 node1-cb650-ubuntu16 couchbase[14044]: /etc/security/limits.conf:
      Jun 17 21:37:48 node1-cb650-ubuntu16 couchbase[14044]: couchbase              soft    nproc                  <value>
      Jun 17 21:37:48 node1-cb650-ubuntu16 couchbase[14044]: couchbase              hard    nproc                  <value>
      Jun 17 21:37:48 node1-cb650-ubuntu16 couchbase[14044]: Where <value> is greater than 10000. The procedure may be totally
      Jun 17 21:37:48 node1-cb650-ubuntu16 couchbase[14044]: different if you're running so called "non-root/non-sudo install" or
      Jun 17 21:37:48 node1-cb650-ubuntu16 couchbase[14044]: if you've built Couchbase Server from source.
      Jun 17 21:37:48 node1-cb650-ubuntu16 sudo[13849]: pam_unix(sudo:session): session closed for user root
      Jun 17 21:38:18 node1-cb650-ubuntu16 puppet-agent[750]: Could not request certificate: Connection refused - connect(2) for "puppet" port 8140
      Jun 17 21:39:08 node1-cb650-ubuntu16 sudo[14321]:  vagrant : TTY=pts/0 ; PWD=/home/vagrant ; USER=root ; COMMAND=/usr/sbin/service couchbase-server stop
      Jun 17 21:39:08 node1-cb650-ubuntu16 sudo[14321]: pam_unix(sudo:session): session opened for user root by vagrant(uid=0)
      Jun 17 21:39:08 node1-cb650-ubuntu16 systemd[1]: Stopping Couchbase Server...
      Jun 17 21:39:09 node1-cb650-ubuntu16 couchbase[14349]: 2020-06-17 21:39:09 cb_dist: terminating with reason: shutdown
      Jun 17 21:39:09 node1-cb650-ubuntu16 epmd[14065]: epmd: got KILL_REQ - terminates normal
      Jun 17 21:39:09 node1-cb650-ubuntu16 couchbase[14044]: erl_child_setup closed
      Jun 17 21:39:09 node1-cb650-ubuntu16 couchbase[14044]: [1B blob data]
      Jun 17 21:39:09 node1-cb650-ubuntu16 couchbase[14044]: Crash dump is being written to: erl_crash.dump.1592455068.14044.babysitter...done
      Jun 17 21:39:09 node1-cb650-ubuntu16 systemd[1]: couchbase-server.service: Main process exited, code=exited, status=1/FAILURE
      Jun 17 21:39:09 node1-cb650-ubuntu16 sudo[14321]: pam_unix(sudo:session): session closed for user root
      Jun 17 21:39:09 node1-cb650-ubuntu16 systemd[1]: Stopped Couchbase Server.
      Jun 17 21:39:09 node1-cb650-ubuntu16 systemd[1]: couchbase-server.service: Unit entered failed state.
      Jun 17 21:39:09 node1-cb650-ubuntu16 systemd[1]: couchbase-server.service: Failed with result 'exit-code'.
      Jun 17 21:39:13 node1-cb650-ubuntu16 sudo[14399]:  vagrant : TTY=pts/0 ; PWD=/home/vagrant ; USER=root ; COMMAND=/bin/journalctl
      Jun 17 21:39:13 node1-cb650-ubuntu16 sudo[14399]: pam_unix(sudo:session): session opened for user root by vagrant(uid=0)
      Jun 17 21:39:14 node1-cb650-ubuntu16 sudo[14399]: pam_unix(sudo:session): session closed for user root
      Jun 17 21:40:18 node1-cb650-ubuntu16 puppet-agent[750]: Could not request certificate: Connection refused - connect(2) for "puppet" port 8140
      Jun 17 21:42:19 node1-cb650-ubuntu16 puppet-agent[750]: Could not request certificate: Connection refused - connect(2) for "puppet" port 8140
      Jun 17 21:42:29 node1-cb650-ubuntu16 sudo[14410]:  vagrant : TTY=pts/0 ; PWD=/home/vagrant ; USER=root ; COMMAND=/bin/journalctl
      Jun 17 21:42:29 node1-cb650-ubuntu16 sudo[14410]: pam_unix(sudo:session): session opened for user root by vagrant(uid=0)
      

      Note the problematic part:

      Jun 17 21:39:09 node1-cb650-ubuntu16 couchbase[14044]: Crash dump is being written to: erl_crash.dump.1592455068.14044.babysitter...done
      Jun 17 21:39:09 node1-cb650-ubuntu16 systemd[1]: couchbase-server.service: Main process exited, code=exited, status=1/FAILURE
      

      The VM crashes and exits with status code 1. This means the node file and cookie file aren't cleaned up properly.

      Attachments

        1. bundle.zip
          632 kB
        2. cbcollect.zip
          940 kB
        3. erl_crash.dump.1592455068.14044.babysitter
          356 kB
        4. erl_crash.dump.1599152687.6139.babysitter
          488 kB
        5. journalctl.log
          176 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            steve.watanabe Steve Watanabe
            dfinlay Dave Finlay
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty