AWS ECS Fargate | AWS Postgres RDS | DotRuntimeException: javax.naming.NameNotFoundException: Name [jdbc/dotCMSPool] is not bound in this Context. Unable to find [jdbc]

7 views
Skip to first unread message

Sarvesh Padwal

unread,
Nov 16, 2022, 9:15:40 AM11/16/22
to dotCMS User Group
I have setup dotCMS 22.10 on AWS Fargate with Postgres RDS.
When I setup this first time, It worked without any issue.
Today I tried to run the new task again in AWS ECS (basically restart), it is failing with error.

14:09:02.261 WARN hikari.HikariConfig - jdbc/dotCMSPool - leakDetectionThreshold is less than 2000ms or more than maxLifetime, disabling it.

14:09:02.264 INFO hikari.HikariDataSource - jdbc/dotCMSPool - Starting...

14:09:13.467 ERROR pool.HikariPool - jdbc/dotCMSPool - Exception during pool initialization.

org.postgresql.util.PSQLException: The connection attempt failed.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:292) ~[postgresql-42.2.8.jar:42.2.8]
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) ~[postgresql-42.2.8.jar:42.2.8]
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195) ~[postgresql-42.2.8.jar:42.2.8]
at org.postgresql.Driver.makeConnection(Driver.java:458) ~[postgresql-42.2.8.jar:42.2.8]
at org.postgresql.Driver.connect(Driver.java:260) ~[postgresql-42.2.8.jar:42.2.8]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-3.4.2.jar:?]
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:354) ~[HikariCP-3.4.2.jar:?]
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:202) ~[HikariCP-3.4.2.jar:?]
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473) ~[HikariCP-3.4.2.jar:?]
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:554) ~[HikariCP-3.4.2.jar:?]
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) ~[HikariCP-3.4.2.jar:?]
at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81) ~[HikariCP-3.4.2.jar:?]
at com.dotmarketing.db.SystemEnvDataSourceStrategy.apply(SystemEnvDataSourceStrategy.java:105) ~[dotcms_22.03.2_999999.jar:?]
at com.dotmarketing.db.DataSourceStrategyProvider.get(DataSourceStrategyProvider.java:86) ~[dotcms_22.03.2_999999.jar:?]
at com.dotmarketing.db.DbConnectionFactory.getDataSource(DbConnectionFactory.java:116) ~[dotcms_22.03.2_999999.jar:?]
at com.dotmarketing.db.DbConnectionFactory.getConnection(DbConnectionFactory.java:227) ~[dotcms_22.03.2_999999.jar:?]
at com.dotmarketing.db.DbConnectionFactory.startTransactionIfNeeded(DbConnectionFactory.java:684) ~[dotcms_22.03.2_999999.jar:?]
at com.dotmarketing.db.LocalTransaction.wrap(LocalTransaction.java:213) ~[dotcms_22.03.2_999999.jar:?]
at com.dotcms.enterprise.license.LicenseManager$1.run(SourceFile:168) ~[ee-22.03.2.jar:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412) ~[?:?]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255) ~[?:?]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237) ~[?:?]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]
at java.net.Socket.connect(Socket.java:609) ~[?:?]
at org.postgresql.core.PGStream.<init>(PGStream.java:75) ~[postgresql-42.2.8.jar:42.2.8]
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:91) ~[postgresql-42.2.8.jar:42.2.8]
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:192) ~[postgresql-42.2.8.jar:42.2.8]
... 19 more

14:09:13.472 WARN db.DataSourceStrategyProvider - Error initializing datasource. Reason: Failed to initialize pool: The connection attempt failed.Trying to load datasource from context.xml ...

14:09:13.472 WARN db.DataSourceStrategyProvider - Failed to initialize pool: The connection attempt failed.

14:09:13.480 WARN db.DataSourceStrategyProvider - com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:589)

14:09:13.492 ERROR db.TomcatDataSourceStrategy - ---------- Error getting dbconnection jdbc/dotCMSPool from context.xml

javax.naming.NameNotFoundException: Name [jdbc/dotCMSPool] is not bound in this Context. Unable to find [jdbc].

Will Ezell

unread,
Nov 16, 2022, 9:20:54 AM11/16/22
to dot...@googlegroups.com
Is this a dockerized installation?  You need to specify your db connection using env variables.  You can see the correct variables here.  You should not need to modify anything else.

https://github.com/dotCMS/core/blob/master/docker/docker-compose-examples/single-node-demo-site/docker-compose.yml#L42-L44

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/eff131fc-4e1f-432d-831c-befe00ac57c5n%40googlegroups.com.


--



382 NE 191st St #92150
Miami, Florida 33179-3899
Main: 
305-900-2001 | Direct: 978.294.9429

Sarvesh Padwal

unread,
Nov 16, 2022, 10:39:40 AM11/16/22
to dotCMS User Group
Hi Will,

Yes, It is dockerized application. It was working when I set it up the first time. When I try to re-run the container, it is failing

Reply all
Reply to author
Forward
0 new messages