I am using Glob matcher, but it does not seem to be working for me.
Below is the Fabio logs. You can see that it is adding route for /s0*and it is configured to use glob matcher.
When i access /s0/v1/call it says No route for 10.5.6.103:9999/s0/v1/call
2017/08/28 15:36:09 [INFO] Runtime config
{
"Proxy": {
"Strategy": "rnd",
"Matcher": "glob",
"NoRouteStatus": 404,
"MaxConn": 10000,
"ShutdownWait": 0,
"DialTimeout": 30000000000,
"ResponseHeaderTimeout": 0,
"KeepAliveTimeout": 0,
"FlushInterval": 1000000000,
"LocalIP": "172.20.0.6",
"ClientIPHeader": "",
"TLSHeader": "",
"TLSHeaderValue": "",
"GZIPContentTypes": null,
"RequestID": ""
},
"Registry": {
"Backend": "consul",
"Static": {
"Routes": ""
},
"File": {
"Path": ""
},
"Consul": {
"Addr": "172.20.0.5:8500",
"Scheme": "http",
"Token": "",
"KVPath": "/fabio/config",
"TagPrefix": "urlprefix-",
"Register": true,
"ServiceAddr": ":9998",
"ServiceName": "fabio",
"ServiceTags": null,
"ServiceStatus": [
"passing"
],
"CheckInterval": 1000000000,
"CheckTimeout": 3000000000,
"CheckScheme": "http",
"CheckTLSSkipVerify": false
},
"Timeout": 10000000000,
"Retry": 500000000
},
"Listen": [
{
"Addr": ":9999",
"Proto": "http",
"ReadTimeout": 0,
"WriteTimeout": 0,
"CertSource": {
"Name": "",
"Type": "",
"CertPath": "",
"KeyPath": "",
"ClientCAPath": "",
"CAUpgradeCN": "",
"Refresh": 0,
"Header": null
},
"StrictMatch": false,
"TLSMinVersion": 0,
"TLSMaxVersion": 0,
"TLSCiphers": null
}
],
"Log": {
"AccessFormat": "common",
"AccessTarget": "",
"RoutesFormat": "delta"
},
"Metrics": {
"Target": "",
"Prefix": "{{clean .Hostname}}.{{clean .Exec}}",
"Names": "{{clean .Service}}.{{clean .Host}}.{{clean .Path}}.{{clean .TargetURL.Host}}",
"Interval": 30000000000,
"GraphiteAddr": "",
"StatsDAddr": "",
"Circonus": {
"APIKey": "",
"APIApp": "fabio",
"APIURL": "",
"CheckID": "",
"BrokerID": ""
}
},
"UI": {
"Listen": {
"Addr": ":9998",
"Proto": "http",
"ReadTimeout": 0,
"WriteTimeout": 0,
"CertSource": {
"Name": "",
"Type": "",
"CertPath": "",
"KeyPath": "",
"ClientCAPath": "",
"CAUpgradeCN": "",
"Refresh": 0,
"Header": null
},
"StrictMatch": false,
"TLSMinVersion": 0,
"TLSMaxVersion": 0,
"TLSCiphers": null
},
"Color": "light-green",
"Title": "",
"Access": "rw"
},
"Runtime": {
"GOGC": 800,
"GOMAXPROCS": 8
},
"ProfileMode": "",
"ProfilePath": "/tmp"
}
2017/08/28 15:36:09 [INFO] Version 1.5.2 starting
2017/08/28 15:36:09 [INFO] Go runtime is go1.8.3
2017/08/28 15:36:09 [INFO] Metrics disabled
2017/08/28 15:36:09 [INFO] Setting GOGC=800
2017/08/28 15:36:09 [INFO] Setting GOMAXPROCS=8
2017/08/28 15:36:09 [INFO] consul: Connecting to "172.20.0.5:8500" in datacenter "smule-devbox"
2017/08/28 15:36:09 [INFO] Admin server access mode "rw"
2017/08/28 15:36:09 [INFO] Admin server listening on ":9998"
2017/08/28 15:36:09 [INFO] Waiting for first routing table
2017/08/28 15:36:09 [INFO] consul: Using dynamic routes
2017/08/28 15:36:09 [INFO] consul: Using tag prefix "urlprefix-"
2017/08/28 15:36:09 [INFO] consul: Watching KV path "/fabio/config"
2017/08/28 15:36:09 [INFO] consul: Manual config changed to #82501
2017/08/28 15:36:09 [INFO] Config updates
+ route add s0 /s0* http://172.20.0.8:6969/
2017/08/28 15:36:09 [INFO] HTTP proxy listening on :9999
2017/08/28 15:36:09 [INFO] Access logging disabled
2017/08/28 15:36:09 [INFO] Using routing strategy "rnd"
2017/08/28 15:36:09 [INFO] Using route matching "glob"
2017/08/28 15:36:09 [INFO] consul: Health changed to #82503
2017/08/28 15:36:09 [INFO] Config updates
+ route add s3 /s3 http://523d5d20cfd1:6969/ tags "" opts "strip=/s3"
+ route add s2 /s2 http://6c93dc3989bb:6969/ tags "" opts "strip=/s2"
+ route add s1 /s1 http://d584adb73de0:6969/ tags "" opts "strip=/s1"
2017/08/28 15:36:09 [INFO] consul: Registered fabio with id "fabio-d813e6a07c58-9998"
2017/08/28 15:36:09 [INFO] consul: Registered fabio with address "172.20.0.6"
2017/08/28 15:36:09 [INFO] consul: Registered fabio with tags ""
2017/08/28 15:36:09 [INFO] consul: Registered fabio with health check to "http://[172.20.0.6]:9998/health"
2017/08/28 15:36:09 [INFO] consul: Health changed to #82506
2017/08/28 15:36:09 [INFO] consul: Health changed to #82507
2017/08/28 15:36:34 [WARN] No route for 10.5.6.103:9999/s0/v1/call
I am using Glob matcher, but it does not seem to be working for me.
Below is the Fabio logs. You can see that it is adding route for
/s0*and it is configured to use glob matcher.When i access
/s0/v1/callit saysNo route for 10.5.6.103:9999/s0/v1/callFollowing is the docker command i used to start fabio:
docker run -d --name fabio --net mydockernetwork --ip 172.20.0.6 -p 9999:9999 -p 9998:9998 -v $PWD/fabio.properties:/etc/fabio/fabio.properties magiconair/fabioWhy is it not working as expected?