Faas: Question: could not access UI

Created on 19 Dec 2017  路  9Comments  路  Source: openfaas/faas

Using the getting started script (./deploy_stack.ps1) to create the base functions successfully deploys all the stack functions, but when attempting to access the UI on port 8080 the service returns 404. The only thing accessible is Prometheus on port 9090.

This is directly running Docker on Windows, not using through the Ubuntu on Windows Bash Shell.

Expected Behaviour

The UI should be accessible,

Current Behaviour

UI cannot be accessed through port 8080, returns:
Access Error: 404 -- Not Found
Cannot locate document: /

Steps to Reproduce (for bugs)

  1. Install Docker
  2. Confirm Docker is working by executing docker run hello-world
  3. Execute git clone https://github.com/openfaas/faas && cd faas
  4. Execute git checkout 0.6.5
  5. Execute ./deploy_stack.ps1
  6. Attempt to access http://localhost:8080 (and 127.0.0.1:8080)

Context

Unable to access the OpenFaaS portal. Only is Prometheus accessible.

Tracing

docker stack ps func
ID                  NAME                  IMAGE                              NODE                DESIRED STATE       CURRENT STATE             ERROR                              PORTS
9ulfw4xbd0y2        func_webhookstash.1   functions/webhookstash:latest      moby                Running             Running 11 minutes ago
n6exgsd6k0eg        func_alertmanager.1   functions/alertmanager:latest      moby                Running             Running 11 minutes ago
vxtwopoewjr2        func_decodebase64.1   functions/alpine:latest            moby                Running             Running 11 minutes ago
rdnhr9maw1sn        func_echoit.1         functions/alpine:latest            moby                Running             Running 11 minutes ago
dolf5tu2fcwr        func_prometheus.1     functions/prometheus:latest        moby                Running             Running 11 minutes ago
hzg6k4vjpebf        func_gateway.1        functions/gateway:0.6.14           moby                Running             Running 11 minutes ago
3hq7uqulhels        func_nodeinfo.1       functions/nodeinfo:latest          moby                Running             Running 11 minutes ago
7lvl0all0kt4        func_markdown.1       functions/markdown-render:latest   moby                Running             Running 11 minutes ago
x7hbpswu1rea        func_wordcount.1      functions/alpine:latest            moby                Running             Running 11 minutes ago
3ix4k9fdxeh7        func_hubstats.1       functions/hubstats:latest          moby                Running             Running 11 minutes ago
r08rhevs31z8        func_base64.1         functions/alpine:latest            moby                Running             Running 11 minutes ago

docker stack services func
ID                  NAME                MODE                REPLICAS            IMAGE                              PORTS
8erwn5cy1dr3        func_hubstats       replicated          1/1                 functions/hubstats:latest
eng7qt93dm5h        func_alertmanager   replicated          1/1                 functions/alertmanager:latest
fdk6xnn8mbgk        func_base64         replicated          1/1                 functions/alpine:latest
hob0coyoclq1        func_webhookstash   replicated          1/1                 functions/webhookstash:latest
kthmug1x54kb        func_decodebase64   replicated          1/1                 functions/alpine:latest
m3yqkj1cc68b        func_echoit         replicated          1/1                 functions/alpine:latest
nxgxj69jsgl8        func_markdown       replicated          1/1                 functions/markdown-render:latest
qno366makfnw        func_prometheus     replicated          1/1                 functions/prometheus:latest        *:9090->9090/tcp
uul9y3d8ye6z        func_gateway        replicated          1/1                 functions/gateway:0.6.14           *:8080->8080/tcp
vjk9vc6khnw1        func_nodeinfo       replicated          1/1                 functions/nodeinfo:latest
vmwrd47972fa        func_wordcount      replicated          1/1                 functions/alpine:latest

Your Environment

Docker Version: 17.09.1-ce
Platform: Docker Swarm
Operating System: Windows 10 (Version 1709, Build 17025.1000)

question

Most helpful comment

Thank you for the assist @johnmccabe and glad we figured it out @InariTheFox - let us know if we can help you again and feel free to join our Slack community. Just email [email protected] with an intro.

All 9 comments

Hi @InariTheFox thanks for using OpenFaaS.

We have folks using Docker for Windows including @JockDaRock and @johnmccabe and @itscaro to name a few. I'm not aware of any issues.

Just for reference which part of the documentation told you to checkout 0.6.5 tag? (I want to update it)

I'd try checking out master and redeploying. First of all remove the old stack:

$ docker stack rm func
$ git checkout master 

Might also be worth calling up the logs of the gateway before you do that (as described in the troubleshooting guide) - https://github.com/openfaas/faas/tree/master/guide

$ docker service logs func_gateway
$ docker service ps func_gateway

Regards,

Alex

I tried master as well with no luck, but to answer your question, the instructions were from the main getting started with Docker Swarm guide (https://github.com/openfaas/faas/blob/master/guide/deployment_swarm.md)

docker service ps func_gateway shows nothing different from the previous information posted originally, but docker service logs func_gateway just shows the following:

func_gateway.1.ohaul4vrlwgo@moby | 2017/12/19 15:55:37 HTTP Read Timeout: 10s
func_gateway.1.ohaul4vrlwgo@moby | 2017/12/19 15:55:37 HTTP Write Timeout: 10s
func_gateway.1.ohaul4vrlwgo@moby | 2017/12/19 15:55:37 Docker API version: 1.32, 17.09.1-ce

(I've tried increasing the tail length to 200 and those are the only three lines logged)

Just ran the script from master on a cleaned Docker install (all images deleted so only pulling fresh) and it works as expected.

@InariTheFox are you sure you don't already have a container running thats bound to :8080?

Run docker ps and check what port mappings exist for all of your running containers. For example, this is an example of Nginx mapped to port 8080:

CONTAINER ID   IMAGE   COMMAND                  CREATED        STATUS         PORTS                          NAMES
fa9e7ba21179   nginx   "nginx -g 'daemon ..."   2 seconds ago  Up 1 second    80/tcp, 0.0.0.0:80->8080/tcp   gracious_babbage

It looks like you may already have something running on that port (it might even be something outside of docker, check whats listing on ports by running netstat -a -b from with an Admin powershell or cmd terminal).

I feel like such an idiot here. Thanks @johnmccabe ... apparently the National Instruments multisim install (I'm using this on my dev machine) launches two web servers on both port 8080 and 9090, which would explain why the system cannot bind to the ports.

Maybe this is a failing of Docker for not notifying the user when ports cannot be bound to.

Thanks to you both for putting up with my derp moment.

One option is to change the bound port in the compose file here - https://github.com/openfaas/faas/blob/master/docker-compose.yml#L7

You'll just need to make sure to point the cli at the gateway on the new port when using it.

Alternatively shut down NI Multisim 馃槃

Derek close

Thank you for the assist @johnmccabe and glad we figured it out @InariTheFox - let us know if we can help you again and feel free to join our Slack community. Just email [email protected] with an intro.

To access the 8080 port prompt, you need to enter the account password. How can I get the password?

This should help: https://docs.openfaas.com/deployment/troubleshooting/#i-forgot-my-gateway-password

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hotjunfeng picture hotjunfeng  路  5Comments

rorpage picture rorpage  路  7Comments

alexellis picture alexellis  路  6Comments

VenkateshSrini picture VenkateshSrini  路  7Comments

jvice152 picture jvice152  路  7Comments