You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
Currently, the 3dcitydb-wfs-container will fail at startup, if the 3dcitydb instance it tries to connect to is not reachable for any reason. This is especially unfavorable when I try to start a 3dcitydb container and a 3dcitydg-wfs container linked to it using docker-compose.
Following exception is thrown:
15-Jan-2018 16:58:26.295 SEVERE [localhost-startStop-1] org.postgresql.Driver.connect Connection error:
org.postgresql.util.PSQLException: The connection attempt failed.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:275)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:194)
at org.postgresql.Driver.makeConnection(Driver.java:450)
at org.postgresql.Driver.connect(Driver.java:252)
...
...
...
15-Jan-2018 16:58:26.301 SEVERE [localhost-startStop-1] org.apache.tomcat.jdbc.pool.ConnectionPool.init Unable to create initial connections of pool.
org.postgresql.util.PSQLException: The connection attempt failed.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:275)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:194)
at org.postgresql.Driver.makeConnection(Driver.java:450)
at org.postgresql.Driver.connect(Driver.java:252)
...
...
...
Is it possible to make the wfs retry to connect for a certain period of time when starting (@clausnagel )?
After looking at the Optional database connection settings like maxWait etc. in the wfs documentation
I am not entirely sure how to configure the wfs properly to behave as described above, if this is possible with the optional connection settings.
Another option would be to use a wrapper script in the 3dcitydb-wfs image, that checks if the database is ready to accept connections, as described here: https://docs.docker.com/compose/startup-order/
However, there are several drawbacks with this option (e.g. psql and sqlplus requried in the image) and I would like to avoid that.
Big thanks ind advance!
The text was updated successfully, but these errors were encountered:
Adapted the WFS to connect to the database in a more lazy way. So if the connection cannot be established at service startup, there is no fatal exception anymore. Let me know if this version works better for your docker image.
Currently, the 3dcitydb-wfs-container will fail at startup, if the 3dcitydb instance it tries to connect to is not reachable for any reason. This is especially unfavorable when I try to start a 3dcitydb container and a 3dcitydg-wfs container linked to it using
docker-compose
.Following exception is thrown:
Is it possible to make the wfs retry to connect for a certain period of time when starting (@clausnagel )?
After looking at the Optional database connection settings like maxWait etc. in the wfs documentation
I am not entirely sure how to configure the wfs properly to behave as described above, if this is possible with the optional connection settings.
Another option would be to use a wrapper script in the 3dcitydb-wfs image, that checks if the database is ready to accept connections, as described here:
https://docs.docker.com/compose/startup-order/
However, there are several drawbacks with this option (e.g. psql and sqlplus requried in the image) and I would like to avoid that.
Big thanks ind advance!
The text was updated successfully, but these errors were encountered: