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-maven-plugin: missing $ sign in password #1389

Closed
timmson opened this issue Aug 2, 2016 · 1 comment
Closed

flyway-maven-plugin: missing $ sign in password #1389

timmson opened this issue Aug 2, 2016 · 1 comment

Comments

@timmson
Copy link

timmson commented Aug 2, 2016

What version of Flyway are you using?

<dependency> <groupId>org.flywaydb</groupId> <artifactId>flyway-maven-plugin</artifactId> <version>4.0.3</version> </dependency>

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)

Maven plugin

What database are you using (type & version)?

PostgreSQL 9.4 (driver)
<dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.4.1207</version> </dependency>

What operating system are you using?

timmson@computer:$ uname -a
Linux computer 4.4.0-31-generic #50
14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

What did you do?

(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
my plugin config:
<plugin> <groupId>org.flywaydb</groupId> <artifactId>flyway-maven-plugin</artifactId> <version>4.0.3</version> <configuration> <url>jdbc:postgresql://server-db:5432/devdb</url> <user>user</user> <password>pa$$word</password> </configuration> <dependencies> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.4.1207</version> </dependency> </dependencies> </plugin>

What did you expect to see?

mvn flyway:info connects successfully

What did you see instead?

[ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:4.0.3:info (default-cli) on project ers: org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource (jdbc:postgresql://server-db:5432/devdb) for user 'user': FATAL: password authentication failed for user "user" -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.flywaydb:flyway-maven-plugin:4.0.3:info (default-cli) on project ers: org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource (jdbc:postgresql://server-db:5432/devdb) for user 'user': FATAL: password authentication failed for user "user" at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:189) at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:185) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.maven.plugin.MojoExecutionException: org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource (jdbc:postgresql://server-db:5432/devdb) for user 'user': FATAL: password authentication failed for user "user" at org.flywaydb.maven.AbstractFlywayMojo.execute(AbstractFlywayMojo.java:541) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 11 more Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user " ![screenshot - 02 08 2016 - 10 07 41](https://cloud.githubusercontent.com/assets/3248561/17319925/8ba3ca2c-5899-11e6-8c76-98feee2882e1.png) user" at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:427) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:203) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65) at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:159) at org.postgresql.Driver.makeConnection(Driver.java:416) at org.postgresql.Driver.connect(Driver.java:283) at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnectionFromDriver(DriverDataSource.java:409) at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnection(DriverDataSource.java:370) at org.flywaydb.core.internal.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:50) at org.flywaydb.core.Flyway.execute(Flyway.java:1326) at org.flywaydb.core.Flyway.info(Flyway.java:1040) at org.flywaydb.maven.InfoMojo.doExecute(InfoMojo.java:31) at org.flywaydb.maven.AbstractFlywayMojo.execute(AbstractFlywayMojo.java:539) ... 13 more [ERROR] [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
screenshot - 02 08 2016 - 10 07 41

For flyway-cli everything is ok, this issue doesn`t appear

@axelfontaine
Copy link
Contributor

The code to connect to the database is shared by both the Maven plugin and the CLI and our tests indicate Maven passes $$ sequences correctly. Unable to reproduce.

@axelfontaine axelfontaine removed this from the Flyway 4.1 milestone Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants