Docker Quickstart with Docker for Mac


#1

If I follow the Docker Quickstart guide I can’t get Tyk to fully work.

What does work:

  • Gateway (as far as I can tell)
  • Dashboard (can create an API and add it to the catalogue and everything)

Now, if I’m trying to use the portal things start failing. I can visit http://www.tyk-portal-test.com/portal/. If I click on API Catalogue I get an Application Error (I can also not log in with the users created in the Dashboard). In the log I can see the following:

tyk_dashboard_1  | time="Dec  5 14:45:32" level=error msg="No menus found"
tyk_dashboard_1  | time="Dec  5 14:45:32" level=error msg="No portal configuration found, please create a new portal configuratin"
tyk_dashboard_1  | time="Dec  5 14:45:34" level=error msg="No menus found"
tyk_dashboard_1  | time="Dec  5 14:45:34" level=error msg="No portal configuration found, please create a new portal configuratin"
tyk_dashboard_1  | ERROR 2016/12/05 14:45:34.445437 panic_handler.go:26: PANIC
tyk_dashboard_1  | URL: /583e9f40f99d4e0001000001/portal/apis/
tyk_dashboard_1  | ERROR: interface conversion: interface {} is nil, not *main.PortalModelPortalConfig
tyk_dashboard_1  | STACK:
tyk_dashboard_1  | goroutine 121 [running]:
tyk_dashboard_1  | github.com/gocraft/web.(*Router).handlePanic(0xc82016bc30, 0xc8201f8a80, 0xc8201f8aa0, 0xbf90c0, 0xc8203c5600)
tyk_dashboard_1  | 	/home/tyk/go/src/github.com/gocraft/web/router_serve.go:251 +0x34e
tyk_dashboard_1  | github.com/gocraft/web.(*Router).ServeHTTP.func1(0xc82016bc30, 0xc8201f8a80)
tyk_dashboard_1  | 	/home/tyk/go/src/github.com/gocraft/web/router_serve.go:43 +0x68
tyk_dashboard_1  | panic(0xbf90c0, 0xc8203c5600)
tyk_dashboard_1  | 	/usr/local/go/src/runtime/panic.go:426 +0x4e9
tyk_dashboard_1  | main.(*PortalContext).PortalCatalogueHandler(0xc8203e8990, 0x7f3a097848a8, 0xc8201f8a80, 0xc8201f8aa0)
tyk_dashboard_1  | 	/home/tyk/go/src/github.com/lonelycode/tyk-analytics/PortalCatalogueHandler.go:11 +0xc8b
tyk_dashboard_1  | reflect.Value.call(0xb58160, 0xe6ef90, 0x13, 0xce6a98, 0x4, 0xc8200cd1d0, 0x3, 0x3, 0x0, 0x0, ...)
tyk_dashboard_1  | 	/usr/local/go/src/reflect/value.go:435 +0x120d
tyk_dashboard_1  | reflect.Value.Call(0xb58160, 0xe6ef90, 0x13, 0xc8200cd1d0, 0x3, 0x3, 0x0, 0x0, 0x0)
tyk_dashboard_1  | 	/usr/local/go/src/reflect/value.go:303 +0xb1
tyk_dashboard_1  | github.com/gocraft/web.middlewareStack.func1(0x7f3a097848a8, 0xc8201f8a80, 0xc8201f8aa0)
tyk_dashboard_1  | 	/home/tyk/go/src/github.com/gocraft/web/router_serve.go:113 +0xad4
tyk_dashboard_1  | main.(*PortalContext).PortalConfigSetter(0xc8203e8990, 0x7f3a097848a8, 0xc8201f8a80, 0xc8201f8aa0, 0xc820465400)
tyk_dashboard_1  | 	/home/tyk/go/src/github.com/lonelycode/tyk-analytics/PortalContextMiddleware.go:108 +0x2b8
tyk_dashboard_1  | reflect.Value.call(0xb966e0, 0xe6ef98, 0x13, 0xce6a98, 0x4, 0xc8200cd920, 0x4, 0x4, 0x0, 0x0, ...)
tyk_dashboard_1  | 	/usr/local/go/src/reflect/value.go:435 +0x120d
tyk_dashboard_1  | reflect.Value.Call(0xb966e0, 0xe6ef98, 0x13, 0xc8200cd920, 0x4, 0x4, 0x0, 0x0, 0x0)
tyk_dashboard_1  | 	/usr/local/go/src/reflect/value.go:303 +0xb1
tyk_dashboard_1  | github.com/gocraft/web.(*middlewareHandler).invoke(0xc820274510, 0xcd26a0, 0xc8203e8990, 0x16, 0x7f3a097848a8, 0xc8201f8a80, 0xc8201f8aa0, 0xc820465400)
tyk_dashboard_1  | 	/home/tyk/go/src/github.com/gocraft/web/router_serve.go:133 +0x286
tyk_dashboard_1  | github.com/gocraft/web.middlewareStack.func1(0x7f3a097848a8, 0xc8201f8a80, 0xc8201f8aa0)
tyk_dashboard_1  | 	/home/tyk/go/src/github.com/gocraft/web/router_serve.go:122 +0x1a5
tyk_dashboard_1  | main.(*PortalContext).UserDataSetter(0xc8203e8990, 0x7f3a097848a8, 0xc8201f8a80, 0xc8201f8aa0, 0xc820465400)
tyk_dashboard_1  | 	/home/tyk/go/src/github.com/lonelycode/tyk-analytics/PortalContextMiddleware.go:82 +0x267
tyk_dashboard_1  | reflect.Value.call(0xb966e0, 0xe6f018, 0x13, 0xce6a98, 0x4, 0xc8200ce0a0, 0x4, 0x4, 0x0, 0x0, ...)
tyk_dashboard_1  | 	/usr/local/go/src/reflect/value.go:435 +0x120d
tyk_dashboard_1  | reflect.Value.Call(0xb966e0, 0xe6f018, 0x13, 0xc8200ce0a0, 0x4, 0x4, 0x0, 0x0, 0x0)
tyk_dashboard_1  | 	/usr/local/go/src/reflect/value.go:303 +0xb1
tyk_dashboard_1  | github.com/gocraft/web.(*middlewareHandler).invoke(0xc8202744e0, 0xcd26a0, 0xc8203e8990, 0x16, 0x7f3a097848a8, 0xc8201f8a80, 0xc8201f8aa0, 0xc820465400)
tyk_dashboard_1  | 	/home/tyk/go/src/github.com/gocraft/web/router_serve.go:133 +0x286
tyk_dashboard_1  | github.com/gocraft/web.middlewareStack.func1(0x7f3a097848a8, 0xc8201f8a80, 0xc8201f8aa0)
tyk_dashboard_1  | 	/home/tyk/go/src/github.com/gocraft/web/router_serve.go:122 +0x1a5
tyk_dashboard_1  | main.(*PortalContext).PortalMenuGetter(0xc8203e8990, 0x7f3a097848a8, 0xc8201f8a80, 0xc8201f8aa0, 0xc820465400)
tyk_dashboard_1  | 	/home/tyk/go/src/github.com/lonelycode/tyk-analytics/PortalContextMiddleware.go:25 +0x524
tyk_dashboard_1  | reflect.Value.call(0xb966e0, 0xe6efe0, 0x13, 0xce6a98, 0x4, 0xc8200ce888, 0x4, 0x4, 0x0, 0x0, ...)
tyk_dashboard_1  | 	/usr/local/go/src/reflect/value.go:435 +0x120d
tyk_dashboard_1  | reflect.Value.Call(0xb966e0, 0xe6efe0, 0x13, 0xc8200ce888, 0x4, 0x4, 0x0, 0x0, 0x0)
tyk_dashboard_1  | 	/usr/local/go/src/reflect/value.go:303 +0xb1
tyk_dashboard_1  | github.com/gocraft/web.(*middlewareHandler).invoke(0xc8202744b0, 0xcd26a0, 0xc8203e8990, 0x16, 0x7f3a097848a8, 0xc8201f8a80, 0xc8201f8aa0, 0xc820465400)
tyk_dashboard_1  | 	/home/tyk/go/src/github.com/gocraft/web/router_serve.go:133 +0x286
tyk_dashboard_1  | github.com/gocraft/web.middlewareStack.func1(0x7f3a097848a8, 0xc8201f8a80, 0xc8201f8aa0)
tyk_dashboard_1  | 	/home/tyk/go/src/github.com/gocraft/web/router_serve.go:122 +0x1a5
tyk_dashboard_1  | main.(*PortalContext).PortalOrgIdGetter(0xc8203e8990, 0x7f3a097848a8, 0xc8201f8a80, 0xc8201f8aa0, 0xc820465400)
tyk_dashboard_1  | 	/home/tyk/go/src/github.com/lonelycode/tyk-analytics/PortalContextMiddleware.go:55 +0x439
tyk_dashboard_1  | reflect.Value.call(0xb966e0, 0xe6efe8, 0x13, 0xce6a98, 0x4, 0xc8200cf050, 0x4, 0x4, 0x0, 0x0, ...)
tyk_dashboard_1  | 	/usr/local/go/src/reflect/value.go:435 +0x120d
tyk_dashboard_1  | reflect.Value.Call(0xb966e0, 0xe6efe8, 0x13, 0xc8200cf050, 0x4, 0x4, 0x0, 0x0, 0x0)
tyk_dashboard_1  | 	/usr/local/go/src/reflect/value.go:303

Now I guess the following is the problem. In the documentation it sais:

Note: OS X (v10.11 or earlier) or Kitematic users (v0.11.0 or earlier) should change this to their Docker Host IP Address. You can find this out by running docker-machine ip default.

However, since Docker for Mac you don’t need docker-machine anymore and afaik your docker vm does not have a virtual IP.

Do I need to create an ‘old school’ docker VM with docker tools to get the quick start to work or did I miss something?


#2

Hi Rob,

please refer to this topic.

Thanks,
Kos @ Tyk Support Team