Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

My Confluence and Postgres DB couldn't sync together

Hassan Akhavanpour
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 7, 2022

I made a Confluence on a VM and a Postgres on the other one. I synchronized them by configuring pg_hba.conf for Postgres and confluence.cfg.xml for Confluence that they are working well.

However, I wanted to use containerized dockers method for this purpose to ship and run more easily. So for Confluence, pulled a CentOS image, ran its container and transferred confluence VM files to the CentOS container by "docker cp" command. Entered to confluence.cfg.xml and edited it based on my Postgres variables, made an image by "docker commit" and finally ran a container as following:

docker run -it -p 8090:8090 confimg

In next step, I provided a backup from my Postgres VM by "pg_dump confdb". Pulled a Postgres image, ran its container and copied dumped file to this container. Made a database, user, granted all privileges and extracted dumped files to it. Configured pg_hba.conf and made an image and ran a Postgres container.

Now we expected to use it flawless in browser by entering:

http://192.168.100.176:8090/

But can be seen an error like this:

BootstrapException: Unable to bootstrap application: Failed to parse config file: Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.

I received this error however my containers works without any issue.

2 answers

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 7, 2022

Welcome to the Atlassian Community!

Your confluence.cfg.xml is broken, you'll need to correct it.  Make sure you edit it with a plain text editor and that the XML is in the right format.

0 votes
Hassan Akhavanpour
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 9, 2022

Dear Nic;

Thanks for your reply.

I configure confluence.cfg.xml manually and change following items:

  • IP
  • Port
  • Username 
  • DB name
  • DB Password 
  • DB Username

Then make an image and run a container by it. I am sure about this file.

I dumped a TCP when Confluence trying to connect to Postgres and analyzed by Wireshark but no symptoms can be seen in this regard. 

Thanks for your consideration in advance. 

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 9, 2022

The error you are getting is quite unfriendly, it's not written in plain English.

In English, it means "the confluence.cfg.xml file is corrupt - it is not structured as well-formed XML".  That means the code cannot read it.

Whatever edits you made to the provided copy not true XML.  The error usually, but not always, means the file does not start with a valid XML tag.

Like Hassan Akhavanpour likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events