openwhisk icon indicating copy to clipboard operation
openwhisk copied to clipboard

ansible-playbook openwhisk.yml failed.

Open Hugh-ifly opened this issue 9 years ago • 3 comments

Environment details:

  • local deployment, native ubuntu
  • version of docker 1.12.0
  • version of ubuntu 14.04

Steps to reproduce the issue:

  1. following the instruction of "Deploying Using CouchDB"
  2. every step works fine until this step: ansible-playbook openwhisk.yml ( As I choose the local mode, so "-i environments/" is safely omitted. )

Provide the expected results and outputs:

there is no failing information displayed. Everything is ok.
run "bin/wsk action invoke /whisk.system/utils/echo -p message hello --result" should return ok.

Provide the actual results and outputs:

running "ansible-playbook openwhisk.yml" returns:
TASK [controller : create seed nodes list] **************************************************************************
Wednesday 01 November 2017  03:34:37 +0000 (0:00:00.294)       0:01:01.065 **** 
ok: [controller0] => (item=(0, u'172.17.0.1'))
ok: [controller1] => (item=(0, u'172.17.0.1'))
ok: [controller0] => (item=(1, u'172.17.0.1'))
ok: [controller1] => (item=(1, u'172.17.0.1'))

TASK [controller : (re)start controller] ****************************************************************************
Wednesday 01 November 2017  03:34:37 +0000 (0:00:00.231)       0:01:01.296 **** 
changed: [controller1]
changed: [controller0]

TASK [controller : wait until the Controller in this host is up and running] ****************************************
Wednesday 01 November 2017  03:34:49 +0000 (0:00:11.486)       0:01:12.783 **** 
FAILED - RETRYING: wait until the Controller in this host is up and running (12 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (12 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (11 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (11 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (10 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (10 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (9 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (9 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (8 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (8 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (7 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (7 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (6 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (6 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (5 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (5 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (4 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (4 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (3 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (3 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (2 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (2 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (1 retries left).
FAILED - RETRYING: wait until the Controller in this host is up and running (1 retries left).
fatal: [controller1]: FAILED! => {"attempts": 12, "changed": false, "content": "", "failed": true, "msg": "Status code was not [200]: Request failed: <urlopen error [Errno 111] Connection refused>", "redirected": false, "status": -1, "url": "http://172.17.0.1:10002/ping"}
fatal: [controller0]: FAILED! => {"attempts": 12, "changed": false, "content": "", "failed": true, "msg": "Status code was not [200]: Request failed: <urlopen error [Errno 111] Connection refused>", "redirected": false, "status": -1, "url": "http://172.17.0.1:10001/ping"}

PLAY RECAP **********************************************************************************************************
172.17.0.1                 : ok=10   changed=9    unreachable=0    failed=0   
controller0                : ok=10   changed=1    unreachable=0    failed=1   
controller1                : ok=10   changed=1    unreachable=0    failed=1   

Wednesday 01 November 2017  03:35:53 +0000 (0:01:03.808)       0:02:16.591 **** 
=============================================================================== 
controller : wait until the Controller in this host is up and running -- 63.81s
kafka : pull the zookeeper:3.4 image ----------------------------------- 12.49s
controller : (re)start controller -------------------------------------- 11.49s
kafka : (re)start kafka ------------------------------------------------ 11.29s
kafka : pull the ches/kafka:0.10.2.1 image ----------------------------- 10.32s
kafka : wait until the Zookeeper in this host is up and running --------- 7.33s
kafka : wait until the kafka server started up -------------------------- 5.29s
kafka : create the invoker topics --------------------------------------- 3.73s
kafka : create the active-ack topics ------------------------------------ 3.42s
kafka : create the health and the cacheInvalidation topic --------------- 3.30s
kafka : (re)start zookeeper --------------------------------------------- 1.51s
controller : check if whisk_local_whisks with CouchDB exists ------------ 0.46s
Gathering Facts --------------------------------------------------------- 0.46s
Gathering Facts --------------------------------------------------------- 0.36s
controller : check if whisk_local_activations with CouchDB exists ------- 0.29s
controller : check if whisk_local_subjects with CouchDB exists ---------- 0.27s
controller : ensure controller log directory is created with permissions --- 0.27s
controller : create seed nodes list ------------------------------------- 0.23s
controller : check, that required databases exist ----------------------- 0.16s
controller : docker login ----------------------------------------------- 0.03s



running "bin/wsk action invoke /whisk.system/utils/echo -p message hello --result" returns:
error: Unable to invoke action 'utils/echo': Post https://172.17.0.1/api/v1/namespaces/whisk.system/actions/utils/echo?blocking=true&result=true: dial tcp 172.17.0.1:443: getsockopt: connection refused

Additional information you deem important:

  • /tmp/wsklogs/controller0/controller0_logs.log displays below: [2017-11-01T03:02:02.871Z] [INFO] [#sid_130] [Controller] starting controller instance 0 [marker:controller_startup0_count:517] [2017-11-01T03:02:04.328Z] [INFO] [#sid_120] [LoadBalancerService] blackboxFraction = 0.1 [2017-11-01T03:02:04.389Z] [INFO] [#sid_110] [MessageFeed] handler capacity = 128, pipeline fill at = 128, pipeline depth = 256 [2017-11-01T03:02:04.590Z] [INFO] [#sid_120] [WhiskAction] [GET] serving from datastore: CacheKey(whisk.system/invokerHealthTestAction0) [marker:database_cacheMiss_count:2238] [2017-11-01T03:02:04.590Z] [INFO] [#sid_120] [CouchDbRestStore] [GET] 'whisk_local_whisks' finding document: 'id: whisk.system/invokerHealthTestAction0' [marker:database_getDocument_start:2238] [2017-11-01T03:02:04.740Z] [INFO] [#sid_120] [WhiskAction] invalidating CacheKey(whisk.system/invokerHealthTestAction0) Exception in thread "main" akka.stream.StreamTcpException: Tcp command [Connect(127.0.0.1:5984,None,List(),Some(10 seconds),true)] failed because of Connection refused [2017-11-01T03:02:04.744Z] [ERROR] [#sid_120] [CouchDbRestStore] [GET] 'whisk_local_whisks' internal error, doc: 'id: whisk.system/invokerHealthTestAction0', failure: 'Tcp command [Connect(127.0.0.1:5984,None,List(),Some(10 seconds),true)] failed because of Connection refused' [marker:database_getDocument_error:2391:151] [2017-11-01T03:02:04.745Z] [ERROR] [#sid_120] [LoadBalancerService] error creating test action for invoker health: akka.stream.StreamTcpException: Tcp command [Connect(127.0.0.1:5984,None,List(),Some(10 seconds),true)] failed because of Connection refused

Hugh-ifly avatar Nov 01 '17 03:11 Hugh-ifly

You have couchdb’s ip configured as localhost inside the container - which is not correct. Use the proper ip for your host as the ip has to be reachable from inside the controller.

rabbah avatar Nov 01 '17 04:11 rabbah

I corrected the db_host from 127.0.0.1 to my ip_addr in ansible/db_local.ini, and everything is ok now.

Hugh-ifly avatar Nov 01 '17 07:11 Hugh-ifly

I have a issue when executing the ansible-playbook couchdb.yml The db_host is my ip_addr in ansible/db_local.ini. But the CouchDB's IP is 127.0.0.1. Should I do the modification?

wangaoone avatar Apr 25 '18 00:04 wangaoone