Cant setup postgres database for confluence
Asked by dimok106:

Hello!

I am trying to install confluence on my server. When i fill all fields to establish connnection and try test connection it is successfull. But when i press button "next" process of setting up takes just 0,5 -1 second after which filled form just became clear, reseting all data i entered. No error messages on the screen or in logs. No new tables in empty database.

I use Postgres 10 I know that it is not for sure supported (but i dont want to delete it - there is other databases and not sure the reason in this) but i also tryed MySql 5.7 - the same. Tryed to run Confluence in docker - the same.

:( Do you have any idea where can be problem?


Answers:
author: dimok106
body: Solved. This was about not creating confluence user in linux but installing as root.

Huh The main problem was with Chrome - because it suppressed mistake somewhere and didnt showed it, but Safari finally did and it became clear that it is problem with rights - Confluence couldnt create temp directory in Confluence working directory

comments: author: Shannon S
body: Happy to hear you were able to resolve the problem, Dmitry! Apologies for not having a chance to reply before-hand.

Take care, and have a pleasant rest of your week.

Regards,

Shannon


author: karim -Atlassway-
body: Hello [@dimok106](/t5/user/viewprofilepage/user-id/1676895)

Could you please tell me how to confugure it with chrome , the same problem for me , first when i test connection it's succeful but when i hit next

error : vps not autorize connection , im blocked .

I need your help please .

Regards

Karim


author: EdisonCh
body: Dear Dmitry,

Try this answer. I have the same trouble like yours - After successfully test database connection, press Next then wait for awhile before error happens (due to timeout)

<https://community.atlassian.com/t5/Confluence-questions/Ubuntu-18-04-Confluence-6-15-3-setup-db-problem/qaq-p/1071708>


author: dimok106
body: Yes you understood right. I tryed to follow steps you pointed and again the same happened after step 5 after step five again comes step 5. Indeed i tryed to create new databases several times and also tryed 4 different installations of confluence - from tar.gz, from bin, from docker, and last was on windows - every where the same - but everytime i tryed to connected to the same instance of postgres. I also tryed to change driver of postgres on more recent.

Concerning mySql - yes i tryed to install new driver, but i use mysql first time - and there is much longer setup proces - so i cant be sure i made every steps right, even may be sure i missed some steps (i didnt found configuration file after installation) - but finally i got the same result - test connection -successfull and then after next again step 5


author: Shannon S
body: Dmitry,

From my understanding, you're entering all the database details, and then when you hit **Next**, the screen sits for about ,5-1 second and then it comes back to the screen asking you to enter database details again. Is this correct?

Can you try running through the steps at the below article and let me know if that helps you get to the next step?

* [How to Generate a New confluence.cfg.xml](https://confluence.atlassian.com/confkb/how-to-generate-a-new-confluence-cfg-xml-425461512.html)

Make sure Confluence is completely stopped before proceeding! There is no need to backup your existing database or home directory if this is a brand-new installation.

1.
   > Create a new, blank database. This is solely for creating the new `confluence.cfg.xml`file and will be discarded later.
2.
   > Create a temporary home directory. This is solely for creating the new `confluence.cfg.xml` file and will be discarded later.
3.
   > Edit `<confluence_install_directory>/confluence/WEB-INF/classes/confluence-init.properties` by changing it to point to the temporary home directory you created in Step 3.
4.
   > Start Confluence.
5.
   > Go through the Setup Wizard. On the database configuration screen, point Confluence to the database you created in Step 2.
6.
   > Complete the Setup Wizard.
7.
   > Once the installation is complete, shut down Confluence.
8.
   > At this point you should have a brand new Confluence installation with a temporary home directory containing a new (and complete) `confluence.cfg.xml` file.
9.
   > Copy that file to your actual home directory (the one you backed up in Step1). Delete the old `confluence.cfg.xml` file if it exists.
10.
    > Modify the new `confluence.cfg.xml` file by changing the database connection string so that it's pointing to your production DB.
11.
    > Modify `<confluence_install_directory>/confluence/WEB-INF/classes/confluence-init.properties` again by pointing it back to your existing Confluence home.
12.
    > Start Confluence.

As for when you test with MySQL, you can confirm you've already added the MySQL driver? Postgres 10 is indeed not supported but I believe some users have gotten it to work. See this request below for more details:

* [CONFSERVER-52715](https://jira.atlassian.com/browse/CONFSERVER-52715) *Support for PostgreSQL 10*

Regards,

Shannon

comments: author: dimok106
body: Tryed to run Postgres 9.5 in Docker and setup it - the same result- can connect via pg admin - do any actions , test connection successfull - but after "next" again step 5


Tags: confluence-server

postgres

server