waitForDatabase does not work if no port is specified
Closed this issue · 3 comments
The recent update to 7.9.1 broke our sonar. The reason was that our SONARQUBE_JDBC_URL
did not specified a port and the script could not determine if the database was up. As specified in PostgreSQL JDBC Driver a port is not needed in the URL.
Easy workaround is of course to specify a port. But I think it would be better to have a solution that works without a port.
I will look into it but am not sure if we will fix it because, even though we only use postgresql with the sonar instances we support at ICTU, sonar does support other databases.
As far as I know all database drivers have the port optional. See Example 3.1 at MySQL J Connector
Oracle JDBC url looks completely different but also has port optional.
Sure, but we do not support that. We currently only support postgresql. We need to update that in the readme. Fixing the script to support default ports for all databases will needlessly complicate it but we can add the default postgresql port if it is not specified.
However I do believe it is better to make configuration explicit and not rely on default values.