I have a Confluence setup with lots of data uploaded and its important to retain the server

sahanajsj February 18, 2019

Actually having a confluence setup which was working fine earlier with lot of data, and later stopped working with the issues.

When start Confluence, noticing the below error:

@Confluence:/opt/atlassian/confluence/bin$ sudo ./start-confluence.sh -fg

What this error means and how to resolve the below error. It helps to troubleshoot. Any  suggestion are welcome.

 

HTTP Status 500 - java.lang.IllegalStateException: Spring Application context has not been set

type Exception report

message java.lang.IllegalStateException: Spring Application context has not been set

description The server encountered an internal error that prevented it from fulfilling this request.

exception

com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Spring Application context has not been set

 

 

 

3 answers

0 votes
Sid
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.
February 19, 2019

@sahanajsj ,

From the above replies I see all your configurations are fine.

step 1 - Do you have all you data backed up? If yes try to create a new database with and restore the data.

Try finishing this installation with empty database, once done try to point to the restored Db and restart the application. This should get all the previous data.

Let me know if that helps

0 votes
Kiran Panduga {Appfire}
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 18, 2019

Hi @sahanajsj , 

There are many reasons one see this error message while starting the Confluence. 

I would recommend to review the below Atlassian KB article which list out the reason for receiving the error

Spring Application context has not been set 

https://confluence.atlassian.com/confkb/confluence-does-not-start-due-to-spring-application-context-has-not-been-set-218278311.html

if you are still noticing the issue, share the complete error message log for additional review.

Thanks,

Kiran.

sahanajsj February 19, 2019

Thank you both for your suggestions.

Actually, I tried changing the ownership permissions of my "confluence" user. When running the confluence start/stop commands, still requires sudo permission. Please help, what to do now - I'm new to confluence setup. (trying to troubleshoot the existing setup, Installation and configuration setup has done by another engineer earlier)

confluence-permissions.PNG

Start Confluence:

confluence-commands.PNG

After starting Confluence, Im getting setupstart.action page as below:

confluence-webbrowser.PNG

sahanajsj February 19, 2019

I used these commands to change the permissions:

$ sudo chown -R confluence.confluence /var/atlassian/application-data/confluence

$ sudo chown -R confluence.confluence /opt/atlassian/confluence

$ sudo chmod -R u=rwx,go-rwx /var/atlassian/application-data/confluence

$ sudo chmod -R u=rwx,go-rwx /opt/atlassian/confluence

Kiran Panduga {Appfire}
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 19, 2019

Hi @sahanajsj , 

setupstart.action page indicates that the Confluence has started, now you just need to complete the installation steps and configure your database schema

After which you should be able to login and access the Confluence instance.

 

Thanks,

Kiran.

sahanajsj February 19, 2019

Thanks for the reply, but I wonder these installation steps configurethe confluence newly? or will i able to get the earlier configured setup which has my data and files. 

sahanajsj February 19, 2019

@Kiran Panduga {Appfire} Im not clear at this point of installation, its like a new installation of confluence and configure to my existing/old Database?

How it works, can please brief me.

Kiran Panduga {Appfire}
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 19, 2019

@sahanajsj  Can you check if the home directory is pointing to the correct path by validating the below configuration file ?

/opt/atlassian/confluence/Confluence/WEB-INF/classes/confluence-init-properties

Also, verify the confluence.cfg.xml file in the home directory /var/atlassian/application-data/confluence, it should have reference to your old database schema.

If this file is missing, it will create new confluence.cfg.xml file and due to which new installation is starting.

Thanks,

Kiran

sahanajsj February 19, 2019

@Kiran Panduga {Appfire} 

I verified the configuration file, it seems pointing properly to home-directory

 

confluence-properties.PNG

In confluence.cfg.xml file, im not seeing any database schema related.

confluence-database.PNG

Now, what are the ways to look for existing database Schema or to configure again to retain the data without any loss.?

 

Please suggest.

Kiran Panduga {Appfire}
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 19, 2019

Hi @sahanajsj , 

I'm afraid, now there are only two options to retain the existing data.

  • Do you have a copy of your old home directory ? If so, you can restore it.

(or)

  • If you were using MySQL database schema, then try adding the below parameters into the confluence.cfg.xml file to point to your existing database and then restart the Confluence. It should bring up the old data.

{code}

<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.password">confluencepass</property>
<property name="hibernate.connection.url">jdbc:mysql://<servername>/<databasename>?autoReconnect=true</property>
<property name="hibernate.connection.username">confluencedbuser</property>
<property name="hibernate.database.lower_non_ascii_supported">true</property>
<property name="hibernate.dialect">com.atlassian.hibernate.dialect.MySQLDialect</property>

{code}

For more information, refer to the below KB article

https://confluence.atlassian.com/confkb/how-to-find-confluence-s-database-connection-parameters-779172320.html

Thanks,

Kiran.

0 votes
Sid
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.
February 18, 2019

Hi @sahanajsj ,

This error is  likely to be a permission issue. Make sure you apply the correct permissions  to the sub-folders as well of your home-directory and install-folder. (read and write permissions are to be given). 

If that doesn't solve the issue, post the logs

Sid
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.
February 18, 2019

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events