Open shri-arunraj opened 2 years ago
could you paste your gateway configuration
@zhaozw
servicecomb-config-order: 100
servicecomb:
service:
application: talech-services
name: gateway
properties:
allowCrossApp: true #whether to allow calls across applications
version: 0.0.4
registry:
# Default using local service center
address: http://localhost:30100
# address: https://cse.cn-south-1.myhuaweicloud.com
instance:
watch: false
flowcontrol:
Consumer:
qps:
enabled: true
limit:
oauth-service:
OAuthDeveloperService:
registerDeveloper: 4
handler:
chain:
Consumer:
default: loadbalance,tracing-consumer,qps-flowcontrol-consumer,bizkeeper-consumer
service:
mfa-login-service: authClientGrant,loadbalance,tracing-consumer
Provider:
default: bizkeeper-provider,tracing-provider
loadbalance:
strategy:
name: WeightedResponse
rest:
address: 0.0.0.0:9091?sslEnabled=false
tracing:
enabled: true
http:
dispatcher:
edge:
url:
enabled: true
order: 1
mappings:
mfaServices:
path: "/a/mfa/login/.*"
microserviceName: mfa-login-service
prefixSegmentCount: 1
versionRule: 0.0.0+
oauthAdmin:
path: "/admin/oauth/.*"
microserviceName: oauth-service
prefixSegmentCount: 1
versionRule: 0.0.0+
oauthService:
path: "/oauth2/.*"
microserviceName: oauth-service
prefixSegmentCount: 0
versionRule: 0.0.0+
Note here I am consuming here the rest API hosted by oauth-service
microservice and whose path starts with /oauth2/.*
. It was working before when the provider uses servlet
based spring boot starter rather than standalone
starter.
i.v.c.http.impl.HttpClientRequestImpl : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 30000ms has been exceeded while executing POST /oauth2/token for server 192.168.1.2:8116
Maybe you need first check if 192.168.1.2:8116 reachable from your gateway environment.
@liubao68 If i change the dependency to java-chassis-spring-boot-starter-servlet
at the provider, it is working as expected. Both provider and gateway are running in my local host. So i guess it shouldn't be a communication problem.
<dependency>
<groupId>org.apache.servicecomb</groupId>
<artifactId>java-chassis-spring-boot-starter-servlet</artifactId>
</dependency>
Do you used some components from spring boot to implements oauth2? e.g. how /oauth2/token
is implemented.
Maybe the module you used only works with servlet.
I have built a microservice provider based in Spring boot standalone starter. It listens on port
8116
. The Rest API's provided by this service can be consumed directly on this port8116
with postman.However when routed via Gateway, I am getting the below error in the provider.
And At the
gateway
the request is getting timedout.This is my provider Main application.
ANd this is my provider configuration
What i am doing wrong? Why gateway routed requests are failing at provider?