Core Mendix Runtime shutting down and terminates database migration during startup of app

0
Hello,   We are migrating a Mendix app from Mendixcloud (PostrgreSQL) to Microsoft Azure (MS SQL Server). We followed the migration process as described here: https://www.mendix.com/blog/the-ultimate-guide-to-data-migration-in-mendix/.   However in the Mendix logs we see that the migration is started, but wihin about 1,5 minute the migration seems to be terminated. However the errors don't show why the app is shut down. See log extract below.   What could be the reason that the app is suddenly shut down?   TimeGenerated [UTC] LogEntry 07/01/2024 11:46 07/01/2024 11:46 ## . 07/01/2024 11:46 INFO: 07/01/2024 11:46 ## . 07/01/2024 11:46 ## ## ## == 07/01/2024 11:46 ## ## ## ## === 07/01/2024 11:46 /""""""""""""""""\___/ === 07/01/2024 11:46 ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ 07/01/2024 11:46 \______ o __/ 07/01/2024 11:46 \ \ __/ 07/01/2024 11:46 \____\______/ 07/01/2024 11:46 07/01/2024 11:46 __ __ _ _ _____ _ 07/01/2024 11:46 | \/ | | || | | __ \ | | 07/01/2024 11:46 | \ / |_ __ | || |_ | | | | ___ ___| | _____ _ __ 07/01/2024 11:46 | |\/| \ \/ / |__ _| | | | |/ _ \ / __| |/ / _ \ '__| 07/01/2024 11:46 | | | |> < | | | |__| | (_) | (__| < __/ | 07/01/2024 11:46 |_| |_/_/\_\ |_| |_____/ \___/ \___|_|\_\___|_| 07/01/2024 11:46 07/01/2024 11:46 digitalecosystems@mendix.com 07/01/2024 11:46 07/01/2024 11:46 For a Kubernetes native solution to run Mendix apps, 07/01/2024 11:46 see Mendix for Private Cloud. 07/01/2024 11:46 07/01/2024 11:46 INFO: Executing export_industrial_edge_config_variable... 07/01/2024 11:46 INFO: 07/01/2024 11:46 ## ## ## == 07/01/2024 11:46 ## ## ## ## === 07/01/2024 11:46 /""""""""""""""""\___/ === 07/01/2024 11:46 ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ 07/01/2024 11:46 \______ o __/ 07/01/2024 11:46 \ \ __/ 07/01/2024 11:46 \____\______/ 07/01/2024 11:46 07/01/2024 11:46 __ __ _ _ _____ _ 07/01/2024 11:46 | \/ | | || | | __ \ | | 07/01/2024 11:46 | \ / |_ __ | || |_ | | | | ___ ___| | _____ _ __ 07/01/2024 11:46 | |\/| \ \/ / |__ _| | | | |/ _ \ / __| |/ / _ \ '__| 07/01/2024 11:46 | | | |> < | | | |__| | (_) | (__| < __/ | 07/01/2024 11:46 |_| |_/_/\_\ |_| |_____/ \___/ \___|_|\_\___|_| 07/01/2024 11:46 07/01/2024 11:46 digitalecosystems@mendix.com 07/01/2024 11:46 07/01/2024 11:46 For a Kubernetes native solution to run Mendix apps, 07/01/2024 11:46 see Mendix for Private Cloud. 07/01/2024 11:46 07/01/2024 11:46 07/01/2024 11:46 INFO: Executing export_industrial_edge_config_variable... 07/01/2024 11:46 INFO: Mendix Cloud Foundry Buildpack v5.0.16 [e9a6e09] starting... 07/01/2024 11:46 INFO: Fixing up permissions of directory 'model' with mode 700 07/01/2024 11:46 INFO: Fixing up permissions of directory 'web' with mode 755 07/01/2024 11:46 INFO: Fixing up permissions of directory 'data' with mode 700 07/01/2024 11:46 INFO: Using external file store configured by user-defined settings. See https://github.com/mendix/cf-mendix-buildpack for file store configuration details. 07/01/2024 11:46 INFO: JVM garbage collector is set to [Serial] 07/01/2024 11:46 INFO: get_java_major_version : major_version - 11 07/01/2024 11:46 INFO: checking is micrometer metrics enabled 07/01/2024 11:46 INFO: checking is micrometer metrics enabled 07/01/2024 11:46 INFO: Mendix Cloud Foundry Buildpack v5.0.16 [e9a6e09] starting... 07/01/2024 11:46 INFO: Fixing up permissions of directory 'model' with mode 700 07/01/2024 11:46 INFO: Fixing up permissions of directory 'web' with mode 755 07/01/2024 11:46 INFO: Fixing up permissions of directory 'data' with mode 700 07/01/2024 11:46 INFO: Using external file store configured by user-defined settings. See https://github.com/mendix/cf-mendix-buildpack for file store configuration details. 07/01/2024 11:46 INFO: JVM garbage collector is set to [Serial] 07/01/2024 11:46 INFO: get_java_major_version : major_version - 11 07/01/2024 11:46 INFO: checking is micrometer metrics enabled 07/01/2024 11:46 INFO: checking is micrometer metrics enabled 07/01/2024 11:46 INFO: checking is micrometer metrics enabled 07/01/2024 11:46 INFO: MENDIX-LOGGING-HEARTBEAT: Heartbeat number 1 07/01/2024 11:46 INFO: Using Java version: 07/01/2024 11:46 INFO: openjdk version "11.0.23" 2024-04-16 LTS 07/01/2024 11:46 INFO: OpenJDK Runtime Environment (Red_Hat-11.0.23.0.9-2) (build 11.0.23+9-LTS) 07/01/2024 11:46 INFO: OpenJDK 64-Bit Server VM (Red_Hat-11.0.23.0.9-2) (build 11.0.23+9-LTS, mixed mode, sharing) 07/01/2024 11:46 INFO: The buildpack is starting the runtime... 07/01/2024 11:46 INFO: Trying to start the MxRuntime... 07/01/2024 11:46 INFO: checking is micrometer metrics enabled 07/01/2024 11:46 INFO: MENDIX-LOGGING-HEARTBEAT: Heartbeat number 1 07/01/2024 11:46 INFO: Using Java version: 07/01/2024 11:46 INFO: openjdk version "11.0.23" 2024-04-16 LTS 07/01/2024 11:46 INFO: OpenJDK Runtime Environment (Red_Hat-11.0.23.0.9-2) (build 11.0.23+9-LTS) 07/01/2024 11:46 INFO: OpenJDK 64-Bit Server VM (Red_Hat-11.0.23.0.9-2) (build 11.0.23+9-LTS, mixed mode, sharing) 07/01/2024 11:46 INFO: The buildpack is starting the runtime... 07/01/2024 11:46 INFO: Trying to start the MxRuntime... 07/01/2024 11:46 INFO - Configuration: Updating configuration... 07/01/2024 11:46 INFO - M2EE: Creating Runtime server... 07/01/2024 11:46 INFO - Logging: Logging to file: /opt/mendix/build/log/out.log, max size: 1099511627776KiB, max rotation: 10 07/01/2024 11:46 INFO - M2EE: Initializing runtime... 07/01/2024 11:46 INFO - Core: Mendix Runtime 8.18.24.2858 (build 2858). Copyright © 2003-2023 Mendix bv. All rights reserved. 07/01/2024 11:46 INFO - M2EE: Initialized runtime. 07/01/2024 11:46 INFO - M2EE: Creating Runtime server... 07/01/2024 11:46 INFO - M2EE: Setting MaxFormContentSize for Runtime Server to 10485760 07/01/2024 11:46 INFO - M2EE: Runtime server started. 07/01/2024 11:46 INFO - Configuration: Updating configuration... 07/01/2024 11:46 INFO - Services: Adding 0 authority certificate(s) 07/01/2024 11:46 INFO - Configuration: Configuration updated. 07/01/2024 11:46 INFO - Logging: Logging to file: /opt/mendix/build/log/out.log, max size: 1099511627776KiB, max rotation: 10 07/01/2024 11:46 INFO - M2EE: Initializing runtime... 07/01/2024 11:46 INFO - Core: Mendix Runtime 8.18.24.2858 (build 2858). Copyright © 2003-2023 Mendix bv. All rights reserved. 07/01/2024 11:46 INFO - M2EE: Initialized runtime. 07/01/2024 11:46 INFO - M2EE: Setting MaxFormContentSize for Runtime Server to 10485760 07/01/2024 11:46 INFO - M2EE: Runtime server started. 07/01/2024 11:46 INFO - Services: Adding 0 authority certificate(s) 07/01/2024 11:46 INFO - Configuration: Configuration updated. 07/01/2024 11:46 INFO - StorageS3: Endpoint set to: s3.eu-central-1.amazonaws.com 07/01/2024 11:46 INFO - Core: Initializing InternalCore and Modules... 07/01/2024 11:46 INFO - StorageS3: Endpoint set to: s3.eu-central-1.amazonaws.com 07/01/2024 11:46 INFO - Core: Initializing InternalCore and Modules... 07/01/2024 11:46 INFO - Core: Initialized InternalCore and Modules. 07/01/2024 11:46 INFO - Core: Initializing ConnectionBus... 07/01/2024 11:46 INFO - Core: Initialized InternalCore and Modules. 07/01/2024 11:46 INFO - Core: Initializing ConnectionBus... 07/01/2024 11:46 INFO - Core: Initialized ConnectionBus. 07/01/2024 11:46 INFO - Core: Mendix Database upgrade needed. Waiting for cluster leader to upgrade the database... 07/01/2024 11:46 INFO - Core: Initialized ConnectionBus. 07/01/2024 11:46 INFO - ConnectionBus: Database product information: Microsoft SQL Server 12.00.5564 07/01/2024 11:46 INFO - ConnectionBus: Database engine version: 12.0 07/01/2024 11:46 ERROR: Executing start did not succeed: result: 3, message: The database has to be updated. (4754 database change queries needed) 07/01/2024 11:46 INFO - Core: Executing DDL commands... 07/01/2024 11:46 INFO - ConnectionBus: Executing 4754 database synchronization command(s)... 07/01/2024 11:46 INFO - ConnectionBus: Executing database synchronization commands finished. 07/01/2024 11:46 INFO - Core: Executed DDL commands. 07/01/2024 11:46 ERROR: Executing start did not succeed: result: 3, message: The database has to be updated. (750 database change queries needed) 07/01/2024 11:46 INFO - Core: Executing DDL commands... 07/01/2024 11:46 INFO - ConnectionBus: Executing 750 database synchronization command(s)... 07/01/2024 11:47 INFO - Core: Mendix Runtime is shutting down now... 07/01/2024 11:48 INFO: Waiting for the application to shutdown... 07/01/2024 11:48 ERROR - M2EE: An exception occurred during Runtime Shutdown. 07/01/2024 11:48 ERROR - M2EE: java.lang.NullPointerException: null 07/01/2024 11:48 at com.mendix.basis.impl.MxRuntimeImplBase.shutdown(MxRuntimeImplBase.java:792) 07/01/2024 11:48 at com.mendix.m2ee.appcontainer.actions.ShutdownAction.execute(ShutdownAction.java:45) 07/01/2024 11:48 at com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandler.handle(HttpAdminHandler.java:129) 07/01/2024 11:48 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) 07/01/2024 11:48 at org.eclipse.jetty.server.Server.handle(Server.java:516) 07/01/2024 11:48 at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) 07/01/2024 11:48 at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) 07/01/2024 11:48 at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) 07/01/2024 11:48 at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) 07/01/2024 11:48 at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) 07/01/2024 11:48 at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) 07/01/2024 11:48 at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) 07/01/2024 11:48 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) 07/01/2024 11:48 at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) 07/01/2024 11:48 at java.base/java.lang.Thread.run(Thread.java:829) 07/01/2024 11:48 07/01/2024 11:48 INFO: Waiting for the application to shutdown... 07/01/2024 11:48 INFO - Core: Mendix Runtime is shutting down now... 07/01/2024 11:48 ERROR - M2EE: An exception occurred during Runtime Shutdown. 07/01/2024 11:48 ERROR - M2EE: java.lang.NullPointerException: null 07/01/2024 11:48 at com.mendix.basis.impl.MxRuntimeImplBase.shutdown(MxRuntimeImplBase.java:792) 07/01/2024 11:48 at com.mendix.m2ee.appcontainer.actions.ShutdownAction.execute(ShutdownAction.java:45) 07/01/2024 11:48 at com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandler.handle(HttpAdminHandler.java:129) 07/01/2024 11:48 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) 07/01/2024 11:48 at org.eclipse.jetty.server.Server.handle(Server.java:516) 07/01/2024 11:48 at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) 07/01/2024 11:48 at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) 07/01/2024 11:48 at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) 07/01/2024 11:48 at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) 07/01/2024 11:48 at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) 07/01/2024 11:48 at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) 07/01/2024 11:48 at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) 07/01/2024 11:48 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) 07/01/2024 11:48 at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) 07/01/2024 11:48 at java.base/java.lang.Thread.run(Thread.java:829) 07/01/2024 11:48 07/01/2024 11:48 INFO: The application has been stopped successfully. 07/01/2024 11:48 INFO: The application has been stopped successfully.  
asked
3 answers
1

Hi Elco, 

to just drop the tables is not enough you need to also delete all other objects that are part of your schema, from my experiences I was migrating from Oracle to Postgres and for me Sequences (picture below) was issue, you can find some scripts on Stackoverflow that can delete everything in same not only tables, but easiest solution you can just drop your schema and create new one. After you clean everything make sure on first run of pod to open log and trace it.

image.png

Best regards, Slavko

answered
0

Hi Elco Fransen,

To be able to run migration process your new database need to be empty, when I mean empty all tables, sequence key... if it's not fully empty, it's will throw error and end up in infinitely loop only first run of your pod will show correct error.

If you have any additional question, please let me know 

Hope this help

Best regards, Slavko

answered
0

Hi Slavko,

 

Before running the migration process I dropped all tables from the destination database in SQL Server. Is there anything else that should be done?

 

Kind regards,

Elco Fransen

answered