steve-community/steve

Installation fails on "Access denied" error

Closed this issue · 5 comments

Checklist

  • I checked other issues already, but found no answer/solution
  • I checked the documentation and wiki, but found no answer/solution
  • I am running the latest version and the issue still occurs
  • I am sure that this issue is about SteVe (and not about the charging station software or something unrelated to SteVe)

Specifications

SteVe Version     : 3.6.0
Operating system  : Ubuntu 22.04.0 LTS
JDK               : n.a.
Database          : MariaDb 10.4

Expected Behavior

Successful installation
...

Actual Behavior

[ERROR] Error Code : 1045
[ERROR] Message : Access denied for user 'steve'@'172.19.0.3' (using password: YES)
[ERROR]
[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
2024/07/01 14:40:01 Ready: tcp://mariadb:3306.
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< de.rwth.idsg:steve >-------------------------
[INFO] Building SteVe 3.6.0
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ steve ---
[INFO]
[INFO] --- enforcer:3.3.0:enforce (enforce-java) @ steve ---
[INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireJavaVersion passed
[INFO]
[INFO] --- git-commit-id:4.9.10:revision (default) @ steve ---
[INFO]
[INFO] --- properties:1.1.0:read-project-properties (default) @ steve ---
[INFO]
[INFO] --- flyway:7.15.0:migrate (default) @ steve ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.786 s
[INFO] Finished at: 2024-07-01T14:40:10Z
[INFO] ------------------------------------------------------------------------
[WARNING]
[WARNING] Plugin validation issues were detected in 2 plugin(s)
[WARNING]
[WARNING] * pl.project13.maven:git-commit-id-plugin:4.9.10
[WARNING] * org.flywaydb:flyway-maven-plugin:7.15.0
[WARNING]
[WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
[WARNING]
[ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:7.15.0:migrate (default) on project steve: org.flywaydb.core.internal.exception.FlywaySqlException: Unable to obtain connection from database (jdbc:mysql://mariadb:3306/stevedb?useSSL=true&serverTimezone=UTC) for user 'steve': Access denied for user 'steve'@'172.19.0.3' (using password: YES)
[ERROR] ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[ERROR] SQL State : 28000
[ERROR] Error Code : 1045
[ERROR] Message : Access denied for user 'steve'@'172.19.0.3' (using password: YES)
[ERROR]
[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
2024/07/01 14:42:11 Ready: tcp://mariadb:3306.
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< de.rwth.idsg:steve >-------------------------
[INFO] Building SteVe 3.6.0
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ steve ---
[INFO]
[INFO] --- enforcer:3.3.0:enforce (enforce-java) @ steve ---
[INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireJavaVersion passed
[INFO]
[INFO] --- git-commit-id:4.9.10:revision (default) @ steve ---
[INFO]
[INFO] --- properties:1.1.0:read-project-properties (default) @ steve ---
[INFO]
[INFO] --- flyway:7.15.0:migrate (default) @ steve ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.406 s
[INFO] Finished at: 2024-07-01T14:42:21Z
[INFO] ------------------------------------------------------------------------
[WARNING]
[WARNING] Plugin validation issues were detected in 2 plugin(s)
[WARNING]
[WARNING] * pl.project13.maven:git-commit-id-plugin:4.9.10
[WARNING] * org.flywaydb:flyway-maven-plugin:7.15.0
[WARNING]
[WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
[WARNING]
[ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:7.15.0:migrate (default) on project steve: org.flywaydb.core.internal.exception.FlywaySqlException: Unable to obtain connection from database (jdbc:mysql://mariadb:3306/stevedb?useSSL=true&serverTimezone=UTC) for user 'steve': Access denied for user 'steve'@'172.19.0.3' (using password: YES)
[ERROR] ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[ERROR] SQL State : 28000
[ERROR] Error Code : 1045
[ERROR] Message : Access denied for user 'steve'@'172.19.0.3' (using password: YES)
[ERROR]
[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

Steps to Reproduce the Problem

  1. followed the installation instruction and edited main.properties
  2. docker-compose up -d

Additional context

The mariadb container stays in a running mode, the SteVe container crashes. I can setup a remote connection with HeidSQL to the mariadb. Database stevedb exists. I have logged into the docker container and added the missing privileges, but that doesn't help.
...

Did you noticed that Steve request a SSL connection to the database?
Did you verified that MariaDB accept SSL connections?
Did you checked the necessary SSL server certificate?
Did you checked the environment has a valid date and time?

Did you noticed that Steve request a SSL connection to the database? Did you verified that MariaDB accept SSL connections? Did you checked the necessary SSL server certificate? Did you checked the environment has a valid date and time?

Thanks for your reaction. I have checked the environment has a valid date and time and have set it to UTC time. Al the others, No. Have I missed some points in the Configuration and Installation part? I cannot find how to do that. Do you have some guidance? Thanks!

'steve'@'172.19.0.3' indicates a user named steve coming from ip/host 172.19.0.3.

did you use that user for DB init? if not,'steve'@'localhost' is our default from readme. this could be the reason for denied access, because the ip/host are not matching.

@Digip76 I was having the same issue also using docker (didn't test different method). Using '!MyPassword' I couldn't connect to the DB and steve container crashed (trying to connect). I solved it changing the password to 'MyPassword'.

@goekay @faculoyarte Thanks for you replies. I already had given up. When I have time shortly I will look at it again and let you know my results.