erik73 / addon-steve

SteVe OCPP Server - Home Assistant Add-on by Erik73
https://erik73.github.io
MIT License
2 stars 1 forks source link

Flyway outdated -- MariaDB #236

Open bernharddisselhoff opened 4 months ago

bernharddisselhoff commented 4 months ago

Problem/Motivation

Steve is running into an error with an outdated flywheel

Expected behavior

please update to tatest flywheel with support for MariaDB 2.7.1 Home Assistant AddOn

Actual behavior

Can`t build Steve

bernharddisselhoff commented 4 months ago

[INFO] Flyway Community Edition 7.15.0 by Redgate [INFO] Database: jdbc:mysql://core-mariadb:3306/stevedb (MySQL 5.5) [WARNING] Flyway upgrade recommended: MariaDB 10.11 is newer than this version of Flyway and support has not been tested. The latest supported version of MariaDB is 10.5. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 32.554 s [INFO] Finished at: 2024-04-28T10:52:24+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:7.15.0:migrate (default) on project steve: org.flywaydb.core.api.exception.FlywayValidateException: Validate failed: Migrations have failed validation [ERROR] Detected failed migration to version 0.7.7 (update). Please remove any half-completed changes then run repair to fix the schema history. [ERROR] Need more flexibility with validation rules? Learn more: https://rd.gt/3AbJUZE [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException cont-init: info: /etc/cont-init.d/11-buildsteve.sh exited 1 cont-init: info: running /etc/cont-init.d/12-rebuildsteve.sh failed to load external entity "/data/pom.xml" cont-init: info: /etc/cont-init.d/12-rebuildsteve.sh exited 3 cont-init: info: running /etc/cont-init.d/20-nginx.sh cont-init: info: /etc/cont-init.d/20-nginx.sh exited 0 cont-init: warning: some scripts exited nonzero s6-rc: warning: unable to start service legacy-cont-init: command exited 1 /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information. /run/s6/basedir/scripts/rc.init: fatal: stopping the container. s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

erik73 commented 4 months ago

Strange. The flyway package is downloaded and installed by the SteVe installer. It is nothing I have control over. In this repo you can look in the docker file to see what packages are installed in this add-on. The rest is installed by SteVe-installer.

I tried to compile on my RPI4, and I have no errors. What platform are you on?

bernharddisselhoff commented 4 months ago

Hi Erik, thanks for looking into this.

I’m running my HomeAssitant on Debian 12 Bookworm latest X64 AMD CPU.

Maybe this is the version of MariaDB on X64 from HA?

Am 2024-04-28 15:47, schrieb Erik Hilton:

Strange. The flywheel package is downloaded and installed by the SteVe installer. It is nothing I have control over. In this repo you can look in the docker file to see what packages are installed in this add-on. The rest is installed by SteVe-installer.

I tried to compile on my RPI4, and I have no errors. What platform are you on?

-- Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. You are receiving this because you authored the thread.Message ID: @.***>

Links:

[1] https://github.com/erik73/addon-steve/issues/236#issuecomment-2081490239 [2] https://github.com/notifications/unsubscribe-auth/AHWHH3WISG4ADGOOZO6GOVDY7T4XTAVCNFSM6AAAAABG42MHF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBRGQ4TAMRTHE

erik73 commented 4 months ago

@bernharddisselhoff : Is this a new install, or is it an upgrade you are performing? After reading the logs I looks like the DB migration (to a new SteVe version) fails.

npirtube commented 2 months ago

i have the same issue in a new installation

[INFO] Flyway Community Edition 7.15.0 by Redgate [INFO] Database: jdbc:mysql://core-mariadb:3306/stevedb (MySQL 5.5) [WARNING] Flyway upgrade recommended: MariaDB 10.11 is newer than this version of Flyway and support has not been tested. The latest supported version of MariaDB is 10.5. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 18.968 s [INFO] Finished at: 2024-07-07T20:06:43+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:7.15.0:migrate (default) on project steve: org.flywaydb.core.api.exception.FlywayValidateException: Validate failed: Migrations have failed validation [ERROR] Detected failed migration to version 0.7.7 (update). Please remove any half-completed changes then run repair to fix the schema history. [ERROR] Need more flexibility with validation rules? Learn more: https://rd.gt/3AbJUZE [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException cont-init: info: /etc/cont-init.d/11-buildsteve.sh exited 1 cont-init: info: running /etc/cont-init.d/12-rebuildsteve.sh failed to load external entity "/data/pom.xml" cont-init: info: /etc/cont-init.d/12-rebuildsteve.sh exited 3 cont-init: info: running /etc/cont-init.d/20-nginx.sh cont-init: info: /etc/cont-init.d/20-nginx.sh exited 0 cont-init: warning: some scripts exited nonzero s6-rc: warning: unable to start service legacy-cont-init: command exited 1 /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information. /run/s6/basedir/scripts/rc.init: fatal: stopping the container. s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

I try to uninstall and reinstall the addon, but issue appear again. Maybe the problem is in MariaDB version:

[WARNING] Flyway upgrade recommended: MariaDB 10.11 is newer than this version of Flyway and support has not been tested. The latest supported version of MariaDB is 10.5.

But i dont know how can control MariaDC version.

Thank for your help

erik73 commented 2 months ago

I believe Flyway is just a warning. This is the reason for the build failure: ERROR] Detected failed migration to version 0.7.7 (update). Please remove any half-completed changes then run repair to fix the schema history.

I do not know how to repair it, but if you are not interested to keep your history you can dump the Steve database and start from scratch.

erik73 commented 2 months ago

Ok, did some research. Here is a PR that is supposed to fix the problem. It has now been merged to the master branch. Se here: https://github.com/steve-community/steve/pull/1439

So, either I wait for a new SteVe release, or I switch to the master branch.

npirtube commented 2 months ago

I will have to wait, I don't quite understand how to apply the changes indicated

erik73 commented 2 months ago

I will have to wait, I don't quite understand how to apply the changes indicated

I mean I can publish a new add-on release with the fixes implemented during next week. I just have to test it first.

spaxxilein commented 2 months ago

I will have to wait, I don't quite understand how to apply the changes indicated

I mean I can publish a new add-on release with the fixes implemented during next week. I just have to test it first.

That would be awesome. For me Installation also Not possible currently.

erik73 commented 2 months ago

Hi. You can now try my EDGE repository. Add this addon-repo to Home Assistant: https://github.com/erik73/repository-edge Then you can install the EDGE version of the SteVe add-on. Please report back if it solves your problems...

spaxxilein commented 2 months ago

Hello, working for me after deleting the "old" non working database via phpmyadmin. Any way to get the data into home assistant!? I dont see MQTT support or something like this anywhere!?

erik73 commented 2 months ago

Hi.

Good that it is working. There is no connection to Home Assistant. The only "connection" is that the SteVe data is stored in the MariaDB add-on. The reason I created this add-on was to experiment with SteVe without having to install it on a separate host.

erik73 commented 1 month ago

A new version of SteVe has been released: 3.7.0. I have now released a new version of the add-on with SteVe 3.7.0 where these problems are fixed.

npirtube commented 1 month ago

A new version of SteVe has been released: 3.7.0. I have now released a new version of the add-on with SteVe 3.7.0 where these problems are fixed.

With last version i have the same problem.

https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.15.2/jackson-databind-2.15.2.jar (1.6 MB at 4.4 MB/s) [INFO] Database: jdbc:mysql://core-mariadb:3306/stevedb (MySQL 5.5) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 16.260 s [INFO] Finished at: 2024-08-17T18:02:55+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:10.16.0:migrate (default) on project steve: org.flywaydb.core.api.exception.FlywayValidateException: Validate failed: Migrations have failed validation [ERROR] Detected failed migration to version 0.7.7 (update). [ERROR] Please remove any half-completed changes then run repair to fix the schema history. [ERROR] Need more flexibility with validation rules? Learn more: https://rd.gt/3AbJUZE [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException cont-init: info: /etc/cont-init.d/11-buildsteve.sh exited 1 cont-init: info: running /etc/cont-init.d/12-rebuildsteve.sh failed to load external entity "/data/pom.xml" cont-init: info: /etc/cont-init.d/12-rebuildsteve.sh exited 3 cont-init: info: running /etc/cont-init.d/20-nginx.sh cont-init: info: /etc/cont-init.d/20-nginx.sh exited 0 cont-init: warning: some scripts exited nonzero s6-rc: warning: unable to start service legacy-cont-init: command exited 1 /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information. /run/s6/basedir/scripts/rc.init: fatal: stopping the container. s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

erik73 commented 1 month ago

Is this a new install? Supervised or HASSOS? Platform?

npirtube commented 2 weeks ago

No, is a Supervised Home Assistant with more than two years working but updated to last version of Home Assistant