Upgrading Spring Cloud Gateway to 1.2.4 fails during the upgrade-all-instances errand.
search cancel

Upgrading Spring Cloud Gateway to 1.2.4 fails during the upgrade-all-instances errand.

book

Article ID: 297201

calendar_today

Updated On:

Products

Support Only for Spring

Issue/Introduction



Spring Cloud Gateway (SCG) for TAS instances crash when used with Java Buildpack 4.49+. With Builpack 4.49, the cloud spring profile is no longer automatically added. Without this, some beans are not configured in the gateway code, resulting in the following errors below,



errand.log,
 
2022-07-11 17:37:20.102 INFO 7 --- [ry-client-nio-4] i.p.s.c.s.errand.CloudFoundryService : Current state is failed
2022-07-11 17:37:20.185 ERROR 7 --- [ main] i.p.s.c.s.errand.BrokerErrandCli : Errand failed
java.lang.RuntimeException: Update service instance failed: update service instance started
2022-07-11 17:39:37.812 ERROR 7 --- [ main] i.p.s.c.s.errand.BrokerErrandCli : Errand failed
java.lang.RuntimeException: Update service instance failed: CF-ScaleDisabledDuringDeployment(390016): Cannot scale this process while a deployment is in flight.
 
 

App logs show the following:
2022-10-17T13:45:17.343-04:00 [APP/PROC/WEB/0] [OUT] ***************************
2022-10-17T13:45:17.343-04:00 [APP/PROC/WEB/0] [OUT] APPLICATION FAILED TO START
2022-10-17T13:45:17.343-04:00 [APP/PROC/WEB/0] [OUT] ***************************
2022-10-17T13:45:17.343-04:00 [APP/PROC/WEB/0] [OUT] Description:
2022-10-17T13:45:17.343-04:00 [APP/PROC/WEB/0] [OUT] Parameter 0 of method webSessionManager in org.springframework.session.config.annotation.web.server.SpringWebSessionConfiguration required a bean of type 'org.springframework.session.ReactiveSessionRepository' that could not be found.
2022-10-17T13:45:17.343-04:00 [APP/PROC/WEB/0] [OUT] Action:
2022-10-17T13:45:17.343-04:00 [APP/PROC/WEB/0] [OUT] Consider defining a bean of type 'org.springframework.session.ReactiveSessionRepository' in your configuration.
2022-10-17T13:45:18.628-04:00 [APP/PROC/WEB/0] [OUT] Exit status 1
2022-10-17T13:45:18.630-04:00 [CELL/SSHD/0] [OUT] Exit status 0

 


Environment

Product Version: Other

Resolution

It is fixed in SCG v1.2.4, however, if upgrading TAS first it failed to upgrade and it was never able to successfully update the SCG tile.


WORKAROUND

Option 1)  Upgrade SCG first.

Option 2) Revert to the older java Buildpack 4.48, then upgrade the SCG tile to 1.2.4, once upgraded put java Buildpack back to the intended version.