question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python or Node examples: ENOENT error

See original GitHub issue

Performing this example: https://github.com/serverless/serverless-kubeless#try-out-the-example

I get this error. Not sure what the problem is.

Thanks.

SLS_DEBUG=* serverless deploy
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command info
Serverless: Load command logs
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Packaging service...
Serverless: Excluding development dependencies...

  Error --------------------------------------------------

  ENOENT: no such file or directory, open

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Stack Trace --------------------------------------------

Error: ENOENT: no such file or directory, open
    at Object.openSync (fs.js:434:3)
    at Object.readFileSync (fs.js:339:35)
    at _.each.configFile (/Users/phil-mac/source/serverless/serverless-kubeless/examples/get-python/node_modules/serverless-kubeless/lib/helpers.js:39:43)
    at arrayEach (/Users/phil-mac/source/serverless/serverless-kubeless/examples/get-python/node_modules/lodash/lodash.js:516:11)
    at Function.forEach (/Users/phil-mac/source/serverless/serverless-kubeless/examples/get-python/node_modules/lodash/lodash.js:9342:14)
    at Object.loadKubeConfig (/Users/phil-mac/source/serverless/serverless-kubeless/examples/get-python/node_modules/serverless-kubeless/lib/helpers.js:38:7)
    at new Config (/Users/phil-mac/source/serverless/serverless-kubeless/examples/get-python/node_modules/serverless-kubeless/lib/config.js:29:60)
    at KubelessDeploy.deployFunction (/Users/phil-mac/source/serverless/serverless-kubeless/examples/get-python/node_modules/serverless-kubeless/deploy/kubelessDeploy.js:84:28)
From previous event:
    at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:390:22)
    at PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:421:17)
    at variables.populateService.then.then (/usr/local/lib/node_modules/serverless/lib/Serverless.js:157:33)
    at runCallback (timers.js:693:18)
    at tryOnImmediate (timers.js:664:5)
    at processImmediate (timers.js:646:5)
    at process.topLevelDomainCallback (domain.js:121:23)
From previous event:
    at Serverless.run (/usr/local/lib/node_modules/serverless/lib/Serverless.js:144:8)
    at serverless.init.then (/usr/local/lib/node_modules/serverless/bin/serverless:43:50)

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information -----------------------------
     OS:                     darwin
     Node Version:           10.9.0
     Serverless Version:     1.30.2

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
andresmgotcommented, Aug 30, 2018

I see, the problem is that the library we are using to connect to the K8s cluster still doesn’t support EKS authentication. See: https://github.com/godaddy/kubernetes-client/issues/306 (note that the go library does, that’s why you can still use the kubeless binary).

As suggested in that issue you can try to use a service account token to authenticate instead.

0reactions
philwindercommented, Aug 30, 2018

Thanks @andresmgot.

I forgot to note, the examples in the getting started guide work successfully. So I believe it’s specific to the serverless-kubeless plugin.

Kubernetes running on AWS EKS.

$ kubectl version --short
Client Version: v1.11.1
Server Version: v1.10.3

Redacted:

$ cat ~/.kube/config-jenkins
apiVersion: v1
clusters:
- cluster:
    server: https://XXXXX.XXX.us-east-1.eks.amazonaws.com
    certificate-authority-data: XXXXXXXX...
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: aws
  name: aws
current-context: aws
kind: Config
preferences: {}
users:
- name: aws
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      command: aws-iam-authenticator
      args:
        - "token"
        - "-i"
        - "jenkins"
Read more comments on GitHub >

github_iconTop Results From Across the Web

npm - How to resolve Node.js: "Error: ENOENT: no such file or ...
In my case the issue was caused by using a file path starting at the directory where the script was executing rather than...
Read more >
how to solve node,js Error ENOENT,nodejs error ... - YouTube
getting the below error learn how to solve its.js:1051 throw errnoException(process._errno, 'watch'); ^ Error : watch ENOENT at errnoException ...
Read more >
Node.js Error: ENOENT: no such file or directory (2023)
In this tutorial, we will help you to resolve the Error: ENOENT: no such file or directory, open 'student.json' issue. Node.js Tutorial :....
Read more >
Node.js Error Handling Best Practices with Examples
The following line tells us that the program caught an error object denoting that the requested file does not exist. Error: ENOENT: no...
Read more >
Node.js Readable Stream error Event - GeeksforGeeks
Below examples illustrate the use of error event in Node.js: ... [Error: ENOENT: no such file or directory, open 'input.txt'] errno: -2, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found