Api urls always return 404 not found

I have 2 questions related to api’s.
I have setup an api inside the dashboard.
The first issue is that it gives me back an wrong url (since I use ports I expect that it would need a port to return)?
Screenshot from 2018-04-20 10-22-38

Second issue, if I visit this, with both 3000 and 8080, it always gives me a 404 or a not found.

I don’t really what to do at this point.

It’s the first time I try to setup Tyk for my research paper.

Thanks in advance

Did you follow one of the get started guides? https://tyk.io/docs/

Hello!
I followed the Centos one. I even deleted everything to start clean again. Same results.

I started from a clean system, followed the tutorials again.
Same result…

Hi
Can you share your configs

I have used all the default configs from the tutorial walk through, if those are the thing you are looking for?

I solved the error somehow by setting the portal to my fully qualified domain name and the normal dashboard to my part domainname.

However I got the same issuee as this person now:

Following the url doesn’t help. I get always a 404.

The best thing to do is to share you gateway startup logs, and your gateway/dashboard config file.

It is most likely that you are targeting the wrong host with your api requests.

Tyk-dashboard
{
“listen_port”: 3000,
“tyk_api_config”: {
“Host”: “http://localhost”,
“Port”: “8080”,
“Secret”: “352d20ee67be67f6340b4c0605b044b7”
},
“mongo_url”: “mongodb://127.0.0.1/tyk_analytics”,
“mongo_use_ssl”: false,
“mongo_ssl_insecure_skip_verify”: false,
“page_size”: 10,
“admin_secret”: “12345”,
“shared_node_secret”: “352d20ee67be67f6340b4c0605b044b7”,
“redis_port”: 6379,
“redis_host”: “localhost”,
“redis_password”: “”,
“enable_cluster”: false,
“force_api_defaults”: false,
“notify_on_change”: true,
“license_key”: “licensekeyhereremoved”,
“redis_database”: 0,
“redis_hosts”: null,
“hash_keys”: true,
“email_backend”: {
“enable_email_notifications”: false,
“code”: “”,
“settings”: null,
“default_from_email”: “”,
“default_from_name”: “”,
“dashboard_hostname”: “”
},
“hide_listen_path”: false,
“sentry_code”: “”,
“sentry_js_code”: “”,
“use_sentry”: false,
“enable_master_keys”: false,
“enable_duplicate_slugs”: true,
“show_org_id”: true,
“host_config”: {
“enable_host_names”: true,
“disable_org_slug_prefix”: true,
“hostname”: “tyk-dashboard.dsquare.intra”,
“override_hostname”: “tm-tyk”,
“portal_domains”: {},
“portal_root_path”: “/portal”,
“generate_secure_paths”: false,
“secure_cookies”: false,
“use_strict_hostmatch”: false
},
“http_server_options”: {
“use_ssl”: false,
“certificates”: [
{
“domain_name”: “”,
“cert_file”: “”,
“key_file”: “”
}
],
“min_version”: 0
},
“security”: {
“allow_admin_reset_password”: false,
“login_failure_username_limit”: 0,
“login_failure_ip_limit”: 0,
“login_failure_expiration”: 0,
“audit_log_path”: “”
},
“ui”: {
“languages”: {
“Chinese”: “cn”,
“English”: “en”,
“Korean”: “ko”
},
“hide_help”: false,
“default_lang”: “en”,
“login_page”: {},
“nav”: {},
“uptime”: {},
“portal_section”: null,
“designer”: {},
“dont_show_admin_sockets”: false,
“dont_allow_license_management”: false,
“dont_allow_license_management_view”: false
},
“home_dir”: “/opt/tyk-dashboard”,
“identity_broker”: {
“enabled”: false,
“host”: {
“connection_string”: “http://localhost:3010”,
“secret”: “934893845123491238192381486djfhr87234827348”
}
},
“tagging_options”: {
“tag_all_apis_by_org”: false
},
“use_sharded_analytics”: false,
“enable_aggregate_lookups”: true,
“enable_analytics_cache”: false,
“aggregate_lookup_cutoff”: “01/07/2016”,
“maintenance_mode”: false,
“allow_explicit_policy_id”: false,
“private_key_path”: “”,
“node_schema_path”: “”,
“oauth_redirect_uri_separator”: “;”,
“statsd_connection_string”: “”,
“statsd_prefix”: “”,
“disable_parallel_sessions”: false,
“dashboard_session_lifetime”: 0,
“alternative_dashboard_url”: “”,
“sso_permission_defaults”: null,
“sso_custom_login_url”: “”,
“sso_custom_portal_login_url”: “”,
“notifications_listen_port”: 5000,
“portal_session_lifetime”: 0
}

Logs:

