Portal won't run from OSX Docker install

I’ve installed the Tyk using the OSX Docker image and added an API that works, but there are issues.

The instructions at https://tyk.io/tyk-documentation/get-started/with-tyk-on-premise/installation/docker/docker-quickstart/ don’t quite work.

The portal internal links seem to work up to the point of clicking the Dashboard settings, then the links break. The links the portal generates after running settings no longer have the api-id in them so they fail.

Is there a fix for this or am I doing something wrong?

Can you clarify this please - which links are you referring to?

The links embedded in the web pages. Every button/menu fails.

Have you set the portal domain using the drop down menu ("Your developer portal -> set domain name) to the same as the host you set up in step 1?

No. The documentation says not to do that, and if fails if I try.

Ok, thanks for confirming - Have you set the hostname in your hosts file?

Yes: www.tyk-portal-test.com
and because it initially comes up with an org on the front: testorg.tyk-portal-test.com

We just ran through the whole process here and can confirm that the docker container works as expected. Though, this being docker, there are always quirks.

How are you running docker? Does it spin up on or does it provide a bridged host IP? You will need to make sure that:

  1. You have set the correct internal IP in the three greyed out proxied APIs to that of the portal (they default to localhost, but this can fail depending on the install)
  2. You have set the hostname in the “Your developer portal” -> “Set your portal domain” to be www.tyk-portal-test.com
  3. You ahve only run the setup.sh once (it can be run more than once but this can cause issues)

I’ll work with our ops guys tomorrow to see what they find. They run Docker a lot.

I deleted and recreated dashboard and mongo containers and ran setup again (deleting the mongo container I think make it safe). The set portal domain now completes successfully, but now I get

“error”: “There was a problem proxying the request”

and the log shows
tyk_gateway_1 | time=“Feb 2 02:59:21” level=error msg=“http: proxy error: dial tcp [::1]:3000: getsockopt: connection refused” api_id=dfe862e1b5e54cee7517603e65642be4 org_id=58929e6c43f478000117ac06 server_name=“localhost:3000” user_id= user_ip= user_name=

so still no success.

How are yu running docker on OS X? Are you using docker toolbox (kitematic) and the latest version?

Yes OS X and yes the latest version.

Our Ops guys are getting exactly the same behaviour. We are either following the same incorrect procedure, both have something else on our machines that is interfering, or it is broken.

We’re replicating this now on our end to see if there’s something wrong with the steps on OS X.

And can you confirm you are not using docker machine or vagrant to run docker, but are using kitematic / docker toolbox?

Yes, I installed Docker for OSX two weeks ago to test Tyk and Kitematic a couple of days ago.

We’ve put together another docker container and validates it against docker on OSX as well as Docker on windows, to use t, clone the repository and then follow the steps in the readme file:

Great! Thank you! That works, except that if I try to log on with the existing [email protected] user I get a CRSF error, but registering a new user and logging in with that credential works.

1 Like