Install Tyk on Ubuntu => unsupported protocol scheme in tyk-gateway.log

Hi,

I’m trying to set up Tyk on a local Ubuntu server and followed the steps in https://tyk.io/v1.9/setup/install-tyk-ubuntu/

Problem is that I cannot access the Dashboard (connection refused). Some digging around in logfiles revealed that every 5 seconds there is an error written to /var/log/upstart/tyk-gateway.log:

[Apr 3 14:59:22] ERROR Request failed: Get 1/register/node: unsupported protocol scheme “”
[Apr 3 14:59:27] ERROR Request failed: Get 1/register/node: unsupported protocol scheme “”
[Apr 3 14:59:32] ERROR Request failed: Get 1/register/node: unsupported protocol scheme “”
[Apr 3 14:59:37] ERROR Request failed: Get 1/register/node: unsupported protocol scheme “”

When stopping the gateway service (sudo service tyk-gateway stop) no more errors are added, starting the service gets the errors back in the log.

As I’m new to Tyk (but like to use it for a customer’s project :slight_smile: ) I’m looking for a pointer on how to fix this.

Thanks,
Peter

Looks like you’ve installed version 2.0 instead of 1.9, we literally just pushed this update, which is wh the instructions and what you are seeing don’t match up.

Try the new instructions here:

https://tyk.io/docs/tyk-api-gateway-v-2-0/installation-options-setup/

Hi Martin,

Thanks for the swift reply and congrats on 2.0! Trying new instructions now…

Best,
Peter

Hi Martin,

Following the instructions for Pro on Ubuntu. Are you sure this line is correct?

echo “deb https://packagecloud.io/tyk/tyk-pump/ubuntu/ trusty main” | sudo tee /etc/apt/sources.list.d/tyk_tyk-pimp.list

(Note the pimp, should that not read pump?)

Thanks,
Peter

Hi Peter,

Indeed, that should sy pump, will fix that now :slight_smile:

Thanks for the heads up!

Martin

Hi Martin,

Next one :slight_smile:

Under 3. Configure Tyk Gateway:

–dashboard=http://YOUR-DASHBOARD_DOMAIN:300: We want to use the dashboard, since Tyk Gateway gets all it’s API Definitions from the dashboard service, we need to tell it where the dashboard is, in this case, it’s on localhost. This MUST be the same domain that you use in step 4 below

  1. I think there is a typo on the port, in the setup.sh params it reads 3000, here it’s 300
  2. The explanation reads ‘in this case it’s on localhost’. I’m not sure what to use here, should it be http://localhost:[port], or e.g. http://www.valdit.com :[port]?

Thanks,
Peter

Thanks, have fixed the port.

Yes it should be your domain name (have also edited the copy to remove the confusion).

Hi Martin,

Made it to the end of the script, but am unfortunately not able to connect to the dashboard. Some digging in the logs shows this in /var/log/upstart/tyk-dashboard.log

[Apr 3 23:15:13] ERROR Mongo connection failed (retrying):no reachable servers
[Apr 3 23:15:25] ERROR Mongo connection failed (retrying):no reachable servers
[Apr 3 23:15:36] ERROR Mongo connection failed (retrying):no reachable servers
[Apr 3 23:15:48] ERROR Mongo connection failed (retrying):no reachable servers

Any thoughts? Thanks again!!

Peter

Hmmm…

  1. Is MongoDB running?
  2. Depending on your setup, replacing localhost with 127.0.0.1 in the setup.sh call might sort it

Obviously you’ll need to re-start the services and re-run the bootstrap script.

Hi Martin,

Changing the “mongo_url” in /opt/tyk-dashboard/tyk_analytics.conf to “mongodb://127.0.0.1/tyk_analytics” and a restart made the dashboard accessible.

On to acquiring license… :slight_smile:

Thanks!
Peter