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

Unable to log in to the gateway - connection refused #1835

Closed
1 of 2 tasks
prateekrai1 opened this issue Mar 23, 2024 · 8 comments
Closed
1 of 2 tasks

Unable to log in to the gateway - connection refused #1835

prateekrai1 opened this issue Mar 23, 2024 · 8 comments

Comments

@prateekrai1
Copy link

prateekrai1 commented Mar 23, 2024

My actions before raising this issue

Why do you need this?

I am using OpenFaaS for my course project for my project at University of Michigan. I am trying to study the utilization of GPUs in serverless applications.

Who is this for?

This is for me. I am a student at University of Michigan.

What company is this for? Are you listed in the ADOPTERS.md file?

Expected Behaviour

Unable to login, what credentials do I give in the cli?
Do I give my node username and password?

Current Behaviour

Calling the OpenFaaS server to validate the credentials...
Cannot connect to OpenFaaS on URL: http://127.0.0.1:8080. Get "http://127.0.0.1:8080/system/functions": dial tcp 127.0.0.1:8080: connect: connection refused

-- I have tried using all the ways giving multiple gateways and using the environment variable too prat@node-0:~$ cat faas_password.txt | faas-cli login --username prat --password-stdin --gateway $OPENFAAS_URL
Calling the OpenFaaS server to validate the credentials...
Cannot connect to OpenFaaS on URL: http://127.0.0.1:31112. Get "http://127.0.0.1:31112/system/functions": dial tcp 127.0.0.1:31112: connect: connection refused

Are you a GitHub Sponsor (Yes/No?)

NO, I am not a GItHub Sponsor

Check at: https://github.com/sponsors/openfaas

  • Yes
  • No

List All Possible Solutions and Workarounds

Which Solution Do You Recommend?

How do I login into the CLI

Steps to Reproduce (for bugs)

Context

Your Environment

  • FaaS-CLI version ( Full output from: faas-cli version ):

  • CLI:
    commit: a3e72b5881c4efcc7a366a2e8dc384399c807dfc
    version: 0.16.23
    I am currently using a remote node in Cloudlab. I have written my function in python3 and all setup is done. But when I login there is an issue coming up

  • Docker version docker version (e.g. Docker 17.0.05 ):

  • Docker version 25.0.4, build 1a576c5

  • Are you using OpenFaaS on Kubernetes or faasd?

  • I have installed minikube and started my cluster on the node. I am using a remote node in cloud lab

  • Operating System and version (e.g. Linux, Windows, MacOS):

  • Linux Ubuntu 22.04.2 LTS

  • Code example or link to GitHub repo or gist to reproduce problem:

  • Other diagnostic information / logs from troubleshooting guide

@rgee0
Copy link
Contributor

rgee0 commented Mar 24, 2024

Provided the file you’re cat-ing contains the appropriate password then you might try admin as the username:

https://docs.openfaas.com/deployment/kubernetes/#install-openfaas-community-edition-ce-via-arkade-or-helm

If you're using faasd then there's a book that would likely help:

https://openfaas.gumroad.com/l/serverless-for-everyone-else

@alexellis sometimes makes discount codes available for academia, and over holiday periods.

@prateekrai1
Copy link
Author

cat faas_password.txt | faas-cli login --username admin --password-stdin --gateway https://127.0.0.1:8080
Calling the OpenFaaS server to validate the credentials...
Cannot connect to OpenFaaS on URL: https://127.0.0.1:8080. Get "https://127.0.0.1:8080/system/functions": dial tcp 127.0.0.1:8080: connect: connection refused
I tried with admin and password as admin as well, still got the connection refused

@prateekrai1
Copy link
Author

Is it better to install via arkade as I am using a remote node?
After the installation you'll receive a command to retrieve your OpenFaaS URL and password.
Does this statement mean arkade will set my credentials?

@rgee0
Copy link
Contributor

rgee0 commented Mar 24, 2024

If you're using a remote node then 127.0.0.1 isn't usually going to be correct. You will need to specify the gateway in the login command, or set the CLI env var for the gateway.

I'm not sure why you are guessing the password. You are provided with the password for the gateway when you install, or if you're using k8s then you can retrieve it as per the command in the documentation.

This kind of conversation demonstrates why the template exists. It's really difficult for someone else to help when information drips into an issue.

@rgee0
Copy link
Contributor

rgee0 commented Mar 24, 2024

/set title: Unable to log in to the gateway - connection refused

@prateekrai1 prateekrai1 changed the title What are the credentials do we need to use to login into the Faas-cli? I used my node credentials does not seem to work. Cannot connect to OpenFaaS on URL: http://127.0.0.1:8080. Get "http://127.0.0.1:8080/system/functions": dial tcp 127.0.0.1:8080: connect: connection refused Unable to log in to the gateway - connection refused Mar 24, 2024
@prateekrai1
Copy link
Author

Was able to connect to the gateway after going through the documentation. Thank you.

@alexellis
Copy link
Member

"Was able to connect to the gateway after going through the documentation."

👏 great!

@alexellis
Copy link
Member

/lock: not an issue.

@derek derek bot locked and limited conversation to collaborators Mar 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants