couchdbopenwhisk

OpenWhisk "action invoke" returning a issue with signature


I have OpenWhisk running local (minikube) through helm install:

helm install openwhisk-deploy-kube/helm/openwhisk \
  -n openwhisk \
  --namespace openwhisk \
  --set whisk.ingress.apiHostName="$(minikube ip)"

When try bind cloudant (CouchDB) using environment CLOUDANT_HOST pointing to minikube ip:

wsk package bind /whisk.system/cloudant contactdb \
  -p username $(CLOUDANT_USER) \
  -p password $(CLOUDANT_PASS) \
  -p host $(CLOUDANT_HOST) \
  -p dbname contactdb

And sending action invoke to contactdb/write:

wsk action invoke contactdb/write \
  -b \
  -p dbname contactdb \
  -p doc '{"name":"Bruno Wego","email":"brunowego@gmail.com"}' \
  -r \
  -i

It's return the follow issue:

{
    "error": {
        "code": "UNABLE_TO_VERIFY_LEAF_SIGNATURE",
        "description": "unable to verify the first certificate",
        "errid": "request",
        "message": "error happened in your connection",
        "name": "Error",
        "scope": "socket",
        "stack": "Error: unable to verify the first certificate\n    at Error (native)\n    at TLSSocket.<anonymous> (_tls_wrap.js:1092:38)\n    at emitNone (events.js:86:13)\n    at TLSSocket.emit (events.js:185:7)\n    at TLSSocket._finishInit (_tls_wrap.js:609:8)\n    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:439:38)",
        "stacktrace": [
            "Error: unable to verify the first certificate",
            "    at Error (native)",
            "    at TLSSocket.<anonymous> (_tls_wrap.js:1092:38)",
            "    at emitNone (events.js:86:13)",
            "    at TLSSocket.emit (events.js:185:7)",
            "    at TLSSocket._finishInit (_tls_wrap.js:609:8)",
            "    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:439:38)"
        ]
    }
}

I'm lost about what address pointing to host in a on-premise install of OpenWhisk.


Solution

  • After take a look here, I use the url param without ssl and it works:

    wsk package bind /whisk.system/cloudant contactdb \
      -p url 'http://whisk_admin:some_passw0rd@openwhisk-couchdb.openwhisk.svc.cluster.local:5984' \
      -p dbname contactdb \
      -i \
      -v