Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible fdk-node on K8S issue? #18

Open
nerdguru opened this issue Oct 2, 2018 · 3 comments
Open

Possible fdk-node on K8S issue? #18

nerdguru opened this issue Oct 2, 2018 · 3 comments

Comments

@nerdguru
Copy link

nerdguru commented Oct 2, 2018

Hi there,

I'm running fn on a K8S cluster and can run through the Go instructions just fine:

https://fnproject.io/tutorials/Introduction/

But when following their Node equivalent:

https://fnproject.io/tutorials/node/intro/

The fn invoke nodeapp nodefn sends back a 500 error and the fn list calls comes back empty. Here's a full set of commands I'm running with results:

PETERCJO-M-63N9:fn petercjo$ fn init --runtime node --trigger http nodefn
Creating function at: /nodefn
Function boilerplate generated.
func.yaml created.
PETERCJO-M-63N9:fn petercjo$ cd nodefn
PETERCJO-M-63N9:nodefn petercjo$ ll
total 24
-rw-r--r--  1 petercjo  staff  176 Oct  2 17:24 func.js
-rw-r--r--  1 petercjo  staff  184 Oct  2 17:24 func.yaml
-rw-r--r--  1 petercjo  staff  193 Oct  2 17:24 package.json
PETERCJO-M-63N9:nodefn petercjo$ fn --verbose deploy --app nodeapp
Deploying nodefn to app: nodeapp
Bumped to version 0.0.2
Building image petecj2/nodefn:0.0.2 
FN_REGISTRY:  petecj2
Current Context:  No context currently in use.
Sending build context to Docker daemon   5.12kB
Step 1/9 : FROM fnproject/node:dev as build-stage
 ---> 016382f39a51
Step 2/9 : WORKDIR /function
 ---> Using cache
 ---> 8c66c3b8b760
Step 3/9 : ADD package.json /function/
 ---> Using cache
 ---> a8e6bba754a8
Step 4/9 : RUN npm install
 ---> Using cache
 ---> 366077317d69
Step 5/9 : FROM fnproject/node
 ---> 016382f39a51
Step 6/9 : WORKDIR /function
 ---> Using cache
 ---> 8c66c3b8b760
Step 7/9 : ADD . /function/
 ---> df3bd424e08c
Step 8/9 : COPY --from=build-stage /function/node_modules/ /function/node_modules/
 ---> 0970aa10bd82
Step 9/9 : ENTRYPOINT ["node", "func.js"]
 ---> Running in 784bb14078af
Removing intermediate container 784bb14078af
 ---> 2b1157cd2228
Successfully built 2b1157cd2228
Successfully tagged petecj2/nodefn:0.0.2

Parts:  [petecj2 nodefn:0.0.2]
Pushing petecj2/nodefn:0.0.2 to docker registry...The push refers to repository [docker.io/petecj2/nodefn]
4c4d0bf877e9: Pushed 
0b2623d672cd: Pushed 
4541c185b2ea: Pushed 
0b3e54ee2e85: Mounted from fnproject/node 
ad77849d4540: Mounted from fnproject/node 
5bef08742407: Mounted from fnproject/node 
0.0.2: digest: sha256:c75c2ffb8806778d3f89983b1185ea4261d0615912a1fe70a17a083059f6cda8 size: 1572
Updating function nodefn using image petecj2/nodefn:0.0.2...
Successfully created app:  nodeapp
Successfully created function: nodefn with petecj2/nodefn:0.0.2
Successfully created trigger: nodefn-trigger
PETERCJO-M-63N9:nodefn petercjo$ fn invoke nodeapp nodefn
{"message":"internal server error"}

Fn: Error calling function: status 500

See 'fn <command> --help' for more information. Client version: 0.5.13
PETERCJO-M-63N9:nodefn petercjo$ fn list calls nodeapp nodefn
PETERCJO-M-63N9:nodefn petercjo$

The only thing I did differently, and had to do the same on the Go example, was I didn't use the --local flag on the deploy command since I'm running on a remote K8S cluster instead of my local Docker.

Thoughts? Other logs I should be looking at?

I'd be happy to post a similar output for the successful set of Go commands if that'll help.

@zootalures
Copy link
Member

Can you provide the following :

Fn version (client and server version)
Node FDK version (from generated package.json)

The ‘format’ field in your func.yaml

@nerdguru
Copy link
Author

nerdguru commented Oct 2, 2018

NP, here's the version output:

$ fn version
Client version is latest version: 0.5.13
Server version:  0.3.570

Contents of func.yaml, which I left untouched from the init command invocation:

$ more func.yaml
schema_version: 20180708
name: nodefn
version: 0.0.2
runtime: node
entrypoint: node func.js
format: http-stream
triggers:
- name: nodefn-trigger
  type: http
  source: /nodefn-trigger

@denismakogon
Copy link
Member

denismakogon commented Oct 24, 2018

@zootalures I guess, helm charts from the tutorial request IOFS configuration, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants