openwhisk icon indicating copy to clipboard operation
openwhisk copied to clipboard

Getting error running ansible-playbook -i environments/mac/ initdb.yml

Open csantanapr opened this issue 10 years ago • 12 comments

Running on a mac

getting red letters with fatal and failed fatal: [ansible]: FAILED! => {"changed": false, "content": "", "failed": true, "msg": "Status code was not [200, 404]: Request failed: ", "redirected": false, "status": -1, "url": "http://172.17.0.1:5984/subjects"}

look below

$ ansible-playbook -i environments/mac/ initdb.yml

PLAY [ansible] *****************************************************************

TASK [setup] *******************************************************************
Friday 10 June 2016  20:48:58 -0400 (0:00:00.014)       0:00:00.014 ***********
ok: [ansible]

TASK [include] *****************************************************************
Friday 10 June 2016  20:48:58 -0400 (0:00:00.578)       0:00:00.592 ***********
included: /Users/csantana23/Documents/dev/whisk/git/openwhisk/ansible/tasks/initdb.yml for ansible

TASK [check if the immortal subjects db with CouchDB exists?] ******************
Friday 10 June 2016  20:48:58 -0400 (0:00:00.043)       0:00:00.636 ***********
fatal: [ansible]: FAILED! => {"changed": false, "content": "", "failed": true, "msg": "Status code was not [200, 404]: Request failed: <urlopen error timed out>", "redirected": false, "status": -1, "url": "http://172.17.0.1:5984/subjects"}

PLAY RECAP *********************************************************************
ansible                    : ok=2    changed=0    unreachable=0    failed=1

Friday 10 June 2016  20:49:28 -0400 (0:00:30.182)       0:00:30.819 ***********
===============================================================================
TASK: check if the immortal {{ db.auth }} db with {{ db_provider }} exists? -- 30.18s
TASK: setup ------------------------------------------------------------- 0.58s
TASK: include ----------------------------------------------------------- 0.04s

csantanapr avatar Jun 11 '16 00:06 csantanapr

did you deploy the ephemeral couch at first?

lehoanganh avatar Jun 13 '16 10:06 lehoanganh

I think I try both CouchDB and Cloudant

csantanapr avatar Jun 14 '16 03:06 csantanapr

pull 605 is merged, can you pls try again or reproduce the issue?

lehoanganh avatar Jun 15 '16 07:06 lehoanganh

I tried persistent CouchDB case ,I use windows platform and I got error

vagrant@vagrant-ubuntu-trusty-64:~/openwhisk/ansible$ ansible-playbook -i envir onments/local initdb.yml

PLAY [ansible] *****************************************************************

TASK [setup] *******************************************************************

Thursday 16 June 2016 11:26:46 +0000 (0:00:00.040) 0:00:00.041 *********

ok: [ansible]

TASK [include] *****************************************************************

Thursday 16 June 2016 11:26:49 +0000 (0:00:03.138) 0:00:03.180 *********

included: /home/vagrant/openwhisk/ansible/tasks/initdb.yml for ansible

TASK [check if the immortal subjects db with CouchDB exists?] ******************

Thursday 16 June 2016 11:26:49 +0000 (0:00:00.044) 0:00:03.225 *********

fatal: [ansible]: FAILED! => {"changed": false, "content": "", "failed": true, " msg": "Status code was not [200, 404]: Request failed: <urlopen error [Errno 111 ] Connection refused>", "redirected": false, "status": -1, "url": "http://172.17 .0.2:6000/subjects"}

PLAY RECAP *********************************************************************

ansible : ok=2 changed=0 unreachable=0 failed=1

Thursday 16 June 2016 11:26:50 +0000 (0:00:00.310) 0:00:03.535 *********

setup ------------------------------------------------------------------- 3.14s check if the immortal subjects db with CouchDB exists? ------------------ 0.31s include ----------------------------------------------------------------- 0.04s

lfzCarlosC avatar Jun 16 '16 11:06 lfzCarlosC

I set couchdb param like this

  1. vagrant up
  2. vagrant ssh
  3. in the virtual env, execute:

export OW_DB=CouchDB export OW_DB_USERNAME=admin export OW_DB_PASSWORD=86889125 export OW_DB_PROTOCOL=http export OW_DB_HOST=172.17.0.2 export OW_DB_PORT=6000

ansible-playbook setup.yml

  1. execute

cd openwhisk_home gradle distDocker cd ansible ansible-playbook -i environments/local couchdb.yml ansible-playbook -i environments/local initdb.yml -> where error comes from

lfzCarlosC avatar Jun 16 '16 11:06 lfzCarlosC

Is there anything wrong with my param setting?

lfzCarlosC avatar Jun 16 '16 11:06 lfzCarlosC

you are not using a persistent couch, aren"t you. Just deploy the ephemeral couch.

Pls do it as follows

export OW_DB=CouchDB
export OW_DB_USERNAME=admin
export OW_DB_PASSWORD=86889125
export OW_DB_PROTOCOL=http
export OW_DB_HOST=172.17.0.2
export OW_DB_PORT=6000

ansible-playbook -i environments/local setup.yml

after that, ensure you have a file called db_local.ini in the ansible folder. Pls compare the credentials there with your credentials that are exported via bash above.

Then

ansible-playbook -i environments/local couchdb.yml
ansible-playbook -i environments/local initdb.yml
ansible-playbook -i environments/local openwhisk

lehoanganh avatar Jun 16 '16 22:06 lehoanganh

Ok, but doc https://github.com/openwhisk/openwhisk/blob/master/ansible/README.md#persistent-couchdb

writes: ansible-playbook setup.yml whitout "-i environments/local"

lfzCarlosC avatar Jun 16 '16 23:06 lfzCarlosC

you're rite, there is a bug in doc. this pull: https://github.com/openwhisk/openwhisk/pull/686 will fix it

lehoanganh avatar Jun 17 '16 12:06 lehoanganh

you're rite, there is a bug in doc. this pull: #686 will fix it #686 is closed and problem is not fix, do you have a new PR with the fix

csantanapr avatar Jun 17 '16 14:06 csantanapr

@csantanapr is this issue still valid?

lehoanganh avatar Jun 23 '16 11:06 lehoanganh

Not anymore

csantanapr avatar Jun 23 '16 11:06 csantanapr