Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:07:17 +0000.
Sender:Bruno Melo
.
Date:Friday, 27 February 2015 19:43:58 UTC.
Hi Martin.
I’m testing Tyk and I’m facing a problem which I can’t find the solution in the available channels.
I’m using the settings as indicated in https://tyk.io/v1.5/setup/installation/, but to call the route always get 404 in response.
The following configuration files:
tyk.conf
{
“listen_port”: 5000,
“secret”: “352d20ee67be67f6340b4c0605b044b7”,
“template_path”: “/etc/tyk/templates”,
“tyk_js_path”: “/etc/tyk/js/tyk.js”,
“use_db_app_configs”: true,
“app_path”: “/etc/tyk/apps”,
“middleware_path”: “/etc/tyk/middleware”,
“storage”: {
“type”: “redis”,
“host”: “localhost”,
“port”: 6379,
“username”: “”,
“password”: “”,
“database”: 0,
“optimisation_max_idle”: 100
},
“enable_analytics”: true,
“analytics_config”: {
“type”: “csv”,
“csv_dir”: “/tmp”,
“mongo_url”: “”,
“mongo_db_name”: “”,
“mongo_collection”: “”,
“purge_delay”: 10,
“ignored_ips”: []
},
“health_check”: {
“enable_health_checks”: true,
“health_check_value_timeouts”: 60
},
“optimisations_use_async_session_write”: true
}
app_sample.json
{
“name”: “Tyk Test API”,
“api_id”: “1”,
“org_id”: “default”,
“definition”: {
“location”: “header”,
“key”: “version”
},
“use_keyless”: true,
“auth”: {
“auth_header_name”: “”
},
“version_data”: {
“not_versioned”: true,
“versions”: {
“Default”: {
“name”: “Default”,
“expires”: “3000-01-02 15:04”,
“paths”: {
“ignored”: [],
“white_list”: [],
“black_list”: []
},
“use_extended_paths”: true,
“extended_paths”: {
“ignored”: [],
“white_list”: [],
“black_list”: []
}
}
}
},
“proxy”: {
“listen_path”: “/quickstart/”,
“target_url”: “https://httpbin.org/”,
“strip_listen_path”: true
}
}
Tyk Execution
INFO[0000] No configuration file defined, will try to use default (./tyk.conf)
INFO[0000] Setting up analytics DB connection
INFO[0000] Using CSV cache purge
INFO[0000] Connecting to redis on: localhost:6379
INFO[0000] Listening on port: 5000
INFO[0000] Listening on [::]:5000
INFO[0000] Using App Configuration from Mongo DB
INFO[0000] Loading API configurations.
Call
- Hostname was NOT found in DNS cache
- Trying 127.0.0.1…
- Connected to localhost (127.0.0.1) port 5000 (#0)
GET /quickstart/get HTTP/1.1
User-Agent: curl/7.35.0
Host: localhost:5000
Accept: /
< HTTP/1.1 404 Not Found
< Content-Type: text/plain; charset=utf-8
< Date: Fri, 27 Feb 2015 19:39:08 GMT
< Content-Length: 19
<
404 page not found
- Connection #0 to host localhost left intact