You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/01/25 07:48:50 UTC

[GitHub] axiqia opened a new issue #4236: create '_users' database for singleton mode:"The database could not be created, the file already exists.

axiqia opened a new issue #4236: create '_users' database for singleton mode:"The database could not be created, the file already exists.
URL: https://github.com/apache/incubator-openwhisk/issues/4236
 
 
   <!--
   We use the issue tracker for bugs and feature requests. For general questions and discussion please use http://slack.openwhisk.org/ or https://openwhisk.apache.org/contact.html instead.
   
   Do NOT share passwords, credentials or other confidential information.
   
   Before creating a new issue, please check if there is one already open that
   fits the defect you are reporting.
   If you open an issue and realize later it is a duplicate of a pre-existing
   open issue, please close yours and add a comment to the other.
   
   Issues can be created for either defects or enhancement requests. If you are a committer than please add the labels "bug" or "feature". If you are not a committer please make clear in the comments which one it is, so that committers can add these labels later.
   
   If you are reporting a defect, please edit the issue description to include the
   information shown below.
   
   If you are reporting an enhancement request, please include information on what you are trying to achieve and why that enhancement would help you.
   
   For more information about reporting issues, see
   https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md#raising-issues
   
   Use the commands below to provide key information from your environment:
   You do not have to include this information if this is a feature request.
   -->
   
   ## Environment details:
   
   * local deployment, native ubuntu
   * Docker version 18.09.1, ubuntu 16.04 
   
   ## Steps to reproduce the issue:
   
   1.   
   ```
   $ ansible-playbook -i environments/local setup.yml  
   
   PLAY [localhost] ***********************************************************************************
   
   TASK [Gathering Facts] *****************************************************************************
   Friday 25 January 2019  15:27:46 +0800 (0:00:00.166)       0:00:00.166 ******** 
   ok: [localhost]
   
   TASK [gen hosts if 'local' env is used] ************************************************************
   Friday 25 January 2019  15:27:48 +0800 (0:00:01.824)       0:00:01.990 ******** 
   ok: [localhost -> localhost]
   
   TASK [find the ip of docker-machine] ***************************************************************
   Friday 25 January 2019  15:27:49 +0800 (0:00:01.164)       0:00:03.155 ******** 
   skipping: [localhost]
   
   TASK [get the docker-machine ip] *******************************************************************
   Friday 25 January 2019  15:27:49 +0800 (0:00:00.073)       0:00:03.228 ******** 
   skipping: [localhost]
   
   TASK [gen hosts for docker-machine] ****************************************************************
   Friday 25 January 2019  15:27:50 +0800 (0:00:00.105)       0:00:03.334 ******** 
   skipping: [localhost]
   
   TASK [check if db_local.ini exists?] ***************************************************************
   Friday 25 January 2019  15:27:50 +0800 (0:00:00.086)       0:00:03.420 ******** 
   ok: [localhost]
   
   TASK [prepare db_local.ini] ************************************************************************
   Friday 25 January 2019  15:27:50 +0800 (0:00:00.485)       0:00:03.905 ******** 
   skipping: [localhost]
   
   TASK [gen untrusted server certificate for host] ***************************************************
   Friday 25 January 2019  15:27:50 +0800 (0:00:00.110)       0:00:04.016 ******** 
   changed: [localhost -> localhost]
   
   TASK [gen untrusted client certificate for host] ***************************************************
   Friday 25 January 2019  15:27:51 +0800 (0:00:01.042)       0:00:05.059 ******** 
   changed: [localhost -> localhost]
   
   TASK [clean up old kafka keystore] *****************************************************************
   Friday 25 January 2019  15:27:53 +0800 (0:00:01.616)       0:00:06.675 ******** 
   skipping: [localhost]
   
   TASK [ensure kafka files directory exists] *********************************************************
   Friday 25 January 2019  15:27:53 +0800 (0:00:00.076)       0:00:06.752 ******** 
   skipping: [localhost]
   
   TASK [generate kafka certificates] *****************************************************************
   Friday 25 January 2019  15:27:53 +0800 (0:00:00.116)       0:00:06.868 ******** 
   skipping: [localhost]
   
   TASK [ensure controller files directory exists] ****************************************************
   Friday 25 January 2019  15:27:53 +0800 (0:00:00.068)       0:00:06.937 ******** 
   ok: [localhost]
   
   TASK [generate controller certificates] ************************************************************
   Friday 25 January 2019  15:27:54 +0800 (0:00:00.916)       0:00:07.853 ******** 
   changed: [localhost -> localhost]
   
   TASK [ensure invoker files directory exists] *******************************************************
   Friday 25 January 2019  15:27:56 +0800 (0:00:01.540)       0:00:09.394 ******** 
   ok: [localhost]
   
   TASK [generate invoker certificates] ***************************************************************
   Friday 25 January 2019  15:27:56 +0800 (0:00:00.882)       0:00:10.277 ******** 
   changed: [localhost -> localhost]
   
   PLAY RECAP *****************************************************************************************
   localhost                  : ok=9    changed=4    unreachable=0    failed=0   
   
   Friday 25 January 2019  15:27:58 +0800 (0:00:01.380)       0:00:11.657 ******** 
   =============================================================================== 
   Gathering Facts ----------------------------------------------------------------------------- 1.82s
   gen untrusted client certificate for host --------------------------------------------------- 1.62s
   generate controller certificates ------------------------------------------------------------ 1.54s
   generate invoker certificates --------------------------------------------------------------- 1.38s
   gen hosts if 'local' env is used ------------------------------------------------------------ 1.16s
   gen untrusted server certificate for host --------------------------------------------------- 1.04s
   ensure controller files directory exists ---------------------------------------------------- 0.92s
   ensure invoker files directory exists ------------------------------------------------------- 0.88s
   check if db_local.ini exists? --------------------------------------------------------------- 0.49s
   ensure kafka files directory exists --------------------------------------------------------- 0.12s
   prepare db_local.ini ------------------------------------------------------------------------ 0.11s
   get the docker-machine ip ------------------------------------------------------------------- 0.11s
   gen hosts for docker-machine ---------------------------------------------------------------- 0.09s
   clean up old kafka keystore ----------------------------------------------------------------- 0.08s
   find the ip of docker-machine --------------------------------------------------------------- 0.07s
   generate kafka certificates ----------------------------------------------------------------- 0.07s
   ```
   2.   
   ```
   $ ansible-playbook -i environments/local prereq.yml --ask-sudo-pass
   [DEPRECATION WARNING]: The sudo command line option has been deprecated in favor of the "become" 
   command line arguments. This feature will be removed in version 2.6. Deprecation warnings can be 
   disabled by setting deprecation_warnings=False in ansible.cfg.
   SUDO password: 
   
   PLAY [all:!ansible] ********************************************************************************
   
   TASK [Gathering Facts] *****************************************************************************
   Friday 25 January 2019  15:29:41 +0800 (0:00:00.157)       0:00:00.157 ******** 
   ok: [172.17.0.1]
   
   TASK [prereq : check for pip] **********************************************************************
   Friday 25 January 2019  15:29:42 +0800 (0:00:01.651)       0:00:01.809 ******** 
   changed: [172.17.0.1]
   
   TASK [prereq : install pip] ************************************************************************
   Friday 25 January 2019  15:29:44 +0800 (0:00:01.638)       0:00:03.448 ******** 
   skipping: [172.17.0.1]
   
   TASK [prereq : install requests] *******************************************************************
   Friday 25 January 2019  15:29:44 +0800 (0:00:00.073)       0:00:03.522 ******** 
   ok: [172.17.0.1]
   
   TASK [prereq : install docker for python] **********************************************************
   Friday 25 January 2019  15:29:45 +0800 (0:00:01.082)       0:00:04.604 ******** 
   ok: [172.17.0.1]
   
   TASK [prereq : install httplib2] *******************************************************************
   Friday 25 January 2019  15:29:46 +0800 (0:00:00.929)       0:00:05.534 ******** 
   ok: [172.17.0.1]
   
   TASK [prereq : remove requests] ********************************************************************
   Friday 25 January 2019  15:29:47 +0800 (0:00:00.961)       0:00:06.496 ******** 
   skipping: [172.17.0.1]
   
   TASK [prereq : remove docker] **********************************************************************
   Friday 25 January 2019  15:29:47 +0800 (0:00:00.068)       0:00:06.564 ******** 
   skipping: [172.17.0.1]
   
   TASK [prereq : remove httplib2] ********************************************************************
   Friday 25 January 2019  15:29:47 +0800 (0:00:00.068)       0:00:06.632 ******** 
   skipping: [172.17.0.1]
   
   PLAY [all:!ansible] ********************************************************************************
   
   TASK [Gathering Facts] *****************************************************************************
   Friday 25 January 2019  15:29:47 +0800 (0:00:00.051)       0:00:06.683 ******** 
   ok: [controller0]
   
   TASK [prereq : check for pip] **********************************************************************
   Friday 25 January 2019  15:29:49 +0800 (0:00:01.160)       0:00:07.844 ******** 
   changed: [controller0]
   
   TASK [prereq : install pip] ************************************************************************
   Friday 25 January 2019  15:29:50 +0800 (0:00:01.380)       0:00:09.224 ******** 
   skipping: [controller0]
   
   TASK [prereq : install requests] *******************************************************************
   Friday 25 January 2019  15:29:50 +0800 (0:00:00.068)       0:00:09.292 ******** 
   ok: [controller0]
   
   TASK [prereq : install docker for python] **********************************************************
   Friday 25 January 2019  15:29:51 +0800 (0:00:00.919)       0:00:10.212 ******** 
   ok: [controller0]
   
   TASK [prereq : install httplib2] *******************************************************************
   Friday 25 January 2019  15:29:52 +0800 (0:00:00.973)       0:00:11.186 ******** 
   ok: [controller0]
   
   TASK [prereq : remove requests] ********************************************************************
   Friday 25 January 2019  15:29:53 +0800 (0:00:00.932)       0:00:12.118 ******** 
   skipping: [controller0]
   
   TASK [prereq : remove docker] **********************************************************************
   Friday 25 January 2019  15:29:53 +0800 (0:00:00.104)       0:00:12.223 ******** 
   skipping: [controller0]
   
   TASK [prereq : remove httplib2] ********************************************************************
   Friday 25 January 2019  15:29:53 +0800 (0:00:00.065)       0:00:12.288 ******** 
   skipping: [controller0]
   
   PLAY [all:!ansible] ********************************************************************************
   
   TASK [Gathering Facts] *****************************************************************************
   Friday 25 January 2019  15:29:53 +0800 (0:00:00.050)       0:00:12.339 ******** 
   ok: [invoker0]
   
   TASK [prereq : check for pip] **********************************************************************
   Friday 25 January 2019  15:29:54 +0800 (0:00:01.146)       0:00:13.486 ******** 
   changed: [invoker0]
   
   TASK [prereq : install pip] ************************************************************************
   Friday 25 January 2019  15:29:56 +0800 (0:00:01.482)       0:00:14.968 ******** 
   skipping: [invoker0]
   
   TASK [prereq : install requests] *******************************************************************
   Friday 25 January 2019  15:29:56 +0800 (0:00:00.071)       0:00:15.040 ******** 
   ok: [invoker0]
   
   TASK [prereq : install docker for python] **********************************************************
   Friday 25 January 2019  15:29:57 +0800 (0:00:00.877)       0:00:15.918 ******** 
   ok: [invoker0]
   
   TASK [prereq : install httplib2] *******************************************************************
   Friday 25 January 2019  15:29:58 +0800 (0:00:00.945)       0:00:16.864 ******** 
   ok: [invoker0]
   
   TASK [prereq : remove requests] ********************************************************************
   Friday 25 January 2019  15:29:58 +0800 (0:00:00.920)       0:00:17.784 ******** 
   skipping: [invoker0]
   
   TASK [prereq : remove docker] **********************************************************************
   Friday 25 January 2019  15:29:59 +0800 (0:00:00.073)       0:00:17.858 ******** 
   skipping: [invoker0]
   
   TASK [prereq : remove httplib2] ********************************************************************
   Friday 25 January 2019  15:29:59 +0800 (0:00:00.071)       0:00:17.930 ******** 
   skipping: [invoker0]
   
   PLAY [all:!ansible] ********************************************************************************
   
   TASK [Gathering Facts] *****************************************************************************
   Friday 25 January 2019  15:29:59 +0800 (0:00:00.050)       0:00:17.981 ******** 
   ok: [kafka0]
   
   TASK [prereq : check for pip] **********************************************************************
   Friday 25 January 2019  15:30:00 +0800 (0:00:01.156)       0:00:19.137 ******** 
   changed: [kafka0]
   
   TASK [prereq : install pip] ************************************************************************
   Friday 25 January 2019  15:30:01 +0800 (0:00:01.512)       0:00:20.650 ******** 
   skipping: [kafka0]
   
   TASK [prereq : install requests] *******************************************************************
   Friday 25 January 2019  15:30:01 +0800 (0:00:00.071)       0:00:20.721 ******** 
   ok: [kafka0]
   
   TASK [prereq : install docker for python] **********************************************************
   Friday 25 January 2019  15:30:02 +0800 (0:00:00.941)       0:00:21.663 ******** 
   ok: [kafka0]
   
   TASK [prereq : install httplib2] *******************************************************************
   Friday 25 January 2019  15:30:03 +0800 (0:00:00.944)       0:00:22.607 ******** 
   ok: [kafka0]
   
   TASK [prereq : remove requests] ********************************************************************
   Friday 25 January 2019  15:30:04 +0800 (0:00:00.917)       0:00:23.525 ******** 
   skipping: [kafka0]
   
   TASK [prereq : remove docker] **********************************************************************
   Friday 25 January 2019  15:30:04 +0800 (0:00:00.065)       0:00:23.590 ******** 
   skipping: [kafka0]
   
   TASK [prereq : remove httplib2] ********************************************************************
   Friday 25 January 2019  15:30:04 +0800 (0:00:00.104)       0:00:23.695 ******** 
   skipping: [kafka0]
   
   PLAY RECAP *****************************************************************************************
   172.17.0.1                 : ok=5    changed=1    unreachable=0    failed=0   
   controller0                : ok=5    changed=1    unreachable=0    failed=0   
   invoker0                   : ok=5    changed=1    unreachable=0    failed=0   
   kafka0                     : ok=5    changed=1    unreachable=0    failed=0   
   
   Friday 25 January 2019  15:30:04 +0800 (0:00:00.029)       0:00:23.724 ******** 
   =============================================================================== 
   Gathering Facts ----------------------------------------------------------------------------- 1.65s
   prereq : check for pip ---------------------------------------------------------------------- 1.51s
   Gathering Facts ----------------------------------------------------------------------------- 1.16s
   Gathering Facts ----------------------------------------------------------------------------- 1.16s
   Gathering Facts ----------------------------------------------------------------------------- 1.15s
   prereq : install docker for python ---------------------------------------------------------- 0.94s
   prereq : install requests ------------------------------------------------------------------- 0.94s
   prereq : install httplib2 ------------------------------------------------------------------- 0.92s
   prereq : remove docker ---------------------------------------------------------------------- 0.10s
   prereq : install pip ------------------------------------------------------------------------ 0.07s
   prereq : remove requests -------------------------------------------------------------------- 0.07s
   prereq : remove httplib2 -------------------------------------------------------------------- 0.03s
   ```
   
   3.   
   
   ```
   $ ansible-playbook -i environments/local couchdb.yml               
   
   PLAY [db] ******************************************************************************************
   
   TASK [Gathering Facts] *****************************************************************************
   Friday 25 January 2019  15:30:15 +0800 (0:00:00.178)       0:00:00.178 ******** 
   ok: [172.17.0.1]
   
   TASK [couchdb : set the coordinator to the first node] *********************************************
   Friday 25 January 2019  15:30:17 +0800 (0:00:01.693)       0:00:01.871 ******** 
   ok: [172.17.0.1]
   
   TASK [couchdb : Set the volumes] *******************************************************************
   Friday 25 January 2019  15:30:17 +0800 (0:00:00.105)       0:00:01.977 ******** 
   ok: [172.17.0.1]
   
   TASK [couchdb : check if db credentials are valid for CouchDB] *************************************
   Friday 25 January 2019  15:30:17 +0800 (0:00:00.104)       0:00:02.082 ******** 
   skipping: [172.17.0.1]
   
   TASK [couchdb : check for persistent disk] *********************************************************
   Friday 25 January 2019  15:30:17 +0800 (0:00:00.140)       0:00:02.222 ******** 
   skipping: [172.17.0.1]
   
   TASK [couchdb : set the volume_dir] ****************************************************************
   Friday 25 January 2019  15:30:17 +0800 (0:00:00.073)       0:00:02.295 ******** 
   skipping: [172.17.0.1]
   
   TASK [couchdb : include_tasks] *********************************************************************
   Friday 25 January 2019  15:30:17 +0800 (0:00:00.070)       0:00:02.366 ******** 
   skipping: [172.17.0.1]
   
   TASK [couchdb : set the erlang cookie volume] ******************************************************
   Friday 25 January 2019  15:30:18 +0800 (0:00:00.135)       0:00:02.501 ******** 
   skipping: [172.17.0.1]
   
   TASK [couchdb : (re)start CouchDB from 'apache/couchdb:2.1 '] **************************************
   Friday 25 January 2019  15:30:18 +0800 (0:00:00.134)       0:00:02.635 ******** 
   changed: [172.17.0.1]
   
   TASK [couchdb : wait until CouchDB in this host is up and running] *********************************
   Friday 25 January 2019  15:30:21 +0800 (0:00:03.340)       0:00:05.976 ******** 
   ok: [172.17.0.1]
   
   TASK [couchdb : create '_users' database for singleton mode] ***************************************
   Friday 25 January 2019  15:30:22 +0800 (0:00:00.653)       0:00:06.630 ******** 
   fatal: [172.17.0.1]: FAILED! => {"cache_control": "must-revalidate", "changed": false, "connection": "close", "content": "{\"error\":\"file_exists\",\"reason\":\"The database could not be created, the file already exists.\"}\n", "content_length": "95", "content_type": "application/json", "date": "Fri, 25 Jan 2019 07:30:22 GMT", "json": {"error": "file_exists", "reason": "The database could not be created, the file already exists."}, "msg": "Status code was 412 and not [201]: HTTP Error 412: Precondition Failed", "redirected": false, "server": "CouchDB/2.1.2 (Erlang OTP/17)", "status": 412, "url": "http://172.17.0.1:5984/_users", "x_couch_request_id": "e5d81bdf5a", "x_couchdb_body_time": "0"}
   
   Status code was 412 and not [201]: HTTP Error 412: Precondition Failed
   
   PLAY RECAP *****************************************************************************************
   172.17.0.1                 : ok=5    changed=1    unreachable=0    failed=1   
   
   Friday 25 January 2019  15:30:22 +0800 (0:00:00.392)       0:00:07.022 ******** 
   =============================================================================== 
   couchdb : (re)start CouchDB from 'apache/couchdb:2.1 '  ------------------------------------- 3.34s
   Gathering Facts ----------------------------------------------------------------------------- 1.69s
   couchdb : wait until CouchDB in this host is up and running --------------------------------- 0.65s
   couchdb : create '_users' database for singleton mode --------------------------------------- 0.39s
   couchdb : check if db credentials are valid for CouchDB ------------------------------------- 0.14s
   couchdb : include_tasks --------------------------------------------------------------------- 0.14s
   couchdb : set the erlang cookie volume ------------------------------------------------------ 0.13s
   couchdb : set the coordinator to the first node --------------------------------------------- 0.11s
   couchdb : Set the volumes ------------------------------------------------------------------- 0.10s
   couchdb : check for persistent disk --------------------------------------------------------- 0.07s
   couchdb : set the volume_dir ---------------------------------------------------------------- 0.07s
   ```
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services