No suitable driver found (postgres 11)

riGGo January 11, 2022

Hi i try to setup a new confluence setup via docker-hub.

but the setup stucks on database setup with following output:

  • Configuring database failed
  • database.url.invalid.setup.message
  • java.sql.SQLException: No suitable driver found for confluence_db

yes i tried several combinations in database.url. If i test the connection via test-button, confluence say all is fine but its me not allowed to start the db setup D:

 

Maybe some people can help me :(

1 answer

1 accepted

0 votes
Answer accepted
Moses Thomas
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 11, 2022

@riGGo   Please follow the instructions  here  there is a link for you to download require driver.

Database Setup for PostgreSQL

Kind regards,

Moses

riGGo January 11, 2022

Ive checked the WEBINF folder - the jdbc driver is existing and up to date.

I can't find any other clues in the logs. 

Moses Thomas
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2022

@riGGo   Please could you provide the log file ?

riGGo January 17, 2022

the errors:

2022-01-11 19:11:06,373 ERROR [http-nio-8090-exec-6] [atlassian.config.bootstrap.DefaultAtlassianBootstrapManager] getTestDatabaseConnection Could not successfully test your database:
2022-01-11 19:11:06,377 ERROR [http-nio-8090-exec-6] [confluence.setup.actions.SetupDBTypeAction] setupDatabase Unable to connect to database: java.sql.SQLException: No suitable driver found for confluence_db
2022-01-14 09:01:04,788 ERROR [http-nio-8090-exec-3] [atlassian.config.bootstrap.DefaultAtlassianBootstrapManager] getTestDatabaseConnection Could not successfully test your database:
2022-01-14 09:01:04,804 ERROR [http-nio-8090-exec-3] [confluence.setup.actions.SetupDBTypeAction] setupDatabase Unable to connect to database: java.sql.SQLException: No suitable driver found for confluence_db
2022-01-16 17:49:43,884 ERROR [http-nio-8090-exec-2] [atlassian.config.bootstrap.DefaultAtlassianBootstrapManager] getTestDatabaseConnection Could not successfully test your database:
2022-01-16 17:49:43,886 ERROR [http-nio-8090-exec-2] [confluence.setup.actions.SetupDBTypeAction] setupDatabase Unable to connect to database: java.sql.SQLException: No suitable driver found for confluence_db

 the full log: https://pastebin.com/9UTx4XUc

my docker cmd:

sudo -iu ${confluence_uname} docker run -dit --restart always --name ${confluence_srv_name} -p ${bind_address}:${confluence_http_port}:8090 -p ${bind_address}:${confluence_synchrony_port}:8091 --network=${confluence_network} -h ${confluence_srv_name} -v ${confluence_install_folder}/volumes/${confluence_srv_volume}:/var/atlassian/application-data/confluence -v ${confluence_install_folder}/configs/${confluence_srv_volume}:/opt/atlassian/confluence/conf -e ATL_JDBC_URL=${confluence_db_name} -e ATL_DB_TYPE=${confluence_database} -e ATL_JDBC_USER=${confluence_db_user} -e ATL_JDBC_PASSWORD=${confluence_db_password} -e ATL_PROXY_NAME=${confluence_url} -e ATL_PROXY_PORT=${confluence_proxy_port} -e ATL_TOMCAT_SCHEME=${confluence_tomcat_scheme} -e ATL_TOMCAT_SECURE=${confluence_tomcat_secure} -e ATL_TOMCAT_PORT=${confluence_http_port} -e ATL_LICENSE_KEY=${confluence_license_key} ${confluence_repo_name}:${confluence_repo_version}

 

the postgresql-container is in the same network

the postgressql-container is reachable and useable, means i can connect to database manually and so on

 

edit: and i tried several versions of postgres (9.6/11/13)

riGGo January 19, 2022

So now I'm giving up... I've tried a number of drivers. But without success. Just one question... Do you also test your docker-hub builds? Maybe I'm the problem too. I wanted to recreate the situation with jira. Unfortunately I can't get my reverse proxy configured for this right now.

And now for Jira... It would be really helpful if you guys would update the documentation and I wouldn't have to waste my time with ATL_DB_TYPE=postgres72. apparently it is ATL_DB_TYPE=postgresql. In addition, a parameter for the license would be nice, as is the case with Confluence.

disappointing...

riGGo January 19, 2022

WTF!!! i find a solution

so i investigated the confluence.cfg.xml

and stumbled across this entry(property name="hibernate.connection.url"):

confluence_db

but in an older config i found this one:

jdbc:postgresql://confluence_db:5432/confluence_db

PLS fix this damn time waster and set correct string over ATL_DB_TYPE (if ATL_DB_TYPE=postgresql then jdbc:postgresql://confluence_db:5432/confluence)

  • maybe you want to add a new ATL_DB_PORT variable to specify an different db port
    • otherwise your automated setup will not work, or i missed something...
  • if you don't want to do this then please explain it in your documentation or how are people supposed to know? Another possibility would be that the setup wizard replaces this entry... (no he didnt)
    • because I thought: if ATL_DB_TYPE is set, then the part around the url (ATL_JDBC_URL) must be clear (set by confluence)
      • you are right an URL is a uniform resource locator

PS:

  • I hope you will fix it for me (and others)
  • and yes, in my older setup I never changed this variable
  • and yes, the file permissions and ownership are correct/unchanged

thx for your ATTENTION!

 

now i need a coffee or my head will explode...

 

Edit: Jira has no entry of hibernate.connection.driver_class even though ATL_DB_TYPE is set. perhaps you should pair this string with the choice of ATL_DB_TYPE. Or what's the point of setting ATL_DB_TYPE and ATL_DB_DRIVER. It's more or less the same information...

 

I wasn't allowed to post an answer to my first topic, so I took advantage of that opportunity

 

Moses Thomas
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 20, 2022

@riGGo  Does it mean that you managed to solve the issue ?

 

Kind regards,

Moses

riGGo January 20, 2022

yes

Like Moses Thomas likes this
Moses Thomas
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 20, 2022

@riGGo  Great!!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events