When trying to start a DevTest Registry or Enterprise Dashboard that is configured with an external database, the following error may be shown in the log file (registry.log for example).
java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
The component is not starting properly and may exit after some time.
Release: DevTest 8,9 and 10
Component: DevTest Registry, Enterprise Dashboard
This error is shown when it is not possible to connect to the external database.
We have this exception in order not to overload the logging if there is an issue with database connectivitiy.
To identify the reason why it is not possible to connect to the external database, add the following lines to the logging.properties file (around line 38):
log4j.logger.com.mchange.v2.c3p0=DEBUG
log4j.logger.com.mchange.v2.resourcepool=DEBUG
After saving the logging.properties file, restart the registry component once again. Now a more detailed reason will be shown in the log when it is not possible to connect, including a database vendor specific error. Typical reasons may include that the user's password has expired.
If this does not identify the issue or if you need further assistance, please open a support case.
Once you have addressed the issue, please do not forget to remove the above two properties from the logging.properties file.
This is to avoid too many unnecessary messages in the logs.
Example of a possible error caused by a firewall:
DEBUG com.mchange.v2.resourcepool.BasicResourcePool - An exception occurred while acquiring a poolable resource. Will retry.
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host 10.x.y.z, port 1433 has failed. Error: "connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190)