Execution of standalone jar fails (Flyway migration step) · Issue #760 · WebGoat/WebGoat · GitHub
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

Execution of standalone jar fails (Flyway migration step) #760

Closed
Grid-LTS opened this issue Feb 22, 2020 · 2 comments
Closed

Execution of standalone jar fails (Flyway migration step) #760

Grid-LTS opened this issue Feb 22, 2020 · 2 comments
Assignees
Labels
bug waiting for release Issue is fix, waiting on new release
Milestone

Comments

@Grid-LTS
Copy link

Executed:
docker-compose -f docker-compose-postgres.yml up

Docker image version: webgoat/webgoat-8.0 (v8.0.0.M26)
OS: MacOS 10.15.3
Docker: 19.03.5

Console output of webgoat_1:

ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyWayContainer' defined in class path resource [org/owasp/webgoat/DatabaseInitialization.class]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException:
webgoat_1     | Migration V1__init.sql failed
webgoat_1     | -----------------------------
webgoat_1     | SQL State  : 42P06
webgoat_1     | Error Code : 0
webgoat_1     | Message    : ERROR: schema "container" already exists
webgoat_1     | Location   : db/container/V1__init.sql (/home/webgoat/file:/home/webgoat/webgoat.jar!/BOOT-INF/lib/webgoat-container-v8.0.0-SNAPSHOT.jar!/db/container/V1__init.sql)
webgoat_1     | Line       : 1
webgoat_1     | Statement  : CREATE SCHEMA CONTAINER
@zubcevic
Copy link
Collaborator

The only compose yaml that definitely works now is:
docker stack init
docker stack deploy --compose-file goat-with-reverseproxy.yaml webgoatdemo

where docker-compose is also no longer used.

If you want to use a separate progresdb container this yaml might need some updates. I would at least also put in some depends_on so the database is started first, then webgoat and finally webwolf. If you get it to work please create a pull requests.

@Grid-LTS
Copy link
Author

I also tested without Docker. The same errors appears when using a native Postgres daemon and executing the jar. So this is not Docker related at all. For the moment I am reverting to v8.0.0.M25.

@Grid-LTS Grid-LTS changed the title Docker compose setup fails (Flyway migration step) Execution of standalone fails (Flyway migration step) Feb 25, 2020
@Grid-LTS Grid-LTS changed the title Execution of standalone fails (Flyway migration step) Execution of standalone jar fails (Flyway migration step) Feb 25, 2020
@nbaars nbaars self-assigned this Apr 19, 2020
@nbaars nbaars added bug waiting for release Issue is fix, waiting on new release labels Apr 27, 2020
@nbaars nbaars added this to the 8.1.0 milestone May 24, 2020
@nbaars nbaars closed this as completed May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug waiting for release Issue is fix, waiting on new release
Projects
None yet
Development

No branches or pull requests

3 participants