Tyk Portal missing

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:33:56 +0000.
Sender:Christophe Lablancherie.
Date:Tuesday, 8 December 2015 14:22:38 UTC.

Hi,

I followed all the steps of turoriel about installing TYK . Everything works, except portal.
When I try to access the portal from the " back office " , I get an error that says " Not Found" . I tried to set up the portal by registering my domain name , in the form provided for this summer , but it does not change …

Someone can help me ?

Christophe

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 8 December 2015 14:29:34 UTC.

Hi Christophe,

Can you confirm:

  • How you installed Tyk (Ubuntu / RPM / Docker)?
  • Which tutorial (can you provide the link)

The portal setup is different for docker and for standard install, so there’s probably something you are missing - e.g., accessing it on port 3000 instead of 80 :slight_smile:

Cheers,
Martin

Imported Google Group message.
Sender:Christophe Lablancherie.
Date:Tuesday, 8 December 2015 14:34:00 UTC.

Hi Martin,

I had installed Tyk on Ubuntu 14.04.
I followed the tutorial on your website :

https://tyk.io/v1.9/setup/install-tyk-ubuntu/ (first)
https://tyk.io/v1.9/tutorial/set-up-first-api/ (second)
https://tyk.io/v1.9/tutorial/set-up-portal-api/ (third)
This is my portal url : http://vps219765.ovh.net:3000/portal (i’ tried also with http://vps219765.ovh.net/portal to test the port 80 and i had a 504 gateway_timeout error.) and i had a Not Found error…

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 8 December 2015 14:37:49 UTC.

Hi Christophe,

And when you used the drop down, you set the portal domain to vps219765.ovh.net and it was successful (as in, the alert siad the name was changed - followed by a refresh of the page)?

Cheers,
Martin

Imported Google Group message.
Sender:Christophe Lablancherie.
Date:Tuesday, 8 December 2015 14:42:13 UTC.

Yes, when i set the portail domain, the alert said “updated” and the page was refreshed.

Regards,
Christophe

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 8 December 2015 14:51:40 UTC.

Hi Christophe,

Ok so the issue there is that the portal will need to be on it’s own hostname, so you’ll need to assign it a host name some how. the dashboard “owns” the natural hostname vps219765.ovh.net and basically, when you are hitting “/portal” it’s asking the dashboard, not the portal, for the URL and failing.

If you are just testing, you can add an entry for the IP to your hosts file, e.g.

51.254.102.19 myportal.com

And then go to myportal.com:3000/portal/

Otherwise you’ll need to set a DNS hostname with a domain somewhere to point at your IP so that you can bind to that.

Alternatively, you can bind the dashboard to a hostname (tyk_analytics.conf → host_config → hostname), then the “natural” hostname (vps219765.ovh.net) will be free for the portal to bind to (you could add the dashboard “fake” hostname to your hosts file then).

Will need to update the docks to make that a bit clearer.

Let me know if that helps.

Cheers,
Martin

1 Like

Imported Google Group message.
Sender:Christophe Lablancherie.
Date:Tuesday, 8 December 2015 15:11:37 UTC.

Hum, i’ve write 51.254.102.19 myportal.com in /etc/hosts file. The domain name doesn’t exist so i can’t access to the portal. Maybe it’s a special configuration of OVH ?

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 8 December 2015 15:21:54 UTC.

Hi Christophe,

Could be - how would you assign a domain name to an OVH server normally?

Surely you should be able to create an A record, which is the same as entering an IP in the hosts file.

I just added that host/ip to my hosts file and when I access: http://myportal.com:3000/portal I get a 404 page not found error, which is very likely being thrown by Tyk Dashboard, so the hosts hack is working for me (OSX), what OS are you running?

Also, you’ll need to set the domain up to use myportal.com in the dashboard for it to bind.

Lastly, have you changed any configs in tyk_analytics.conf at all?

Cheers,
Maritn

Imported Google Group message.
Sender:Christophe Lablancherie.
Date:Tuesday, 8 December 2015 15:38:35 UTC.

I configured the hosts file using SSH to connect on the virtual private server to ovh.

But in fact, it could’nt work, because the domain name doesnt exist for a registar (myportal.com) right ? When i hit on “Open portal” after set “myportal.com” it’s writ thath domain doesn’t exist…
I’m on Windows SEVEN ou Mac OS X (mavericks).

I don’'t do the changes on tyk_analytics.conf at all.

Regards,
Christophe

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 8 December 2015 15:53:38 UTC.

Hi Christophe,

I see - the hosts file needs to be edited on your machine, that way your browser, when it does the lookup for the domain, will resolve it using the hosts file instead of DNS, so while this won’t work for any other machine it will work for yours.

So on Windows, it’s under C:\Windows\System32\drivers\etc\hosts
On OSX it’s under /etc/hosts

I think they have the same structure.

So you edit the file locally, then your system is tricked into thinking the domain name exists for the IP address even though in reality it would never resolve.

I would also remove it from the hosts file in the VPS, as you’re trickin that machine into thinking the domain name is that IP address, which it shouldn’t need at all.

Cheers,
Martin

Imported Google Group message.
Sender:Christophe Lablancherie.
Date:Tuesday, 8 December 2015 16:17:43 UTC.

Oh sure -_-’ , i’m so stupid.
I will try this tonight, i will come back to you thanks for your time martin :slight_smile:

regards,
Christophe

  • show quoted text -

Imported Google Group message.
Sender:Damoure.
Date:Wednesday, 9 December 2015 13:05:18 UTC.

Hi,

I had installed Tyk Docker, and i have the same problem with the portal.

I followed the tutorial and just changed the portal domain name.

Any idea ?

Regards

Adamou

Le mardi 8 décembre 2015 16:53:38 UTC+1, Martin Buhr a écrit :

  • show quoted text -