Problem when changing static ip

Hi Martyn,

I had my tyk on premises installed in a hyper-v VM. It was working just fine. I had to move my VM to another host machine in a different location. So when i restored the VM to the new host server and started it, i proceed in changing the static ip. Before changing the ip I stopped tyk-gateway, tyk-dashboard and tyk-pump services.
After restarting all services i entered the tyk-dashboard site where everything appeared fine.
Then I discovered all kind of problems.
Firstly i coundn’t add a new key. The message after submitting a new key was that ‘Failed to save new user object to Tyk’.
Error logs of tyk-dashoboard:
time=“Oct 1 23:43:06” level=info msg=“Tyk Analytics Dashboard v1.4.2”
time=“Oct 1 23:43:06” level=info msg=“Copyright Martin Buhr 2016”
time=“Oct 1 23:43:06” level=info msg=“https://www.tyk.io
time=“Oct 1 23:43:06” level=info msg=“Listening on port: 3000”
time=“Oct 1 23:43:06” level=info msg=“Loading routes…”
time=“Oct 1 23:43:06” level=info msg=“Generating portal for: developers.ilsp.gr”
time=“Oct 1 23:43:06” level=info msg=“Registering nodes…”
time=“Oct 1 23:43:06” level=info msg=“Creating new Redis connection pool”
time=“Oct 1 23:43:06” level=info msg=“Adding available nodes…”
time=“Oct 1 23:43:06” level=info msg=“Socket server started”
time=“Oct 1 23:43:06” level=info msg="–> Standard listener (http) for UI notifications"
time=“Oct 1 23:43:06” level=info msg="–> Standard listener (http) for dashboard and API"
time=“Oct 1 23:43:06” level=info msg=“Starting zeroconf heartbeat”
time=“Oct 1 23:43:06” level=info msg=“Starting notification handler for gateway cluster”
time=“Oct 1 23:43:33” level=warning msg=“Login opened from: 195.251.3.6:56512”
time=“Oct 1 23:43:37” level=warning msg=“Login opened from: 195.251.3.6:56512”
time=“Oct 1 23:43:37” level=warning msg=“Login opened from: 195.251.3.6:56512”
time=“Oct 1 23:43:40” level=warning msg=“Successful login ([email protected]) from: 195.251.3.6:56512”
time=“Oct 1 23:45:01” level=error msg=“Failed to get certificates: Get http://tyk.ilsp.gr:80/tyk/certs/?org_id=56c7ab41f61ed7075a000001: dial tcp 192.168.188.84:80: getsockopt: connection timed out”
time=“Oct 1 23:45:34” level=error msg=“Failed to create key”
time=“Oct 1 23:45:34” level=error msg=“Post http://tyk.ilsp.gr:80/tyk/keys/newmasterkey: dial tcp 192.168.188.84:80: getsockopt: connection timed out”
time=“Oct 1 23:45:34” level=error msg=“Failed to save new user object to Tyk”
The problem is the bolded ip. Its the old ip. This ip is not appearing in the tyk-analytics.conf file. How can it be updated to the new one.

Another problem related to the changed ip is with the tyk-gateway. Since the change, no API request is served.
Error logs of tyk-gateway:
time=“Oct 1 23:43:14” level=info msg=“Initialising Tyk REST API Endpoints”
time=“Oct 1 23:43:14” level=info msg="–> Standard listener (http)" port=":80"
time=“Oct 1 23:43:14” level=info msg=“Setting up Server”
time=“Oct 1 23:43:14” level=info msg=“Registering node.”
time=“Oct 1 23:43:16” level=warning msg=“Insecure configuration detected (allowing)!”
time=“Oct 1 23:43:19” level=error msg=“Request failed with error Get http://tyk.ilsp.gr:3000/register/node: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers); retrying in 5s”
time=“Oct 1 23:43:29” level=error msg=“Request failed with error Get http://tyk.ilsp.gr:3000/register/node: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers); retrying in 5s”
time=“Oct 1 23:43:39” level=error msg=“Request failed with error Get http://tyk.ilsp.gr:3000/register/node: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers); retrying in 5s”
time=“Oct 1 23:43:49” level=error msg=“Request failed with error Get http://tyk.ilsp.gr:3000/register/node: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers); retrying in 5s”
time=“Oct 1 23:43:59” level=error msg=“Request failed with error Get http://tyk.ilsp.gr:3000/register/node: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers); retrying in 5s”
and this is keep repeating every 5 secs.

