Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flyway outdated -- MariaDB #236

Open
bernharddisselhoff opened this issue Apr 28, 2024 · 17 comments
Open

Flyway outdated -- MariaDB #236

bernharddisselhoff opened this issue Apr 28, 2024 · 17 comments

Comments

@bernharddisselhoff
Copy link

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
Copy link
Author

[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
Copy link
Owner

erik73 commented Apr 28, 2024

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
Copy link
Author

bernharddisselhoff commented Apr 28, 2024 via email

@erik73
Copy link
Owner

erik73 commented Apr 30, 2024

@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
Copy link

npirtube commented Jul 7, 2024

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
Copy link
Owner

erik73 commented Jul 8, 2024

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
Copy link
Owner

erik73 commented Jul 11, 2024

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: steve-community/steve#1439

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

@npirtube
Copy link

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

@erik73
Copy link
Owner

erik73 commented Jul 13, 2024

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
Copy link

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
Copy link
Owner

erik73 commented Jul 19, 2024

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
Copy link

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
Copy link
Owner

erik73 commented Jul 21, 2024

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 erik73 changed the title Flywheel outdated -- MariaDB Flyway outdated -- MariaDB Jul 21, 2024
@erik73
Copy link
Owner

erik73 commented Jul 28, 2024

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.

@erik73 erik73 closed this as completed Jul 28, 2024
@npirtube
Copy link

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 erik73 reopened this Aug 17, 2024
@erik73
Copy link
Owner

erik73 commented Aug 17, 2024

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

@npirtube
Copy link

npirtube commented Sep 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants