apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.5k stars 1.16k forks source link

wsk package list fails with internal error #1863

Closed g12megha closed 7 years ago

g12megha commented 7 years ago

The same error happens even when i try to list actions in a namespace.

rabbah commented 7 years ago

Local deployment? Likely you didn't deploy the couchdb views if so. You can use wskadmin db get whisks to confirm the design doc is installed.

g12megha commented 7 years ago

yes it is local deployment. Also i m able to create an action running the command wsk action create .. Should this work if couchdb views are not installed??

rabbah commented 7 years ago

Yes. List will fail. Everything else will work.

g12megha commented 7 years ago

I tried running the command wskadmin db get whisks, it does return a bunch of documents : Here is a sample result root@****:~# wsk action list error: Unable to obtain the list of actions for namespace 'guest': There was an internal server error. (code 146) root@***:~# root@****:~# wskadmin db get whisks getting contents for ****_mo-****_whisks (primary index) { "offset": 0, "rows": [ { "id": "_design/whisks", "key": "_design/whisks", "value": { "rev": "1-519a71338899309c424c45f26501ac61" } }, { "id": "guest/5c3978bfd9154d76a64da41efab7876d", "key": "guest/5c3978bfd9154d76a64da41efab7876d", "value": { "rev": "1-86fa328be199eda938779188ff8079b7" } }, { "id": "guest/ae3f42f5e3e14a10936c05b75d3b56f9", "key": "guest/ae3f42f5e3e14a10936c05b75d3b56f9", "value": { "rev": "1-beb24a0b6d3e28b407901613aff1a8e5" } }, { "id": "whisk.system/combinators", "key": "whisk.system/combinators",

g12megha commented 7 years ago

from design docs, did u mean doc with id = _design/whisks ? i see it is there in the result.

rabbah commented 7 years ago

did you setup couchdb yourself or use the playbooks?

try this: wskadmin syslog get 146 controller and paste the output.

g12megha commented 7 years ago

root@*****:~# wskadmin syslog get 146 controller [2017-02-17T00:51:59.895Z] [INFO] [#tid_146] GET /api/v1/namespaces/guest/actions limit=30&skip=0 [2017-02-17T00:51:59.896Z] [INFO] [#tid_146] [RestAPIVersion_v1] authenticate: 23bc46b1-71f6-4ed5-8c54-816aa4f8c502 [2017-02-17T00:51:59.896Z] [INFO] [#tid_146] [Identity] [GET] serving from cache: 23bc46b1-71f6-4ed5-8c54-816aa4f8c502 [marker:database_cacheHit_count:2] [2017-02-17T00:51:59.896Z] [INFO] [#tid_146] [RestAPIVersion_v1] authentication valid [2017-02-17T00:51:59.897Z] [INFO] [#tid_146] [LocalEntitlementProvider] checking user 'guest' has privilege 'READ' for 'actions/guest' [2017-02-17T00:51:59.897Z] [INFO] [#tid_146] [LocalEntitlementProvider] authorized [2017-02-17T00:51:59.897Z] [INFO] [#tid_146] [ActionsApi] [LIST] exclude private entities: required == false [2017-02-17T00:51:59.898Z] [INFO] [#tid_146] [CouchDbRestStore] [QUERY] 'i844441_mo-8c827e216_whisks' searching 'whisks/actions List(guest, 0):List(guest, ￰, ￰)' [marker:database_queryView_start:3] [2017-02-17T00:51:59.957Z] [ERROR] [#tid_146] [CouchDbRestStore] Unexpected http response code: 500 Internal Server Error [marker:database_queryView_error:63:59] [2017-02-17T00:51:59.958Z] [ERROR] [#tid_146] [CouchDbRestStore] [QUERY] 'i844441_mo-8c827e216_whisks' internal error, failure: 'Unexpected http response code: 500 Internal Server Error' [marker:database_queryView_error:63:59] [2017-02-17T00:51:59.958Z] [ERROR] [#tid_146] [ActionsApi] [LIST] entity failed: Unexpected http response code: 500 Internal Server Error [2017-02-17T00:51:59.958Z] [INFO] [#tid_146] [BasicHttpService] [marker:http_get.500_count:64:64]

g12megha commented 7 years ago

FYI, we are using external couchdb running on a VM and not an internal couchdb running on a container .

rabbah commented 7 years ago

When the view is working correctly, you should be able to list documents this way wskadmin db get -v whisks/actions whisks

My suspicion is that your couchdb is not configured as required (see this issue https://github.com/openwhisk/openwhisk/issues/693 and confirm you've enabled this).

g12megha commented 7 years ago

fixing the limit on views of couchdb has resolved the issue. Thanks !