I am running tyk-gateway 2.4.2, tyk-dashboard 1.4.2 and tyk-pump 0.4.2.

Any clues of how to deal with this problem? I enclose my tyk.conf and tyk-dashboard.

tyk.conf
{
“listen_port”: 80,
“node_secret”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,
“secret”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,
“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”: “http://tyk.ilsp.gr:3000”,
“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”: “127.0.0.1”,
“port”: 6379,
“username”: “”,
“password”: “”,
“database”: 0,
“optimisation_max_idle”: 2000,
“optimisation_max_active”: 4000
},
“enable_analytics”: true,
“analytics_config”: {
“type”: “mongo”,
“ignored_ips”: [],
“enable_detailed_recording”: true,
“enable_geo_ip”: true,
“geo_ip_db_path”: “/usr/share/GeoIP”,
“normalise_urls”: {
“enabled”: true,
“normalise_uuids”: true,
“normalise_numbers”: true,
“custom_patterns”: []
},
“pool_size”: 100
},
“health_check”: {
“enable_health_checks”: true,
“health_check_value_timeouts”: 60
},
“optimisations_use_async_session_write”: true,
“allow_master_keys”: true,
“policies”: {
“policy_source”: “service”,
“policy_connection_string”: “http://tyk.ilsp.gr:3000”,
“policy_record_name”: “tyk_policies”,
“allow_explicit_policy_id”: false
},
“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
}

And my tyk-analytics.conf file:
{
“listen_port”: 3000,
“tyk_api_config”: {
“Host”: “http://127.0.0.1”,
“Port”: “80”,
“Secret”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
},
“mongo_url”: “mongodb://127.0.0.1:27017/tyk_analytics”,
“shared_node_secret”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,
“license_key”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,
“page_size”: 10,
“admin_secret”: “12345”,
“redis_port”: 6379,
“redis_host”: “localhost”,
“redis_password”: “”,
“force_api_defaults”: false,
“notify_on_change”: true,
“license_owner”: “R.C. Athena”,
“hash_keys”: true,
“email_backend”: {
“enable_email_notifications”: true,
“code”: “mailgun”,
“settings”: {
“Domain”: “tyk.ilsp.gr”,
“PrivateKey”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,
“PublicKey”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
},
“default_from_email”: “[email protected]”,
“default_from_name”: “Tyk Mail Service”,
“dashboard_hostname”: “”
},
“hide_listen_path”: false,
“use_sentry”: false,
“sentry_code”: “”,
“sentry_js_code”: “”,
“show_org_id”: true,
“enable_duplicate_slugs”: true,
“host_config” : {
“override_hostname”: “tyk.ilsp.gr”,
“disable_org_slug_prefix”: true,
“enable_host_names”: true,
“hostname”: “”,
“portal_domains”: {},
“portal_root_path”: “/portal”
},
“http_server_options”: {
“use_ssl”: false,
“certificates”: [
{}
]
},
“ui”: {
“login_page”: {},
“nav” : {},
“uptime”: {},
“portal”: {},
“designer”: {},
“languages”: {
“English”: “en”,
“Chinese”: “cn”,
“Korean”: “ko”
},
“default_lang”: “en”
},
“home_dir”: “/opt/tyk-dashboard”,
“identity_broker”: {
“enabled”: true,
“host”: {
“connection_string”: “http://127.0.0.1:3010”,
“secret”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
}
},
“enable_aggregate_lookups”: true,
“aggregate_lookup_cutoff”: “01/07/2016”,
“oauth_redirect_uri_separator”: “;”,
“private_key_path”: “”
}