Apr 25 14:31:40 tm-tyk systemd[1]: Stopping Tyk API Dashboard...
Apr 25 14:31:40 tm-tyk systemd[1]: Started Tyk API Dashboard.
Apr 25 14:31:40 tm-tyk systemd[1]: Starting Tyk API Dashboard...
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Using /opt/tyk-dashboard/tyk_analytics.conf for configuration"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="connecting to MongoDB: [127.0.0.1]"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="mongo connection established"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Creating new Redis connection pool"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Creating new Redis connection pool"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Creating new Redis connection pool"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Creating new Redis connection pool"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Adding available nodes..."
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Tyk Analytics Dashboard v1.5.4"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Copyright Martin Buhr 2016"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="https://www.tyk.io"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Listening on port: 3000"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Registering nodes..."
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Creating new Redis connection pool"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Socket server started"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="--> Standard listener (http) for UI notifications" addr=":5000"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Adding available nodes..."
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="--> Standard listener (http) for dashboard and API"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Starting zeroconf heartbeat"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Starting notification handler for gateway cluster"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Loading routes..."
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Generating portal for: tm-tyk.dsquare.intra"
Apr 25 14:31:40 tm-tyk tyk-analytics[10166]: time="Apr 25 14:31:40" level=info msg="Generating portal for: tyk.dsquare.intra"
Apr 25 14:32:08 tm-tyk tyk-analytics[10166]: time="Apr 25 14:32:08" level=error msg="No menus found"
Apr 25 14:32:08 tm-tyk tyk-analytics[10166]: time="Apr 25 14:32:08" level=error msg="No portal configuration found, please create a new portal configuratin"
Apr 25 14:32:41 tm-tyk tyk-analytics[10166]: time="Apr 25 14:32:41" level=warning msg="Login opened from: 10.2.253.248:56498"
Apr 25 14:32:47 tm-tyk tyk-analytics[10166]: time="Apr 25 14:32:47" level=warning msg="Login with invalid password for user ([email protected]) from: 10.2.253.248:56498"
Apr 25 14:32:47 tm-tyk tyk-analytics[10166]: time="Apr 25 14:32:47" level=warning msg="Successful login ([email protected]) from: 10.2.253.248:56498"
Apr 25 14:33:04 tm-tyk rsyslogd[631]: -- MARK --
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Reloading endpoints"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Reload queued"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="reload: initiating"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Loading policies"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=error msg="Couldn't unmarshal policies: read policies: is a directory"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Policies found (0 total):"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Loading API Specification from /opt/tyk-gateway/apps/app_sample.json"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Detected 1 APIs"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Preparing new router"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Initialising Tyk REST API Endpoints"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Loading API configurations."
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Tracking hostname" api_name="Tyk Test API" domain="(no host)"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Loading API" api_name="Tyk Test API"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Checking security policy: Token" api_name="Tyk Test API"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Processed and listening on: /tyk-api-test/{rest:.*}"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Loading uptime tests..."
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Initialised API Definitions"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="API reload complete"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="reload: complete"
Apr 25 14:33:30 tm-tyk tyk[1824]: time="Apr 25 14:33:30" level=info msg="Initiating coprocess reload"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="Reloading endpoints"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="Reload queued"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="reload: initiating"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="Loading policies"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=error msg="Couldn't unmarshal policies: read policies: is a directory"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="Policies found (0 total):"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="Loading API Specification from /opt/tyk-gateway/apps/app_sample.json"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="Detected 1 APIs"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="Preparing new router"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="Initialising Tyk REST API Endpoints"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="Loading API configurations."
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="Tracking hostname" api_name="Tyk Test API" domain="(no host)"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="Loading API" api_name="Tyk Test API"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="Checking security policy: Token" api_name="Tyk Test API"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="Processed and listening on: /tyk-api-test/{rest:.*}"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="Loading uptime tests..."
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="Initialised API Definitions"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="API reload complete"
Apr 25 14:35:35 tm-tyk tyk[1824]: time="Apr 25 14:35:35" level=info msg="reload: complete"

Any update here?
It’s important to include the results in the paper.
And we are running out of time to get it setup.

I have been googling and it seems this is also my problem, however this also stays without a solution.

Is here someone who knows how to solve it completly?

Hi - I believe the original poster of that github ticket had it resolved many months ago.

This appears to be a configuration issue with your setup, thanks for posting your logs, hopefully someone in the community can provide guidance based on your config.

Alternatively, if you are looking for pre-sales support/commercial support - you can contact your account manager for more details; they can outline options and connect you with a Tyk engineer, rather than rely on community members.

I have had contact with someone from Tyk customer success I guess? Some “Zane Lim”
He e-mailed me and said an engineer would look to it. We are already 5 days further.

The time for the paper, PoC and company outroll starts to be used.