Can't access gateway or portal -- domain/hostname issues?

I’ve installed Tyk on-premise in ubuntu and and having a bit of trouble getting the configuration completed.

The issues I’m experiencing are:

  • “API URL” doesn’t populate in the designer screen when an API is saved although I am able to call the endpoint at the expected address
  • /portal returns “Not Found” – also: link from dashboard is local IP instead of public IP
  • “Activity by API” is not being captured but the log browser shows each call to the api

The only references to localhost left in the tyk.conf and tyk_analytics.conf are in the redis section – could this be the problem?

Hi Peter,

there are a couple of pages you could have a look at
Dev portal Error
Empty API URL
Just noticed that you edited the initial post and added an extra question, have you got "enable_aggregate_lookups", set to true in your tyk_analytics.conf ?

If you are still experiencing issues please provide your gateway and dashboard logs.

Thanks,
Kos @ Tyk Support Team

Thanks Kos!

I’d looked at the empty API URL article and tried a few things but still no luck.

Is it the .conf files you need or is there a log file somewhere (I looked in the folders and couldn’t find one)

also - enable_aggregate_lookups is true in the .conf file.

Hi Peter,

your logs are by default at /var/log/upstart.
Can you share your tyk_analytics and tyk_pump configs as well ?

Thanks,
Kos @ Tyk Support Team

tyk_anaytics.conf

{
“listen_port”: 3030,
“tyk_api_config”: {
“Host”: “http://104.156.64.3”,
“Port”: “3080”,
“Secret”: “352d20ee67be67f6340b4c0605b044b7”
},
“mongo_url”: “mongodb://127.0.0.1/tyk_analytics”,
“mongo_use_ssl”: false,
“mongo_ssl_insecure_skip_verify”: false,
“page_size”: 10,
“admin_secret”: “12345”,
“shared_node_secret”: “352d20ee67be67f6340b4c0605b044b7”,
“redis_port”: 6379,
“redis_host”: “localhost”,
“redis_password”: “”,
“enable_cluster”: false,
“force_api_defaults”: false,
“notify_on_change”: true,
“license_key”: “eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhbGxvd2VkX25vZGVzIjoiMmY3NTNlNjQtZGYwNy00Y2M2LTcyZWUtNDQxYTUzOGNkYzUzIiwiZXhwIjoxNTMwMDU2NDQ1LCJvd25lciI6IjU5NTE5YjdkNDVmOTJlNDRiMmQzZmM4NSJ9.fuFkzSOQfLxcNh5DxjtHrE_xldmQ7age-3VM_gJz9b0nl2-YO-3HEzQ0oSQWf-6-hxgoihh85p-kW6iIYFk0HDe3dfTPgPY8U2_me-G2WT97PicadTlNq-INf2wkg9k_2VNzXUf1hGMyvQEjh_vAs7sA5CqTc2xNvXF-YyVeHOnr7MM66hUeJclGqK-FrFLHhK7A5lk-Ne7wqPEMg8JeK67pWiM3eUWoWWclql0JTXa_V97rdmw-zOZrrttFeN_H9j0gqhpfGdNifMGxTU2-tgiLUBsJ_Y-amiKhh_ShttbCjKNOHYrWfhJnynbX83cf1Kl33GEcZJyutSp1x3wIWg”,
“redis_database”: 0,
“redis_hosts”: null,
“hash_keys”: true,
“email_backend”: {
“enable_email_notifications”: false,
“code”: “”,
“settings”: null,
“default_from_email”: “”,
“default_from_name”: “”,
“dashboard_hostname”: “”
},
“hide_listen_path”: false,
“sentry_code”: “”,
“sentry_js_code”: “”,
“use_sentry”: false,
“enable_master_keys”: false,
“enable_duplicate_slugs”: true,
“show_org_id”: true,
“host_config”: {
“enable_host_names”: true,
“disable_org_slug_prefix”: true,
“hostname”: “104.156.64.3”,
“override_hostname”: “104.156.64.3”,
“portal_domains”: {},
“portal_root_path”: “/portal”,
“generate_secure_paths”: false,
“secure_cookies”: false,
“use_strict_hostmatch”: false
},
“http_server_options”: {
“use_ssl”: false,
“certificates”: [
{
“domain_name”: “”,
“cert_file”: “”,
“key_file”: “”
}
],
“min_version”: 0
},
“security”: {
“allow_admin_reset_password”: false,
“login_failure_username_limit”: 0,
“login_failure_ip_limit”: 0,
“login_failure_expiration”: 0,
“audit_log_path”: “”
},
“ui”: {
“languages”: {
“Chinese”: “cn”,
“English”: “en”,
“Korean”: “ko”
},
“hide_help”: false,
“default_lang”: “en”,
“login_page”: {},
“nav”: {},
“uptime”: {},
“portal_section”: null,
“designer”: {},
“dont_show_admin_sockets”: false,
“dont_allow_license_management”: false,
“dont_allow_license_management_view”: false
},
“home_dir”: “/opt/tyk-dashboard”,
“identity_broker”: {
“enabled”: false,
“host”: {
“connection_string”: “http://localhost:3010”,
“secret”: “934893845123491238192381486djfhr87234827348”
}
},
“tagging_options”: {
“tag_all_apis_by_org”: false
},
“use_sharded_analytics”: false,
“enable_aggregate_lookups”: true,
“enable_analytics_cache”: false,
“aggregate_lookup_cutoff”: “01/07/2016”,
“maintenance_mode”: false,
“allow_explicit_policy_id”: false,
“private_key_path”: “”,
“node_schema_path”: “”,
“oauth_redirect_uri_separator”: “;”,
“statsd_connection_string”: “”,
“statsd_prefix”: “”,
“disable_parallel_sessions”: false,
“dashboard_session_lifetime”: 0
}

tyk.conf

{
“listen_port”: 3080,
“node_secret”: “352d20ee67be67f6340b4c0605b044b7”,
“secret”: “352d20ee67be67f6340b4c0605b044b7”,
“template_path”: “/opt/tyk-gateway/templates”,
“tyk_js_path”: “/opt/tyk-gateway/js/tyk.js”,
“use_db_app_configs”: true,
“db_app_conf_options”: {
“connection_string”: “”,
“node_is_segmented”: false,
“tags”: []
},
“disable_dashboard_zeroconf”: false,
“app_path”: “/opt/tyk-gateway/apps”,
“middleware_path”: “/opt/tyk-gateway/middleware”,
“storage”: {
“type”: “redis”,
“host”: “localhost”,
“port”: 6379,
“username”: “”,
“password”: “”,
“database”: 0,
“optimisation_max_idle”: 2000,
“optimisation_max_active”: 4000
},
“enable_analytics”: true,
“analytics_config”: {
“type”: “mongo”,
“pool_size”: 100,
“csv_dir”: “/tmp”,
“mongo_url”: “”,
“mongo_db_name”: “”,
“mongo_collection”: “”,
“purge_delay”: 100,
“ignored_ips”: [],
“enable_detailed_recording”: true,
“enable_geo_ip”: false,
“geo_ip_db_path”: “”,
“normalise_urls”: {
“enabled”: true,
“normalise_uuids”: true,
“normalise_numbers”: true,
“custom_patterns”: []
}
},
“health_check”: {
“enable_health_checks”: false,
“health_check_value_timeouts”: 60
},
“optimisations_use_async_session_write”: true,
“allow_master_keys”: false,
“policies”: {
“policy_source”: “service”,
“policy_connection_string”: “”,
“policy_record_name”: “tyk_policies”,
“allow_explicit_policy_id”: true
},
“hash_keys”: true,
“suppress_redis_signal_reload”: false,
“use_redis_log”: true,
“close_connections”: true,
“enable_non_transactional_rate_limiter”: true,
“enable_sentinel_rate_limiter”: false,
“experimental_process_org_off_thread”: true,
“local_session_cache”: {
“disable_cached_session_state”: false
},
“http_server_options”: {
“enable_websockets”: true
},
“uptime_tests”: {
“disable”: false,
“config”: {
“enable_uptime_analytics”: true,
“failure_trigger_sample_size”: 2,
“time_wait”: 10,
“checker_pool_size”: 50
}
},
“hostname”: “”,
“enable_custom_domains”: true,
“enable_jsvm”: true,
“oauth_redirect_uri_separator”: “;”,
“coprocess_options”: {
“enable_coprocess”: false,
“coprocess_grpc_server”: “”
},
“pid_file_location”: “./tyk-gateway.pid”,
“allow_insecure_configs”: true,
“public_key_path”: “”,
“close_idle_connections”: false,
“allow_remote_config”: false,
“enable_bundle_downloader”: true,
“bundle_base_url”: “”,
“global_session_lifetime”: 100,
“force_global_session_lifetime”: false,
“max_idle_connections_per_host”: 100
}

