Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not able to acces the service via fabio. #319

Closed
plkumar opened this issue Jul 7, 2017 · 8 comments
Closed

not able to acces the service via fabio. #319

plkumar opened this issue Jul 7, 2017 · 8 comments

Comments

@plkumar
Copy link

plkumar commented Jul 7, 2017

Hi,

I'm new to Fabio and Consul, I'm able to successfully register service, and I could see the service listed on Fabio GUI, but I'm not able to access the service. I always receive 404.

Log:
+++++++++++++++++++++

2017/07/07 17:02:47 [INFO] consul: Using dynamic routes
2017/07/07 17:02:47 [INFO] consul: Using tag prefix "urlprefix-"
2017/07/07 17:02:47 [INFO] consul: Watching KV path "/fabio/config"
2017/07/07 17:02:47 [INFO] consul: Manual config changed to #1
2017/07/07 17:02:47 [INFO] HTTP proxy listening on :9999
2017/07/07 17:02:47 [INFO] Access logging disabled
2017/07/07 17:02:47 [INFO] Using routing strategy "rnd"
2017/07/07 17:02:47 [INFO] Using route matching "prefix"
2017/07/07 17:02:47 [INFO] consul: Registered fabio with id "fabio-hyd-lpeethani1-9998"
2017/07/07 17:02:47 [INFO] consul: Registered fabio with address "10.71.163.4"
2017/07/07 17:02:47 [INFO] consul: Registered fabio with tags ""
2017/07/07 17:02:47 [INFO] consul: Registered fabio with health check to "http://[10.71.163.4]:9998/health"
2017/07/07 17:02:47 [INFO] consul: Health changed to #100
2017/07/07 17:02:48 [INFO] consul: Health changed to #101
2017/07/07 17:03:04 [INFO] consul: Health changed to #103
2017/07/07 17:03:04 [INFO] Config updates
+ route add DataService plk.me/dataservice http://localhost:5000/
2017/07/07 17:03:17 [INFO] consul: Health changed to #104
2017/07/07 17:03:17 [INFO] consul: Health changed to #105
2017/07/07 17:03:35 [WARN] No route for plk.me:9999/dataservice/values
2017/07/07 17:03:38 [WARN] No route for plk.me:9999/dataservice/values
2017/07/07 17:03:55 [WARN] No route for plk.me:9999/dataservice/values
2017/07/07 17:04:01 [WARN] No route for plk.me:9999/dataservice/values
2017/07/07 17:04:30 [WARN] No route for plk.me:9999/plk.me/dataservice/values
2017/07/07 17:04:37 [WARN] No route for plk.me:9999/plk.me/dataservice/values
2017/07/07 17:04:54 [INFO] consul: Health changed to #112
2017/07/07 17:04:54 [INFO] consul: Health changed to #113
2017/07/07 17:06:03 [INFO] consul: Health changed to #119
2017/07/07 17:06:03 [INFO] consul: Health changed to #120
2017/07/07 17:07:14 [INFO] consul: Health changed to #126
2017/07/07 17:07:14 [INFO] consul: Health changed to #127
2017/07/07 17:08:05 [WARN] No route for 127.0.0.1:9999/plk.me/dataservice/values
2017/07/07 17:08:18 [WARN] No route for 127.0.0.1:9999/dataservice/values
2017/07/07 17:08:19 [INFO] consul: Health changed to #131
2017/07/07 17:08:19 [INFO] consul: Health changed to #132
2017/07/07 17:08:22 [WARN] No route for 127.0.0.1:9999/dataservice/values
2017/07/07 17:08:28 [WARN] No route for 127.0.0.1:9999/dataservice/values
@plkumar
Copy link
Author

plkumar commented Jul 7, 2017

screenshot

@magiconair
Copy link
Contributor

This is your problem:

+ route add DataService plk.me/dataservice http://localhost:5000/
2017/07/07 17:03:35 [WARN] No route for plk.me:9999/dataservice/values

You register a route for plk.me/dataservice/values but access it as plk.me:9999/dataservice/values which does not match.

@plkumar
Copy link
Author

plkumar commented Jul 7, 2017

I changed the tags and updated the source, but I'm still seeing 404.

screenshot

What am i doing wrong here.

@magiconair
Copy link
Contributor

What does the log say now? You can also try this:

https://github.com/fabiolb/fabio/wiki/Features#request-tracing

@plkumar
Copy link
Author

plkumar commented Jul 7, 2017

here is how the trace looks.

$ curl -v -H 'Trace: abc' -H 'Host: plk.me' 'http://plk.me:9999/dataservice/values'

  • timeout on name lookup is not supported
  • Trying 127.0.0.1...
  • TCP_NODELAY set
  • Connected to plk.me (127.0.0.1) port 9999 (#0)

GET /dataservice/values HTTP/1.1
Host: plk.me
User-Agent: curl/7.51.0
Accept: /
Trace: abc

< HTTP/1.1 404 Not Found
< Date: Fri, 07 Jul 2017 12:37:25 GMT
< Content-Length: 0
< Content-Type: text/plain; charset=utf-8
<

  • Curl_http_done: called premature == 0
  • Connection #0 to host plk.me left intact

@plkumar
Copy link
Author

plkumar commented Jul 7, 2017

BTW, with the url "http://plk.me:9999/dataservice/values" nothing is being logged in the Fabio log, does it mean the routing is working, but i still see 404.

but if i access the service directly, it is working.

@plkumar
Copy link
Author

plkumar commented Jul 7, 2017

i found the, issue, it is something to do with my ASP.NET WebApi routing, fixed it.

Thanks
Lakshman

@plkumar plkumar closed this as completed Jul 7, 2017
@magiconair
Copy link
Contributor

Glad you've found it :) Let me know if there are other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants