openwhisk icon indicating copy to clipboard operation
openwhisk copied to clipboard

openwhisk Hello World error!! wsk api list error !!

Open Guoyoyo opened this issue 7 years ago • 4 comments

Environment details:

  • Ubuntu 16.04.6
  • openjdk version "1.8.0_212"
  • docker-compose version 1.21.2

Question description about Openwhisk:

Hello everyone, please give me a big hand....I'm beat... I am going to install the apache openwhisk. I choose the Quick Start (Docker-Compose) https://github.com/apache/incubator-openwhisk#quick-start

It needs many port to install others service e.g. CouchDB, Kafka... in my computer, 80 and 9000 port is already used. so i revise the docker-compose.yml to assign the other port to replace them. (80 => 9004 , 9000=> 9005)

After that, I run make quick-start , most service are work which show ok , i guess they were successfully installed. In the end, it should output the hello-world, but it didn't and show the error.

error: Unable to create API: API creation failure: Unable to obtain API(s) from the API Gateway (status code 404): {"status":404,"message":"Not Found"}

Question description about OpenwhiskCLI:

I also tried to install openwhiskCLI reference by https://github.com/apache/incubator-openwhisk-cli the following instructions are what I inputted:

git clone https://github.com/apache/incubator-openwhisk-cli.git ./gradlew compile –PnativeCompile ./gradlew compile -PbuildPlatforms=linux-amd64 #add to the environment variable sudo mv wsk /usr/local/bin

It seems no problem so far. i can input wsk. So, i stated to try an example like Hello-world. reference: here

The first step: Create a JavaScript code example.

/**
 * Hello world as an OpenWhisk action.
 */
function main(params) {
    var name = params.name || 'World';
    return {payload:  'Hello, ' + name + '!'};
}

When i inputted: wsk action create hello hello.js, errors are just happened...

error: Unable to create action 'hello': The connection failed, or timed out. (HTTP status code 400)

I surveyed google many times and tried to set a lot @*$(%), but it still not work ... omg

like:

wsk property set --apihost http://172.17.0.1 namespace guest –auth 23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP

ok: whisk API host set to http://172.17.0.1

wsk action create hello hello.js

error: Unable to create action 'hello': The connection failed, or timed out. (HTTP status code 405)

wsk api list

error: Unable to obtain the API list: The connection failed, or timed out. (HTTP status code 404)

wsk property get

whisk API host http://172.17.0.1 whisk auth 23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP whisk namespace _ client cert Client key whisk API version v1 whisk CLI version 2019-07-11T14:05:29.661+0800 whisk API build Unknown whisk API build number Unknown error: Unable to obtain API build information: The connection failed, or timed out. (HTTP status code 404)

I am not sure whether the error is happened due to wsk property set or not ? if it is, what should i set for apihost(port needed?) namespace?

Please guys, if you have experience for openwhisk, help me omg

Guoyoyo avatar Jul 11 '19 08:07 Guoyoyo

supplement:

creating the hello.js function ... invoking the hello-world function ... adding the function to whisk ... ok: created action hello invoking the function ... invocation result: { "payload": "Hello, World!" } { "payload": "Hello, World!" } creating an API from the hello function ... ok: updated action hello error: Unable to create API: API creation failure: Unable to obtain API(s) from the API Gateway (status code 404): {"status":404,"message":"Not Found"}

Guoyoyo avatar Jul 11 '19 09:07 Guoyoyo

i also meet this problem ,please ask you solve the problem?

immortalsman avatar Nov 10 '22 02:11 immortalsman

Hi, were you able to solve this problem?

areejfatimah7 avatar Feb 22 '23 15:02 areejfatimah7

I am sorry, it is just too long ago that I forgot to solve it or not...

I just POC openwhisk in that moment, and I finally chose the other open source named openFaaS for my solution.

Areej Fatima @.***>於 2023年2月22日 週三,下午11:35寫道:

Hi, were you able to solve this problem?

— Reply to this email directly, view it on GitHub https://github.com/apache/openwhisk/issues/4554#issuecomment-1440268421, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIWV3SUQQAGP35WUVDDU6DWYYW5PANCNFSM4IA3JSIQ . You are receiving this because you modified the open/close state.Message ID: @.***>

Guoyoyo avatar Feb 22 '23 15:02 Guoyoyo