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

on faas-cli -action deploy: dial tcp 127.0.0.1:8080: getsockopt: connection refused #49

Closed
ericstoekl opened this issue Aug 25, 2017 · 2 comments

Comments

@ericstoekl
Copy link
Contributor

When attempting to deploy a function with faas-cli -action deploy -f ./urlping.yaml I get the following error message:

~/github/faas-cli$ sudo ./faas-cli -action deploy -f ./urlping.yaml 
Deploying: url_ping.
Error removing existing function: Delete http://localhost:8080/system/functions: dial tcp 127.0.0.1:8080: getsockopt: connection refused, gateway=http://localhost:8080, functionName=url_ping
Is FaaS deployed? Do you need to specify the -gateway flag?
Post http://localhost:8080/system/functions: dial tcp 127.0.0.1:8080: getsockopt: connection refused

The file, urlping.yaml, is as described in the README.md example file.

This happens with both the faas-cli downloaded from https://cli.openfaas.com, or one which I have compiled from this repo.

Expected Behaviour

Deploys function

Current Behaviour

Produces output pasted above

Possible Solution

Steps to Reproduce (for bugs)

  1. Follow readme until faas-cli -action deploy -f ./urlping.yaml
  2. run faas-cli -action deploy -f ./urlping.yaml

Context

Your Environment

  • Docker version docker version (e.g. Docker 17.0.05 ):
    17.06.1-ce
  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?
    no
  • Operating System and version (e.g. Linux, Windows, MacOS):
    ubuntu 16.04
  • Link to your project or a code example to reproduce issue:
@ericstoekl
Copy link
Contributor Author

Update - This error is due to a docker stack not being deployed on localhost:8080, or another docker service already occupying that address and port. I had a service running on localhost:8080, so I removed it, and ran the ./deploy_stack.sh script in the faas/ repository, which set up a single node docker swarm cluster on my local machine, enabling me to deploy a function with faas-cli.

@alexellis
Copy link
Member

Good point .. glad you could figure it out. openfaas/faas@e40730f

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

2 participants