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.url must be set when running command but already set in flyway.conf #2709

Closed
nickeeromo opened this issue Mar 7, 2020 · 3 comments
Closed

Comments

@nickeeromo
Copy link
Contributor

@nickeeromo nickeeromo commented Mar 7, 2020

First of all there are other similar issues that were closed, but wanted to post this here bc I have a solution.

Which version and edition of Flyway are you using?

flyway-commandline-6.3.0-macosx-x64

If this is not the latest version, can you reproduce the issue with the latest one as well?

(Many bugs are fixed in newer releases and upgrading will often resolve the issue)

latest

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

command-line

Which database are you using (type & version)?

MS SQL Server (though not relevant in this case)

Which operating system are you using?

MacOS

What did you do?

(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)

opened conf/flyway.conf
There are a LOT of notes that I don't care to look over, so added conf entries at the very top just to get started.

Put in the following entries at the top:
flyway.url=jdbc:sqlserver://WCNCMAADBD01:54433
flyway.user=MAA_CUM_SQD
flyway.password=password

tried the command:
flyway info

just to see if connection working.

What did you expect to see?

Anything besides a message saying a property I set was not set :)

What did you see instead?

WARNING: Discarding INCOMPLETE dataSource configuration! flyway.url must be set.
Flyway Community Edition 6.3.0 by Redgate
ERROR: Unable to connect to the database. Configure the url, user and password!

Solution

So I'm about 99% sure it was due to this line:

https://github.com/flyway/flyway/blob/master/flyway-commandline/src/main/assembly/flyway.conf

line 43:
flyway.url=

The ONLY line that is not commented-out in the whole document.

I cut all the original contents from flyway.conf out and pasted them somewhere else for safe-keeping, leaving my settings in, ran the command again and it worked fine. After inspecting the different supported url formats, saw that uncommented line at the end of that section.

Thank you!

@nickeeromo
Copy link
Contributor Author

@nickeeromo nickeeromo commented Mar 7, 2020

Forked and submitted a PR:
#2710

@nickeeromo
Copy link
Contributor Author

@nickeeromo nickeeromo commented Mar 7, 2020

Similar issue (should probably have seen a different message other than flyway.url must be set):
#2211

@MikielAgutu
Copy link
Contributor

@MikielAgutu MikielAgutu commented Mar 10, 2020

Thanks for the contribution

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

3 participants