tyk-dashboard.log

e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m Using /opt/tyk-dashboard/tyk_analytics.conf for configuration
e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m Creating new Redis connection pool
e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m Adding available nodes…
e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m Tyk Analytics Dashboard v1.3.7
e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m Copyright Martin Buhr 2016
e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m https://www.tyk.io
e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m Listening on port: 3030
e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m Loading routes…
e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m Registering nodes…
e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m Adding available nodes…
e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m Creating new Redis connection pool
e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m e[36mui-notifications:e[0m Socket server started
e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m → Standard listener (http) for UI notifications
e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m → Standard listener (http) for dashboard and API
e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m Starting zeroconf heartbeat
e[90m[Jul 28 10:48:16]e[0m e[32m INFOe[0m Starting notification handler for gateway cluster
e[90m[Jul 28 10:48:19]e[0m e[31mERRORe[0m No nodes available
e[90m[Jul 28 10:54:19]e[0m e[33m WARNe[0m Login opened from: 192.168.200.28:65105
e[90m[Jul 28 10:54:21]e[0m e[33m WARNe[0m Login opened from: 192.168.200.28:65105
e[90m[Jul 28 10:54:23]e[0m e[31mERRORe[0m No nodes available
e[90m[Jul 28 10:54:23]e[0m e[33m WARNe[0m Login opened from: 192.168.200.28:65105
e[90m[Jul 28 10:54:23]e[0m e[33m WARNe[0m Login opened from: 192.168.200.28:65105
e[90m[Jul 28 10:54:25]e[0m e[33m WARNe[0m Login opened from: 192.168.200.28:65105
e[90m[Jul 28 10:54:26]e[0m e[33m WARNe[0m Login opened from: 192.168.200.28:65105
e[90m[Jul 28 10:54:28]e[0m e[31mERRORe[0m No nodes available
e[90m[Jul 28 10:58:29]e[0m e[33m WARNe[0m User pasword is empty! Please reset!
e[90m[Jul 28 10:58:29]e[0m e[32m INFOe[0m New user session created
e[90m[Jul 28 10:58:33]e[0m e[31mERRORe[0m No nodes available
e[90m[Jul 28 11:01:00]e[0m e[33m WARNe[0m Login opened from: 192.168.200.28:49289
e[90m[Jul 28 11:01:03]e[0m e[33m WARNe[0m Successful login ([email protected]) from: 192.168.200.28:49289
e[90m[Jul 28 11:06:58]e[0m e[32m INFOe[0m Using /opt/tyk-dashboard/tyk_analytics.conf for configuration
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m Creating new Redis connection pool
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m Creating new Redis connection pool
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m Creating new Redis connection pool
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m Creating new Redis connection pool
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m Adding available nodes…
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m Tyk Analytics Dashboard v1.3.7
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m Copyright Martin Buhr 2016
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m https://www.tyk.io
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m Listening on port: 3030
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m Loading routes…
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m Registering nodes…
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m Adding available nodes…
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m Creating new Redis connection pool
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m e[36mui-notifications:e[0m Socket server started
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m → Standard listener (http) for UI notifications
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m → Standard listener (http) for dashboard and API
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m Starting zeroconf heartbeat
e[90m[Jul 28 11:07:02]e[0m e[32m INFOe[0m Starting notification handler for gateway cluster
e[90m[Jul 28 11:07:03]e[0m e[32m INFOe[0m e[36mpub-sub:e[0m Got configuration for nodeID: 2f753e64-df07-4cc6-72ee-441a538cdc53|v-ubuntu
e[90m[Jul 28 11:07:06]e[0m e[32m INFOe[0m Sending config request for node: 2f753e64-df07-4cc6-72ee-441a538cdc53-v-ubuntu
e[90m[Jul 28 11:07:06]e[0m e[32m INFOe[0m e[36mpub-sub:e[0m Got configuration for nodeID: 2f753e64-df07-4cc6-72ee-441a538cdc53|v-ubuntu
ERROR 2017/07/28 11:08:34.582554 panic_handler.go:26: PANIC
URL: /api/portal/cname
ERROR: invalid input to ObjectIdHex: “”
STACK:
goroutine 1604 [running]:
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.(*Router).handlePanic(0xc4204a7380, 0xc4204b6d80, 0xc4204b6da0, 0xac1b80, 0xc4204dbb10)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:273 +0x4c6
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.(*Router).ServeHTTP.func1(0xc4204a7380, 0xc4204b6d80)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:43 +0x6f
panic(0xac1b80, 0xc4204dbb10)
/usr/local/go/src/runtime/panic.go:489 +0x2cf
github.com/TykTechnologies/tyk-analytics/vendor/gopkg.in/mgo.v2/bson.ObjectIdHex(0x0, 0x0, 0xc4204c8620, 0x0)
/src/github.com/TykTechnologies/tyk-analytics/vendor/gopkg.in/mgo.v2/bson/bson.go:176 +0x16d
main.(*OrganisationDocument).GetById(0xc4204c8620, 0x0, 0x0, 0xcb4700)
/src/github.com/TykTechnologies/tyk-analytics/ModelApiRegister.go:119 +0x9d
main.(*APIContext).SetOrgCNAME(0xc42000f6e8, 0xf879a0, 0xc4204b6d80, 0xc4204b6da0)
/src/github.com/TykTechnologies/tyk-analytics/PortalAPIMethods.go:257 +0xde
reflect.Value.call(0xae10e0, 0xc41070, 0x13, 0xbc0838, 0x4, 0xc4204e21e0, 0x3, 0x3, 0x0, 0xba8800, …)
/usr/local/go/src/reflect/value.go:434 +0x91f
reflect.Value.Call(0xae10e0, 0xc41070, 0x13, 0xc4204e21e0, 0x3, 0x3, 0x401e3e, 0xc4204e22b8, 0x6e398a4d)
/usr/local/go/src/reflect/value.go:302 +0xa4
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.middlewareStack.func1(0xf879a0, 0xc4204b6d80, 0xc4204b6da0)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:135 +0x383
main.(*APIContext).InstrumentationMW(0xc42000f6e8, 0xf879a0, 0xc4204b6d80, 0xc4204b6da0, 0xc4204db980)
/src/github.com/TykTechnologies/tyk-analytics/instrumentation_helpers.go:55 +0x94
reflect.Value.call(0xaf1f00, 0xc41020, 0x13, 0xbc0838, 0x4, 0xc4204e2798, 0x4, 0x4, 0x0, 0xaf5860, …)
/usr/local/go/src/reflect/value.go:434 +0x91f
reflect.Value.Call(0xaf1f00, 0xc41020, 0x13, 0xc4204e2798, 0x4, 0x4, 0x40, 0x0, 0xc420016000)
/usr/local/go/src/reflect/value.go:302 +0xa4
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.(*middlewareHandler).invoke(0xc4203c9b00, 0xbbf200, 0xc42000f6e8, 0x16, 0xf879a0, 0xc4204b6d80, 0xc4204b6da0, 0xc4204db980)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:155 +0x1e3
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.middlewareStack.func1(0xf879a0, 0xc4204b6d80, 0xc4204b6da0)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:144 +0x1b2
main.(*APIContext).ApiAuthorisationRequired(0xc42000f6e8, 0xf879a0, 0xc4204b6d80, 0xc4204b6da0, 0xc4204db980)
/src/github.com/TykTechnologies/tyk-analytics/Main.go:499 +0x19d
reflect.Value.call(0xaf1f00, 0xc40d78, 0x13, 0xbc0838, 0x4, 0xc4204e2e78, 0x4, 0x4, 0xc4204e2e01, 0xaf5860, …)
/usr/local/go/src/reflect/value.go:434 +0x91f
reflect.Value.Call(0xaf1f00, 0xc40d78, 0x13, 0xc4204e2e78, 0x4, 0x4, 0x0, 0xb7ca60, 0xc42000f6e0)
/usr/local/go/src/reflect/value.go:302 +0xa4
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.(*middlewareHandler).invoke(0xc4203c9ad0, 0xbbf200, 0xc42000f6e8, 0x16, 0xf879a0, 0xc4204b6d80, 0xc4204b6da0, 0xc4204db980)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:155 +0x1e3
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.middlewareStack.func1(0xf879a0, 0xc4204b6d80, 0xc4204b6da0)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:144 +0x1b2
main.DisableCacheMiddleware(0xf879a0, 0xc4204b6d80, 0xc4204b6da0, 0xc4204db980)
/src/github.com/TykTechnologies/tyk-analytics/Main.go:649 +0x94
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.(*middlewareHandler).invoke(0xc4203c8c30, 0xb7ca60, 0xc42000f6e0, 0x16, 0xf879a0, 0xc4204b6d80, 0xc4204b6da0, 0xc4204db980)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve
ERROR 2017/07/28 11:10:31.240554 panic_handler.go:26: PANIC
URL: /api/apis/597b53e4d7168901a34b9084/url
ERROR: invalid input to ObjectIdHex: “”
STACK:
goroutine 12257 [running]:
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.(*Router).handlePanic(0xc4204a7380, 0xc42064e180, 0xc42064e1a0, 0xac1b80, 0xc4202b5f60)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:273 +0x4c6
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.(*Router).ServeHTTP.func1(0xc4204a7380, 0xc42064e180)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:43 +0x6f
panic(0xac1b80, 0xc4202b5f60)
/usr/local/go/src/runtime/panic.go:489 +0x2cf
github.com/TykTechnologies/tyk-analytics/vendor/gopkg.in/mgo.v2/bson.ObjectIdHex(0x0, 0x0, 0xc4202c95e0, 0x13)
/src/github.com/TykTechnologies/tyk-analytics/vendor/gopkg.in/mgo.v2/bson/bson.go:176 +0x16d
main.(*OrganisationDocument).GetById(0xc4202c95e0, 0x0, 0x0, 0xc42037b100)
/src/github.com/TykTechnologies/tyk-analytics/ModelApiRegister.go:119 +0x9d
main.(*APIContext).GetAPIUrl(0xc42000e9d8, 0xf879a0, 0xc42064e180, 0xc42064e1a0)
/src/github.com/TykTechnologies/tyk-analytics/ApiApiManagement.go:215 +0x1f6
reflect.Value.call(0xae10e0, 0xc40e50, 0x13, 0xbc0838, 0x4, 0xc4205861e0, 0x3, 0x3, 0x0, 0xba8800, …)
/usr/local/go/src/reflect/value.go:434 +0x91f
reflect.Value.Call(0xae10e0, 0xc40e50, 0x13, 0xc4205861e0, 0x3, 0x3, 0x5, 0x7fa73728b158, 0x4509d0)
/usr/local/go/src/reflect/value.go:302 +0xa4
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.middlewareStack.func1(0xf879a0, 0xc42064e180, 0xc42064e1a0)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:135 +0x383
main.(*APIContext).InstrumentationMW(0xc42000e9d8, 0xf879a0, 0xc42064e180, 0xc42064e1a0, 0xc4202b5020)
/src/github.com/TykTechnologies/tyk-analytics/instrumentation_helpers.go:55 +0x94
reflect.Value.call(0xaf1f00, 0xc41020, 0x13, 0xbc0838, 0x4, 0xc420586798, 0x4, 0x4, 0x0, 0xaf5860, …)
/usr/local/go/src/reflect/value.go:434 +0x91f
reflect.Value.Call(0xaf1f00, 0xc41020, 0x13, 0xc420586798, 0x4, 0x4, 0x40, 0x0, 0xc420016000)
/usr/local/go/src/reflect/value.go:302 +0xa4
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.(*middlewareHandler).invoke(0xc4203c9b00, 0xbbf200, 0xc42000e9d8, 0x16, 0xf879a0, 0xc42064e180, 0xc42064e1a0, 0xc4202b5020)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:155 +0x1e3
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.middlewareStack.func1(0xf879a0, 0xc42064e180, 0xc42064e1a0)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:144 +0x1b2
main.(*APIContext).ApiAuthorisationRequired(0xc42000e9d8, 0xf879a0, 0xc42064e180, 0xc42064e1a0, 0xc4202b5020)
/src/github.com/TykTechnologies/tyk-analytics/Main.go:499 +0x19d
reflect.Value.call(0xaf1f00, 0xc40d78, 0x13, 0xbc0838, 0x4, 0xc420586e78, 0x4, 0x4, 0xc420586e01, 0xaf5860, …)
/usr/local/go/src/reflect/value.go:434 +0x91f
reflect.Value.Call(0xaf1f00, 0xc40d78, 0x13, 0xc420586e78, 0x4, 0x4, 0x0, 0xb7ca60, 0xc42000e9c8)
/usr/local/go/src/reflect/value.go:302 +0xa4
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.(*middlewareHandler).invoke(0xc4203c9ad0, 0xbbf200, 0xc42000e9d8, 0x16, 0xf879a0, 0xc42064e180, 0xc42064e1a0, 0xc4202b5020)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:155 +0x1e3
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.middlewareStack.func1(0xf879a0, 0xc42064e180, 0xc42064e1a0)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:144 +0x1b2
main.DisableCacheMiddleware(0xf879a0, 0xc42064e180, 0xc42064e1a0, 0xc4202b5020)
/src/github.com/TykTechnologies/tyk-analytics/Main.go:649 +0x94
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.(*middlewareHandler).invoke(0xc4203c8c30, 0xb7ca60, 0xc42000e9c8, 0x16, 0xf879a0, 0xc42064e180, 0xc42064e1a0, 0xc4202b5020)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve
ERROR 2017/07/28 11:11:02.955385 panic_handler.go:26: PANIC
URL: /api/apis/597b53e4d7168901a34b9084/url
ERROR: invalid input to ObjectIdHex: “”
STACK:
goroutine 12257 [running]:
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.(*Router).handlePanic(0xc4204a7380, 0xc4204b66c0, 0xc4204b66e0, 0xac1b80, 0xc4202c5bb0)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:273 +0x4c6
github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web.(*Router).ServeHTTP.func1(0xc4204a7380, 0xc4204b66c0)
/src/github.com/TykTechnologies/tyk-analytics/vendor/github.com/gocraft/web/router_serve.go:43 +0x6f
panic(0xac1b80, 0xc4202c5bb0)
/usr/local/go/src/runtime/panic.go:489 +0x2cf

Hi Peter,

setting "enable_aggregate_lookups" to true in your pump config should solve your data analytics issue.

so you are not running as a super user, you haven’t changed anything in the commands we provide and the bootstrap script has been executed without any errors ?

Thanks,
Kos @ Tyk Support Team

Ok - we’re making headway…

The bootstrap script kept crashing so what I’d done was manually create users with the API (not correctly it would appear)

When I look at bootstrap.sh, the port is hard-coded to 3000 and I need to use non standard ports (3030 and 3080) for the dashboard and gateway. This would explain why it’s crashed.
I modified the bootstrap and it ran successfully so now I have a user tied to an organization.

  • The API_URL is now showing up in the design page (only without the port number) but when I add :3080 to complete the URL is runs as expected.
  • I’m also getting analytics as I call the endpoint

The two items I still need to correct are:

  • the missing port from the “API URL”
  • the dev portal which still comes back as “Not Found” (the link under 'open your portal is my local IP:3030/ org_id/portal)

Any ideas?

You need to have a published api set up on your gateway and you need to have a portal domain configured (e.g. Myportal.local as a local host entrybin your hosts file).

You must then set the CNAME of your portal using the drop down in the developer portal menu. This will make sure that when you click the portal link it has a domain instead of a guessed local IP.

I’d strongly recommend running through all the tutorials and guides as they are before striking it on your own to make changes.

Thanks Martin -I’ll do some more reading and not keep flooding you with questions.

Your platform is exactly what I’ve been looking for and once the config is sorted out it will be perfect for combing a bunch of insecure legacy APIs into a modern interface.

cheers