Brand new build of confluence - webpage errors :(
Asked by Ilai Schechter:

Hey all,

just spun up a Centos7 box on my vm infrastructure - and when i go to my page (confluence.site.com) i get a whole page of fun and games. The "Cause" is listed below.

As its a fresh box, and yum updated, im not sure where to even start with this. Any pointers would be most welcome

### Cause {#toc-hId-1591337502}

com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Spring Application context has not been set  
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)

caused by: java.lang.IllegalStateException: Spring Application context has not been set  
at com.atlassian.spring.container.SpringContainerContext.getComponent(SpringContainerContext.java:48)


Answers:
author: Shannon S
body: Hello Ilai,

I would recommend starting here:

* [Confluence does not start due to 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)

There are 10 different causes/resolutions there, so you can go over those and see if you are able to resolve your issue.

Let us know if you have any trouble or questions.

Regards,

Shannon

comments: author: Ilai Schechter
body: Thanks Shannon!  
Going through those, I have gone thru resolutions 1,2,3,4 - confirmed 5, and will try a reinstall shortly now. resolution 6.


author: Ilai Schechter
body: Hi Shannon - removed all confluence directories and reinstalled confluence from the start. Not a fresh server (that's my last play, don't want to have to do that yet).

the start up process tarts, it lets me connect up to my database, and on the next step (after testing DB connection) and hitting next - it gives me the same error! tried restarting confluence to no avail :(  

When using systemctl to reload-or-restart, it gives me an error that when i use systemctl status gives me the below:

![confluence Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/12632iA4EA9D116A39183C/image-size/large?v=v2&px=999 "confluence Capture.PNG")


author: Shannon S
body: Hi Ilai,

The error you sent is showing "permission denied" which means the user still doesn't have the correct permissions to run Confluence.

I would recommend double-checking that the permissions on your [Confluence Home Directory](https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html) are set to the correct user, and then try to start Confluence again using start-confluence.sh as that user.

Let me know if you have any trouble.

Regards,

Shannon


author: Shannon S
body: Sorry, you will also want to check your install directory for the correct permissions in addition to that.

I know these steps are outlined on the first article I sent you, but there appears to still be something wrong with the permissions.

Regards,

Shannon


author: Ilai Schechter
body: Thanks Shannon,

Found that confluence was trying to execute as user 'confluence1', not 'confluence'. Changed the user.sh entry and got that working. All green now on the status of systemctl - but still getting the same error on the webpage.

All permissions were added as follows:

*chown -R confluence.confluence /opt/atlassian/*   
*chown -R confluence.confluence /var/atlassian/*   
*chown -R confluence /opt/atlassian/*   
*chown -R confluence /var/atlassian/*   
*chmod -R u=rwx,go-rwx /opt/atlassian/*   
*chmod -R u=rwx,go-rwx /var/atlassian/*

And confluence shell started as confluence' user.

![confluence Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/12704i0847D4AE82339A88/image-size/large?v=v2&px=999 "confluence Capture.PNG")


author: Shannon S
body: Glad you were able to resolve the permissions issue.

Back to the Spring Application error, I understand out of the 10 resolutions, you have checked 6. If you want to skip the resolution that asks you to do a fresh install for now, you can, but I would recommend checking the remaining 10.

Failing that, you can do a fresh install.

If you still have issues, then I can create a support ticket so we can have a deeper look at your logs, but it's important that we rule out all 10 usual causes before proceeding further.

Regards,

Shannon