How to troubleshoot Spring Cloud Gateway for VMware Tanzu
search cancel

How to troubleshoot Spring Cloud Gateway for VMware Tanzu

book

Article ID: 297139

calendar_today

Updated On:

Products

Support Only for Spring

Issue/Introduction

This KB article demonstrates steps for troubleshooting Spring Cloud Gateway (SCG) for VMware Tanzu.
 

  • When the broker fails to process service management operation (create/delete/bind/unbind/etc.).
  • Gateway instance doesn't function as expected.


Resolution

A developer creates SCG instance with CF CLI or Apps Manager, then binds the app to the instances. There are three types of components getting involved from developer and operator perspectives:
 
  • SCG broker: It is on a BOSH-deployed VM. Its route is registered with GoRouter as "https://scg-service-broker.SYSTEM_DOMAIN"
  • Service instance: The backend gateway app is under p-spring-cloud-gateway-service organizationINSTANCE_GUID space.
  • Client apps: which are binding to SCG instance.

When hitting problems with managing service instances, for example using the creating/deleting/binding/unbinding operation, operator with `BOSH`access can fun the following command:

$ bosh ssh -d <SGG_DEPLOYMENT> spring-cloud-gateway-service/0
$ sudo -i


Then review logs at /var/vcap/sys/log/scg-service-broker/scg-service-broker.stdout.log and stderr.log.

When hitting any problem with the gateway instance, please check instance logs:

cf service SERVICE_NAME --guid
cf target -o p-spring-cloud-gateway-service -s <GUID>
cf log gateway


The gateway app log level can be modified as:

cf set-env gateway JAVA_OPTS '-Dlogging.level.org.springframework.cloud.gateway=DEBUG'
cf restart gateway


Note: Please unset-env and restart after troubleshooting otherwise the instance will keep generating large volume of debug logs.

If you can't resolve the problem yourself, please collect the following information and submit a case with the following information to Tanzu Support:
 

  • SCG broker logs (this is required for troubleshooting any broker-related problems, logs can be downloaded from Ops Manager)
  • SCG instance logs (with debug enabled is highly appreciated)
  • The gateway routes configuration (output of `curl  https://your_gateway.DOMAIN/actuator/gateway/routes -H "Authorization: $(cf oauth-token)"`)
  • Your client app logs (optional)