Gateway 404 error connecting to Dashboard


#1

Can someone explain to me in detail why I need two different host names on the same host for both the Dashboard and Gateway to work together.

Configure Tyk Gateway with the Dashboard
Prerequisites
This configuration assumes that you have already installed Tyk Dashboard, and have decided on 
the domain names for your Dashboard and your Portal. They must be different. For testing 
purposes, it is easiest to add hosts entries to your (and your servers) /etc/hosts file.

What is relying on these two different local host names?
How does that work exactly?

The reason I ask is because the gateway is displaying the following when I try and set it up…

Jun 28 13:35:05 apigateway tyk[38385]: time="Jun 28 13:35:05" level=info msg="Redis connection pools are ready after number of retires" currRetry=0
Jun 28 13:35:05 apigateway tyk[38385]: time="Jun 28 13:35:05" level=info msg="Redis connection pools are ready"
Jun 28 13:35:05 apigateway tyk[38385]: time="Jun 28 13:35:05" level=info msg="--> Standard listener (http)" port=":8080"
Jun 28 13:35:05 apigateway tyk[38385]: time="Jun 28 13:35:05" level=info msg="Setting up Server"
Jun 28 13:35:05 apigateway tyk[38385]: time="Jun 28 13:35:05" level=info msg="Waiting for zeroconf signal..."
Jun 28 13:35:05 apigateway tyk[38385]: time="Jun 28 13:35:05" level=info msg="Starting Poller"
Jun 28 13:35:06 apigateway tyk[38385]: time="Jun 28 13:35:06" level=warning msg="Insecure configuration detected (allowing)!"
Jun 28 13:35:06 apigateway tyk[38385]: time="Jun 28 13:35:06" level=info msg="Hostname set with dashboard zeroconf signal"
Jun 28 13:35:07 apigateway tyk[38385]: time="Jun 28 13:35:07" level=info msg="Registering node."
Jun 28 13:35:07 apigateway tyk[38385]: time="Jun 28 13:35:07" level=error msg="Response failed with code 404; retrying in 5s"

Here is my setup…

Listen Port   = 3000
Redis Host    = apidashboard
Redis Port    = 6379
Redis PW      =
Mongo URL     = mongodb://127.0.0.1/tyk_analytics
API Hostname  = apigateway
Tyk Node      = http://apidashboard
Tyk Port      = 8080
Dash Hostname = apidashboard
Portal Root   = /portal

/opt/tyk-dashboard/install/setup.sh --listenport=3000 --redishost=apidashboard --redisport=6379 --mongo=mongodb://127.0.0.1/tyk_analytics --tyk_api_hostname=$HOSTNAME --tyk_node_hostname=http://apidashboard --tyk_node_port=8080 --portal_root=/portal --domain="apidashboard"

/opt/tyk-gateway/install/setup.sh --dashboard=1 --listenport=8080 --redishost=apigateway --redisport=6379

#2

Solution was to disable selinux