Docker installation Tyk On-Premises, Request API URL: Failed to get certificates(solved)

Hello,
I have use docker to installation Tyk On-Premises, following this tuto: //tyk.io/docs/tyk-on-premises/docker/,
have started the Tyk gateway containers, tyk dashboard container and tyk pump containers.

can Create APIs successfully, save in mongo db server. but Open the API, found the tyk dashboard log have error as follow:

level=info msg=“Using /opt/tyk-dashboard/tyk_analytics.conf for configuration”
level=warning msg=“Default tyk_api_config.secret 352d20ee67be67f6340b4c0605b044b7 should be changed for production use.”
level=warning msg=“Default admin_secret 12345 should be changed for production use.”
level=warning msg=“Default shared_node_secret 352d20ee67be67f6340b4c0605b044b7 should be changed for production use.”
level=info msg=“connecting to MongoDB: [mongo:27017]”
level=info msg=“mongo connection established”
level=info msg=“Creating new Redis connection pool”
level=info msg=“Creating new Redis connection pool”
level=info msg=“Creating new Redis connection pool”
level=info msg=“Creating new Redis connection pool”
level=info msg=“Adding available nodes…”
level=info msg=“Tyk Analytics Dashboard v1.7.3”
level=info msg=“Copyright Martin Buhr 2016”
level=info msg=“https://www.tyk.io
level=info msg=“Listening on port: 3000”
level=info msg=“Registering nodes…”
level=info msg=“Adding available nodes…”
level=info msg=“Creating new Redis connection pool”
level=info msg=“Socket server started”
level=info msg=“–> Standard listener (http) for UI notifications” addr=“:5000”
level=info msg=“–> Standard listener (http) for dashboard and API”
level=info msg=“Starting zeroconf heartbeat”
level=info msg=“Starting notification handler for gateway cluster”
level=info msg=“Loading routes…”
level=error msg=“Failed to get certificates: Get http://tyk_dashboard:8080/tyk/certs/?org_id=5bf3d8a0de0a680001cddf39: dial tcp: lookup tyk_dashboard on 10.4.1.1:53: server misbehaving”
level=error msg=“Failed to get certificates: Get http://tyk_dashboard:8080/tyk/certs/?org_id=5bf3d8a0de0a680001cddf39: dial tcp: lookup tyk_dashboard on 10.4.1.1:53: server misbehaving”
level=warning msg=“Login opened from: 172.17.0.1:40234”
level=warning msg=“Successful login ([email protected]) from: 172.17.0.1:40234”
level=error msg=“Failed to get certificates: Get http://tyk_dashboard:8080/tyk/certs/?org_id=5bf3d8a0de0a680001cddf39: dial tcp: lookup tyk_dashboard on 10.4.1.1:53: server misbehaving”
level=error msg=“Failed to get certificates: Get http://tyk_dashboard:8080/tyk/certs/?org_id=5bf3d8a0de0a680001cddf39: dial tcp: lookup tyk_dashboard on 10.4.1.1:53: server misbehaving”
level=error msg=“Failed to get certificates: Get http://tyk_dashboard:8080/tyk/certs/?org_id=5bf3d8a0de0a680001cddf39: dial tcp: lookup tyk_dashboard on 10.4.1.1:53: server misbehaving”
level=error msg=“Failed to get certificates: Get http://tyk_dashboard:8080/tyk/certs/?org_id=5bf3d8a0de0a680001cddf39: dial tcp: lookup tyk_dashboard on 10.4.1.1:53: server misbehaving”

How can i fix this error?

the tyk_analytics.conf file data as follow:
{
“listen_port”: 3000,
“tyk_api_config”: {
“Host”: “http://tyk_dashboard”,
“Port”: “8080”,
“Secret”: “352d20ee67be67f6340b4c0605b044b7”
},
“shared_node_secret”: “352d20ee67be67f6340b4c0605b044b7”,
“mongo_url”: “mongodb://mongo:27017/tyk_analytics”,
“license_key”: “eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhbGxvd2VkX25vZGVzIjoiMDZmMzIyZjEtYWQ2Yi00MzcwLTZiODItZDMxNDI2YzlhNjFmIiwiZXhwIjoxNTc0MjQxNzUzLCJvd25lciI6IjViZjNjYTkxNDVmOTJlMDg4ZmFjNjJmMiJ9.JcfXbfXV5Oqa1_-scP69QoSIcbfh31IajvuuBJ7NTTK5pTjO1CJuxjUfNP_2Y7WupeS0Ri1YJQMSywdW5yOc6R6SaUTipAloFyX7i9SSWXkjovCmMS895IM84y6U_T_6ocKa-uA8as6Gas2SV-zbAYMlZ9VAN81TjkwXUiH_5Mu3jX_xWMFxfkk3MbNB42HbZE1BJceCx-4di3YL6uuCg–qULqA9bM6m-GjsTCl6J3TIEQGVpb9QkckON-h2iPk-xGugHgxA5dX_IWUd8YR9v1DNBB6uGzAQcZqHc4WeDGK0OlOQGyWM_XIXU0V1KVFxI3NrHZK8pdTrHWfrk28Hw”,
“page_size”: 10,
“admin_secret”: “12345”,
“redis_port”: 6379,
“redis_host”: “redis”,
“redis_password”: “”,
“force_api_defaults”: false,
“notify_on_change”: true,
“license_owner”: “NA”,
“hash_keys”: true,
“email_backend”: {},
“hide_listen_path”: false,
“use_sentry”: false,
“sentry_code”: “”,
“sentry_js_code”: “”,
“show_org_id”: true,
“enable_duplicate_slugs”: true,
“host_config” : {
“override_hostname”: “”,
“disable_org_slug_prefix”: true,
“enable_host_names”: true,
“hostname”: “dashboard.tyk.docker”,
“portal_domains”: {},
“portal_root_path”: “/portal”
},
“http_server_options”: {
“use_ssl”: false,
“certificates”: [
{}
]
},
“ui”: {
“login_page”: {},
“nav” : {},
“uptime”: {},
“portal”: {},
“designer”: {}
},
“home_dir”: “/opt/tyk-dashboard”,
“enable_aggregate_lookups”: true,
“aggregate_lookup_cutoff”: “01/07/2016”
}

