Forums

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

Confluence startup failed after upgrade to 7.13,error: Couldn't save confluence.cfg.xml to directory

sysops@altibox.no September 9, 2021

upgrading from v7.8 to v7.13

confluence startup failed with the error:

"BootstrapException: Unable to bootstrap application: Couldn't save confluence.cfg.xml to /srv/confluence directory."

it seems it is a permission error. I have tried changing the home and installation permission using this and this. but no success. my current home and installation directories permissions are as below:

home directory:

sudo ls -la /srv/confluence/
total 420
drwx------. 25 confluence confluence 4096 sep. 8 14:41 .
drwxr-xr-x. 4 root root 35 des. 14 2017 ..
drwx------. 2 confluence confluence 4096 aug. 4 06:21 analytics-logs
drwx------. 3 confluence confluence 20 feb. 2 2010 attachments
drwx------. 2 confluence confluence 6 okt. 4 2013 bundled-plugins
drwx------. 2 confluence confluence 90 mars 24 2012 bundled-plugins_language
drwx------. 2 confluence confluence 6 april 14 2015 config
-rw-r-----. 1 confluence confluence 3598 sep. 9 08:41 confluence.cfg.xml
drwx------. 2 confluence confluence 106 aug. 10 2017 export
drwx------. 2 confluence confluence 4096 okt. 14 2009 framework-bundles
drwx------. 252 confluence confluence 12288 juni 19 2018 imgEffects
drwxr-x---. 5 confluence confluence 4096 sep. 8 14:42 index
drwxr-x---. 2 confluence confluence 42 sep. 8 06:38 journal
-rw-------. 1 confluence confluence 0 jan. 6 2016 lock
drwx------. 2 confluence confluence 4096 sep. 8 14:41 logs
drwx------. 2 confluence confluence 6 mars 24 2012 plugin-cache
drwxr-x---. 2 confluence confluence 8192 sep. 8 14:42 plugins-cache
drwx------. 5 confluence confluence 71 feb. 2 2010 plugins-osgi-cache
drwx------. 2 confluence confluence 69632 sep. 8 14:42 plugins-temp
drwx------. 2 confluence confluence 4096 sep. 8 14:42 recovery
drwx------. 5 confluence confluence 51 aug. 6 2009 resources
drwx------. 2 confluence confluence 6 sep. 18 2007 restore
drwx------. 9 confluence confluence 207 okt. 3 2019 shared-home
-rw-------. 1 confluence confluence 450 aug. 7 2017 synchrony-args.properties
drwx------. 5 confluence confluence 111 sep. 8 11:37 temp
drwx------. 1868 confluence confluence 45056 juni 11 2015 thumbnails
drwx------. 2 confluence confluence 131072 april 3 2019 viewfile
drwx------. 2 confluence confluence 6 sep. 8 12:47 webresource-temp

installation directory

sudo ls -la /opt/atlassian/confluence/

total 224
drwxr-xr-x. 13 root root 4096 sep. 8 13:28 .
drwxr-xr-x. 6 confluence confluence 270 sep. 8 12:58 ..
drwxr-xr-x. 3 root root 4096 sep. 8 14:45 bin
-rw-r--r--. 1 root root 19542 mars 30 13:29 BUILDING.txt
drwxr-xr-x. 3 root root 256 sep. 8 13:22 conf
drwxr-xr-x. 27 root root 4096 sep. 8 12:55 confluence
-rw-r--r--. 1 root root 5728 mars 30 13:29 CONTRIBUTING.md
drwxr-xr-x. 7 root root 164 okt. 1 2020 jre
drwxr-xr-x. 2 root root 4096 sep. 8 12:55 lib
-rw-r--r--. 1 root root 58153 mars 30 13:29 LICENSE
drwxr-xr-x. 2 root root 57344 sep. 8 12:55 licenses
drwx------. 2 confluence root 4096 sep. 9 11:02 logs
-rw-r--r--. 1 root root 2401 mars 30 13:29 NOTICE
-rw-r--r--. 1 root root 2294 aug. 16 03:43 README.html
-rw-r--r--. 1 root root 3336 mars 30 13:29 README.md
-rwxr-xr-x. 1 root root 1204 aug. 16 03:43 README.txt
-rw-r--r--. 1 root root 7072 mars 30 13:29 RELEASE-NOTES
-rw-r--r--. 1 root root 16984 mars 30 13:29 RUNNING.txt
drwxr-xr-x. 4 root root 37 sep. 8 12:55 synchrony-proxy
drwx------. 2 confluence root 63 sep. 8 14:42 temp
drwxr-xr-x. 2 root root 6 aug. 16 03:44 webapps
drwx------. 3 confluence root 24 sep. 9 11:20 work

for starting up I have tried:

su confluence

./bin/start-confluence.sh

and also as root

but I got the same error message each time.

 

 

EDIT:

my problem is solved now, I used this command to restore the configs for the '/srv/confluence' and then I tried again to start the confluence. 

sudo restorecon -r -v /srv/confluence/ 

thank you guys.

2 answers

0 votes
Alexis Robert
Community Champion
September 9, 2021

Hi sysops@altibox.no , 

 

if you're getting this error but the folder permissions look fine, it might be that the volume is mounted in read only. You might want to check this with your System Administrator.

Otherwise, when after you "su - confluence", can you create a file in /srv/confluence/ ? Something like : 

touch /srv/confluence/test

 

Let me know if this helps, 

 

--Alexis

0 votes
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.
September 9, 2021

You should not run Confluence as root.

But we can see that you have in the past, because the file and directory ownership in your second picture are showing the pattern I'd expect from running it as root.

  • Stop the Confluence again, if it is still running (you may have to manually kill it with "kill -9" even if the "stop-confluence.sh" reports a success - always check with "ps -ef | grep confluence" or whatever you prefer to make sure it is properly dead)
  • Run these two:
    • chown -R confluence:confluence /srv/confluence
      chown -R confluence:confluence /opt/atlassian/confluence
  • Restart Confluence under the confluence user account


This should enable it to continue with the installation.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.13
TAGS
AUG Leaders

Atlassian Community Events