Atlassian Database Check Utility - No suitable driver found for jdbc:postgres
Asked by Andrew Samokish:

Hello,

I\`m trying to install Confluence 5.1.5 with custom PostgreSQL database to restore the existing database and then upgrade to a newer one.

I\`m not able to connect to PostgreSQL server at the setup step, can you help me, please?

I did manage to setup testdatabase.jsp and got this result (<https://confluence.atlassian.com/conf63/troubleshooting-external-database-connections-929729726.html>):

Found driver (org.postgresql.Driver) on classpath Connection failed to open on the JDBC URL: java.sql.SQLException: No suitable driver found for jdbc:postgres://localhost:5492/test

I have PostgreSQL 9.2 installed on my PC (found, that Confluence 5.1.5 contains a driver for PostgreSQL 9.2)


Answers:
author: Shannon S
body: Hello Andrew,

Thank you for reaching out! Happy to help.

I believe your error might be due to a misconfiguration in the database URL, due to what I read from the article [PostgreSQL: "java.sql.SQLException: No suitable driver found"](https://confluence.atlassian.com/jirakb/postgresql-java-sql-sqlexception-no-suitable-driver-found-828780512.html).

Have a look at our article on [Database Setup for Postgresql](https://confluence.atlassian.com/doc/database-setup-for-postgresql-173244522.html) for details:
> The database URL is entered in this format:
>
> ```
> jdbc:postgresql://<server>:<port>/<database>
> ```
>
> For example:   
> `jdbc:postgresql://localhost:5432/confluence`
>
> **I** f you need to connect to an SSL database, add the `ssl=true` parameter in the database URL. For example:   
> `jdbc:postgresql://localhost:5432/confluence?ssl=true`

Your URL is using **postgres** rather than **postgresql**. I would recommend updating that and let me know if you're able to connect.

In addition, due to the two recent security advisories, ([Confluence Security Advisory - 2019-03-20](https://confluence.atlassian.com/doc/confluence-security-advisory-2019-03-20-966660264.html) and [Confluence Security Advisory - 2019-04-17](https://confluence.atlassian.com/doc/confluence-security-advisory-2019-04-17-968660855.html)), you will want to upgrade to the latest Confluence versions.

My recommended changes would be:

1. Make sure your Postgres server is on version 9.4, 9.5, or 9.6. Create a new database for Confluence.
2. Create a clean install of the latest Confluence version.
3. Connect your new Confluence instance to the new database.
4. Restore your Confluence site XML backup at this step. Note we do not recommend restoring from a database dump, the XML backup is the way to go.

Let me know if you have any questions about this.

Regards,

Shannon

comments: author: Andrew Samokish
body: Hello Shannon,

As I understand, to perform the XML backup I need to have a workable Counfluence (we have only database backup).

And also I need to restore the old confluence before and perform the upgrade then.

I did manage to install the Confluence 5.1.5, the problem was related to JRE - the version #7 (not supported for now) was required to make it work.

Now we can perform XML backup and migrate to a newer Confluence.

I think the best possibility for us is to use Cloud Confluence instead of the local server.

Sincerely yours, Andrew


author: Shannon S
body: Andrew,

My apologies, as your message indicated you were migrating from 5.1.5, I was not aware that your previous installation was also not in working order. In addition, when migrating the initial step is to create the XML backup so I was not aware that you hadn't had a chance to do that yet.

If you wish to migrate from Server to Cloud, then you will want to upgrade first to 5.10 or higher so you can use the [Server to Cloud migration tool](https://marketplace.atlassian.com/apps/1219672/cloud-migration-assistant-for-confluence?hosting=server&tab=overview&_ga=2.202018065.1645456266.1556008674-1483961444.1556008674).

Please review [Plan your Confluence Server to Cloud Migration](https://confluence.atlassian.com/confcloud/plan-your-confluence-server-to-cloud-migration-724765529.html) for full details on how to migrate to Cloud. Let us know if you have any question or get stuck along the way.

Regards,  
Shannon


author: Andrew Samokish
body: Thank you Shannon, those links and information are useful to me

Regards,

Andrew


author: Shannon S
body: You're welcome, Andrew!

Just let us know if you have any trouble during your migration.

Regards,

Shannon


author: Andrew Samokish
body: I have another question about Attachments:

I have Confluence 5.1.5 working and i need to recover attachments form my old install (backup is broken :( )

i want to understand the Confluence storage system

found this:

<https://confluence.atlassian.com/doc/hierarchical-file-system-attachment-storage-704578486.html>

but when i did upload my file - i don\`t have it in this structure and don\`t have it in 'AttachmentsData' table.. where it could be (file is accessible)?


author: Andrew Samokish
body: sorry, did check wrong folder


author: Shannon S
body: Hi Andrew,

Were you able to obtain the attachments when you discovered you were checking the wrong folder?

Regards,

Shannon


author: Andrew Samokish
body: Hello Shannon,

I have several Confluence installations, 64 and 32 bit (were looking for the solution of the first reported problem - about the JRE). So i missed between two Program Files foldres - for 64 and 32 bit applications.

Regards, Andrew


author: Shannon S
body: Hi Andrew,

Thank you for letting me know! Could you let us know if you were able to complete the installation? Are you still having any issues?

Regards,

Shannon


author: Andrew Samokish
body: now everything ok except the license. I would like to set the old license key but can\`t find the way


author: Shannon S
body: Andrew,

What error are you getting about the license? Are you trying to change from an older license to a new one, or just add the license for the first time?

I'll share some documentation here that can help you, but we'll need to the exact issue you're having with the license.

* [Managing your Confluence License](https://confluence.atlassian.com/doc/managing-your-confluence-license-313467774.html) - For information on how to find your license as well as how to update it in the UI.
* [How to change the Confluence License in confluence.cfg.xml](https://confluence.atlassian.com/confkb/how-to-change-the-confluence-license-in-confluence-cfg-xml-720405151.html) - How to manually update the license in the Confluence backend

Looking forward to hearing from you.

Regards,

Shannon


author: Andrew Samokish
body: Hello Shannon,

Maybe I misunderstood something:

we have an old server with a very old expired license (expired on 2011).

but this license allows us to work on this server without Confluence updates and support.

Now we do investigate migration possibilities, so we did install a totally new server with the evaluation license. But when I do try to set the old (expired) license key instead of 'evaluation' one - I see the error 'Confluence support and upgrades for this license ended on **19 Oct 2011** . This license is not valid.' , yet the installed Confluence version is also 'old' and satisfies the period of time when confluence license was OK

seems using this case is not possible and we need to purchase new one, right?

Sincerely yours, Andrew


author: Shannon S
body: Andrew,

That's correct; you can use a license for as long as it's valid and that includes any updates released within that time period.

If you want to install a version of Confluence that came out after the license expired, then you will need to renew it. You can go to <https://my.atlassian.com> to take care of that, or contact our Customer Advocates team directly at [support.atlassian.com](https://support.atlassian.com/contact).

I hope that helps get you in the right directly, but let me know if you have any trouble.

Once you have your new license, you can update it with the information I provided you yesterday.

Take care!

Regards,

Shannon


Tags: confluence-server

postgres

server