faas: Use of CLI or Web UI returns status code 500 and 'Get : unsupported protocol scheme ""'

My actions before raising this issue

  • Followed the troubleshooting guide
  • Read/searched the docs
  • Searched past issues (there was an issue closed yesterday because it didn’t follow this template)

Expected Behaviour

Access to the Web UI or via faas-cli after installation should be successful.

Current Behaviour

Access to the web UI returns the body: Get : unsupported protocol scheme "" with status code 500. Using faas-cli commands such as login or list return the response: Server returned unexpected status code: 500 - Get : unsupported protocol scheme ""

Possible Solution

It looks like something is overriding the router in gateway/server.go. Even browsing to <host>:8080/system/info with a GET request returns the same error message.

Steps to Reproduce (for bugs)

  1. Install OpenFaaS on Raspbian (with Docker managed by Portainer) using ./deploy-stack
  2. Services successfully start and are running.
  3. Browse (or run CLI commands) to the OpenFaaS port.
  4. Encounter error message.

Context

N/a

Your Environment

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

CLI: commit: 893972afffa5ea6672faa6e11743ae46322ec58c version: 0.9.2

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

  • Are you using Docker Swarm or Kubernetes (FaaS-netes)? Docker Swarm

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

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

  • Other diagnostic information / logs from troubleshooting guide

Next steps

You may join Slack for community support.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments

This was a trivial fix to the ps1 script, will raise a PR shortly.

I, personally, have no issue with removing it. But, I don’t use windows. If the bash script works just as well on windows, then I say, get rid of the powershell script

I’ll check either tomorrow morning at the weekend - and will comment if the issue is not resolved 🙂 thanks for the speedy fix!

Thanks. I’ve been able to reproduce. Portainer is a red herring.

$ docker service logs func_gateway
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:18 HTTP Read Timeout: 5m5s
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:18 HTTP Write Timeout: 5m5s
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:18 Binding to external function provider: http://faas-swarm:8080/
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:18 Async enabled: Using NATS Streaming.
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:18 Opening connection to nats://nats:4222
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:18 Connect: nats://nats:4222
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:28 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:36 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:36 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:37 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:38 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:40 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:42 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:45 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:46 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:46 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:47 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:48 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:49 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:51 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:54 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:56 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:56 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:57 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:58 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:03:59 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:03 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:06 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:06 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:07 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:08 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:10 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:12 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:14 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:16 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:16 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:17 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:18 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:21 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:25 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:26 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:26 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:27 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:29 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:30 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:33 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:36 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:36 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:37 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:38 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:40 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:41 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:44 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:46 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:46 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:47 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:48 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:50 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:54 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:56 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:56 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:57 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:58 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:04:59 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:05:01 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:05:03 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:05:06 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:05:06 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:05:07 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:05:08 ExternalAuthHandler: Get : unsupported protocol scheme ""
func_gateway.1.kww2dp7be3nu@pi3    | 2019/09/09 20:05:09 ExternalAuthHandler: Get : unsupported protocol scheme ""

Seems this is being triggered:

https://github.com/openfaas/faas/blob/6481b683f233c39f2f724a7a6318e445c4176b8c/gateway/handlers/external_auth.go#L27

I’ve got a fix lined up. Shouldn’t be too long…