Failed to register node


#1

I’ve got message “Failed to register node, retrying in 5s” on upstart tyk-gateway log.

I’m using Tyk Gateway v2.0 and Tyk Dashboard v1.0 and I’m getting this error with following configurations on tyk.conf:

“use_db_app_configs”: true,
“db_app_conf_options”: {
“connection_string”: “http://127.0.0.1:3000”,
“node_is_segmented”: false,
“tags”: []
},


#2

Have you added your license to the dashboard?


#3

Yes. I have solved it already.
It was missing “node_secret” on tyk.conf and “shared_node_secret” on tyk_analytics.conf.

Thanks!


#4

I have done what you said,but it still load this error message


#5

This error means that either the gateway can’t see the dashboard, or the dashboard license is not active.

You’lll see errors in the dashboard logs of the gateways are connecting by failing.


#6

Is there any way to debug if it’s the license? I can ping/curl the dashboard from my gateway but I’m getting this error too.
EDIT: maybe debug logging will show me, should have done that first :slight_smile:

EDIT 2: Now I’m seeing Response was: {\"Status\":\"Error\",\"Message\":\"No nodes available\",\"Meta\":null}\n in the gateway debug logs, does that mean the license is invalid?


#7

The license is valid, but you either have more than one started, or you have restarted on in the cooldown window.

Best way to manage:

  1. Stop both services
  2. Wait 20s
  3. Add the license to the gateway conf file
  4. Start the dashboard
  5. Start the gateway

If you are constantly taking the gateway node up and down, then it will try to connect over and over again it should resolve itself after about 20s.


#8

I followed your steps and am now seeing: No connection string or node ID present. Failing.


#9

Ok, so your configuration is off - did you upgrade from 1.9?

If so, you will need to make some changes to your configurations:

https://tyk.io/docs/tyk-api-gateway-v-2-0/upgrading-to-tyk-v2-0/


#10

Right you are, I hadn’t changed the second policy key, now seems to work!