Spring Cloud Data Flow (SCDF) was deployed on a Kubernetes cluster. However, after deployment, the scdf-server pod entered a CrashLoopBackOff state.
Upon inspecting the SCDF pod logs, the following error was observed:
................
at org.flywaydb.core.internal.callback.DefaultCallbackExecutor.onEvent(DefaultCallbackExecutor.java:65) ~[flyway-core-8.5.13.jar:na]
at org.flywaydb.core.internal.command.DbBaseline.baseline(DbBaseline.java:84) ~[flyway-core-8.5.13.jar:na]
at org.flywaydb.core.Flyway.doBaseline(Flyway.java:382) ~[flyway-core-8.5.13.jar:na]
at org.flywaydb.core.Flyway.access$200(Flyway.java:56) ~[flyway-core-8.5.13.jar:na]
at org.flywaydb.core.Flyway$1.execute(Flyway.java:148) ~[flyway-core-8.5.13.jar:na]
at org.flywaydb.core.Flyway$1.execute(Flyway.java:124) ~[flyway-core-8.5.13.jar:na]
at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:205) ~[flyway-core-8.5.13.jar:na]
at org.flywaydb.core.Flyway.migrate(Flyway.java:124) ~[flyway-core-8.5.13.jar:na]
at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:66) ~[spring-boot-autoconfigure-2.7.18.jar:2.7.18]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.31.jar:5.3.31]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.31.jar:5.3.31]
... 26 common frames omitted
Caused by: org.springframework.cloud.dataflow.common.flyway.DataFlowSchemaMigrationException: An exception occured during migration. This may indicate that you have run Spring Batch Jobs or Spring Cloud Tasks prior to running Spring Cloud Data Flow first. Data Flow must create these tables.
at org.springframework.cloud.dataflow.common.flyway.AbstractCallback.handle(AbstractCallback.java:76) ~[spring-cloud-dataflow-common-flyway-2.11.2.jar:2.11.2]
at org.flywaydb.core.internal.callback.DefaultCallbackExecutor.handleEvent(DefaultCallbackExecutor.java:134) ~[flyway-core-8.5.13.jar:na]
... 41 common frames omitted
Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [create table app_registration (
id number(19,0) not null,
object_version number(19,0),
default_version number(1,0),
metadata_uri clob,
name varchar2(255 char),
type number(10,0),
uri clob,
version varchar2(255 char),
primary key (id)
)]; nested exception is java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object
............
Addition details:-
Deployed Oracle DB, rabbitmq and Skipper server separately as well.
Spring Cloud Data Flow for Kubernetes v1.6
A duplicate database schema was present, which caused a conflict and prevented the scdf-server pod from starting properly.
The old database schema was deleted, and a new schema was initialised by following the steps outlined in the document. The SCDF configuration was then updated to point to the new schema. After these changes, the SCDF server pod started successfully and is now in a Running state.