tyk.conf file as follow:
{
“listen_port”: 8080,
“secret”: “352d20ee67be67f6340b4c0605b044b7”,
“template_path”: “/opt/tyk-gateway/templates”,
“tyk_js_path”: “/opt/tyk-gateway/js/tyk.js”,
“middleware_path”: “/opt/tyk-gateway/middleware”,
“use_db_app_configs”: false,
“app_path”: “/opt/tyk-gateway/apps/”,
“storage”: {
“type”: “redis”,
“host”: “redis”,
“port”: 6379,
“username”: “”,
“password”: “”,
“database”: 0,
“optimisation_max_idle”: 2000,
“optimisation_max_active”: 4000
},
“enable_analytics”: false,
“analytics_config”: {
“type”: “csv”,
“csv_dir”: “/tmp”,
“mongo_url”: “”,
“mongo_db_name”: “”,
“mongo_collection”: “”,
“purge_delay”: -1,
“ignored_ips”: []
},
“health_check”: {
“enable_health_checks”: true,
“health_check_value_timeouts”: 60
},
“optimisations_use_async_session_write”: true,
“enable_non_transactional_rate_limiter”: true,
“enable_sentinel_rate_limiter”: false,
“allow_master_keys”: false,
“policies”: {
“policy_source”: “file”,
“policy_record_name”: “/opt/tyk-gateway/policies/policies.json”
},
“hash_keys”: true,
“close_connections”: false,
“http_server_options”: {
“enable_websockets”: true
},
“allow_insecure_configs”: true,
“coprocess_options”: {
“enable_coprocess”: true,
“coprocess_grpc_server”: “”
},
“enable_bundle_downloader”: true,
“bundle_base_url”: “”,
“global_session_lifetime”: 100,
“force_global_session_lifetime”: false,
“max_idle_connections_per_host”: 500
}

tyk dashboard container name is :tyk_dashboard, tyk gateway container name is:tyk_gateway.

when run tyk gateway container use the command as follow:
docker run -d --name tyk_gateway -p 8081:8080 --link tyk_redis:redis -v $(pwd)/tyk-gateway/tyk.standalone.conf:/opt/tyk-gateway/tyk.conf -v $(pwd)/tyk-gateway/apps:/opt/tyk-gateway/apps tykio/tyk-gateway

when run tyk dashboard container use the command as follow:
docker run –d --name tyk_dashboard -p 3000:3000 --link tyk_redis:redis --link tyk_mongo:mongo --link tyk_gateway:tyk_gateway -v /opt/tyk-dashboard/tyk_analytics.with_mongo_and_gateway.conf:/opt/tyk-dashboard/tyk_analytics.conf tykio/tyk-dashboard

I have solved the error: change the tyk_analtics.conf file
“tyk_api_config”: {
“Host”: “http://tyk_gateway”,
“Port”: “8080”,
“Secret”: “352d20ee67be67f6340b4c0605b044b7”
}
but, when test api key URL ,found that: Docker Quickstart guide have error for save api data.

then follow the tyk pro docker demo of guide:1, test result is ok.

test Api key data as:
[root@localhost tyk-pro-docker-demo]# curl -X GET -H ‘Authorization: 5bf6205a770b880001d29f22cd6235ad60914fe7ac1fb25401ea6e3d’ -i ‘http://www.tyk-test.com:8080/doc-typ-api1
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Length: 340
Content-Type: application/json
Date: Thu, 22 Nov 2018 05:55:24 GMT
Server: gunicorn/19.9.0
Vary: Origin
Via: 1.1 vegur
X-Ratelimit-Limit: -1
X-Ratelimit-Remaining: -1
X-Ratelimit-Reset: 1542865665

{
“args”: {},
“headers”: {
“Accept”: “/”,
“Accept-Encoding”: “gzip”,
“Authorization”: “5bf6205a770b880001d29f22cd6235ad60914fe7ac1fb25401ea6e3d”,
“Connection”: “close”,
“Host”: “httpbin.org”,
“User-Agent”: “curl/7.29.0”
},
“origin”: “172.24.0.1, 218.17.142.44”,
“url”: “http://httpbin.org/get
}