rohitghatol / spring-boot-microservices

Spring Boot Template for Micro services Architecture - Show cases how to use Zuul for API Gateway, Spring OAuth 2.0 as Auth Server, Multiple Resource (Web Services) Servers, Angular Web App, Eureka dor registration and Discover and Hystrix for circuit breaker
Apache License 2.0
1.77k stars 919 forks source link

Unable to run project in localhost #12

Open sakibulhasan opened 8 years ago

sakibulhasan commented 8 years ago

I am trying to run the project at my local machine. I have my local MySQL server up and running in my local machine and here is the link of my config to support my local environment https://github.com/sakibulhasan/spring-cloud-config. I managed to run all 8 applications. Now while Im trying to click on the login link in web-portal it is throwing the following error. It looks like an issue with api-gateway but I have no idea whats the issue is.

error:

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Wed Aug 17 09:36:14 EDT 2016 There was an unexpected error (type=Not Found, status=404). No message available

wallishuang commented 8 years ago

I have the same problem with this.... any solution???

sakibulhasan commented 8 years ago

you gotta hit 8765 port which is the port for gateway which redirects to web portal app

chensean2 commented 8 years ago

Hi, shall i know whether this issue has fixed? i have the same problem, when access user/task api via 8765, it is OK. but couldn't access web-portal's htmls, i am a learner on spring microservice, and has no idea, any one can help? thx

sakibulhasan commented 8 years ago

This is how the app is being setup. You have to use 8765. check the configuration of gateway app.

anilallewar commented 7 years ago

@chensean2 , we have enforced security for all the endpoints (user/task etc) so that they provide response only if there is authenticated OAuth2 access token sent with the request.

When you access the user/task API directly there is no OAuth2 access token specified in the request and hence it would fail with 403 errors.

However when you go through the API gateway, it is configured to authenticate you if OAuth2 access token does not exist. Subsequent requests to the API that go through the API gateway have the OAuth2 token and hence are honoured.