Skip to content

HTTP 404 error when runnig the Openforis Collect Docker container #162

@omarlabidi

Description

@omarlabidi

I runned the Postgresql Docker container and the Collect Docker container
and i had the "HTTP 404" error message when trying to load "http://localhost:8080/collect"

when running the Collect Docker container i had this error message "Connection to localhost:5432 refused" . more detail below

2023-06-13 11:09:00,452 WARN [main] support.AbstractApplicationContext (AbstractApplicationContext.java:591) - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/openforis/collect/application-context-core.xml]: Invocation of init method failed; nested exception is liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Cannot create PoolableConnectionFactory (Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)

2023-06-13 11:09:00,456 ERROR [main] context.ContextLoader (ContextLoader.java:299) - Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/openforis/collect/application-context-core.xml]: Invocation of init method failed; nested exception is liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Cannot create PoolableConnectionFactory (Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)

any one had this issue?

this is my collect.env file
COLLECT_DB_DRIVER=org.postgresql.Driver
COLLECT_DB_URL=jdbc:postgresql://localhost:5432/arena
COLLECT_DB_USERNAME=arena
COLLECT_DB_PASSWORD=arena

this was the command to run Postgresql container
docker run -d --name collect-db -p 5432:5432 -e POSTGRES_DB=arena -e POSTGRES_PASSWORD=arena -e POSTGRES_USER=arena postgis/postgis:12-3.0

and this was the command to run the collect container
docker run -m 4GB -p 8080:8080 --env-file ./collect.env openforis/collect:latest

and i tried with diffrent database connexion parameter
database login passwd
collect collect collect123
arena arena arena

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions