Confluence won't open
Asked by Gabriel Henton:

I'm trying to open http://localhost:8090/confluence and http://localhost:8090 and I get this:

This site can't be reached {#toc-hId-1763007291}
------------------------------------------------

**localhost** refused to connect.

* Search Google for [localhost 8090](https://www.google.com/search?q=localhost%208090)

ERR_CONNECTION_REFUSED. I'm going through the Dragon Slayer challenge, Stage 3.


Answers:
author: Gabriel Henton
body: Permissions! Though I'm a local administrator, I went all out and set all users to full control (not just modify, though I'm sure modify would have done the trick). I'm in!


author: Shannon S
body: Hi, Gabriel!

Nice that you're using the Atlassian Dragon Quest! Let me help you out here. Now, the Dragon Quest is only meant to be used with the versions listed, so they're going to be quite out of date. It's meant to challenge you so there may be some missing pieces that you will need to discover. It's also not meant to be used when setting up a production Confluence instance, so if this is your purpose then you will want to make sure to follow [the current documentation](https://confluence.atlassian.com/doc/confluence-installation-guide-135681.html) on installing Confluence.

Now, I'm not sure which version of Confluence you are installing, but have a look here at my conf/server.xml file from my 6.4.1 installation:

![Screen Shot 2017-09-29 at 1.49.06 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/7045i86CA514655FF9912/image-dimensions/567x465?v=v2 "Screen Shot 2017-09-29 at 1.49.06 PM.png")

You can see I changed the port 8090 to 8641, so make sure that you still have 8090 next to that connector port if that is the port you want to use. You also want to make sure nothing else is running on that port, or that you don't have another Confluence instance running on the 8000 port, if you had multiple set up.

Additionally, that context path will be blank by default, and just show "" meaning you can only load at localhost from that port. so localhost:8090, for example. If you have Jira \*and\* Confluence running then you will want to set a Context path there. This would then be "confluence" since that's where you were trying to open Confluence. So please compare what you're using with this file.

One more thing, you want to make sure that port 8090 is open on your firewall.

Let me know if this helps or if you have any questions.

Kind Regards,  
Shannon

comments: author: Gabriel Henton
body: THANKS for your response, Shannon. I've turned my firewall completely off. My computer is not even listening on port 8090. It's listening on 8080 and 8005. I already have JIRA installed. It works fine. Any other ideas? I'd really like to get over this hurdle.


author: Shannon S
body: Gabriel,

Can you show me those lines in your server.xml file?

Can you confirm you fully stopped and started Confluence again from inside the /bin folder? You can show me the lines that it tells you after you run stop-confluence.sh and start-confluence.sh

One more thing you can do is look at the Confluence log itself and see what errors occur after the **Starting Confluence...** message.

Kind Regards,  
Shannon


author: Gabriel Henton
body: I looked in services (since it's supposedly running as a service) and there isn't a service named Confluence. There's only one Atlassian service, and that's JIRA.


author: Shannon S
body: Hi Gabriel,

Perhaps Confluence didn't start properly? Are you on Windows or Linux?

Have a look at [Start and Stop Confluence](https://confluence.atlassian.com/doc/start-and-stop-confluence-838416264.html) to make sure you are starting it properly.

You can still look at the [atlassian-confluence.log](https://confluence.atlassian.com/doc/working-with-confluence-logs-108364721.html) file for any startup errors: [Confluence Startup Problems](https://confluence.atlassian.com/confkb/confluence-startup-problems-troubleshooting-180846988.html). If you need help, just let me know what errors you see under **Starting Confluence...** in the log file.

Kind Regards,  
Shannon


author: Gabriel Henton
body: Now I get:

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

And there were errors when I ran start-confluence

![Capture2.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/7059iAE30B3F1564AFA49/image-size/large?v=v2&px=999 "Capture2.JPG")


author: Gabriel Henton
body: I'm in Windows.


author: Gabriel Henton
body: "Failed to create work directory" doesn't sound good.


author: Gabriel Henton
body: Any chance you could remote into my machine for a minute?


author: Gabriel Henton
body: It could be a permissions problem.


author: Shannon S
body: Hi Gabriel,

At least we are getting closer! Can you try having a look at this:

[The scratchDir specified is unusable](https://confluence.atlassian.com/confkb/the-scratchdir-specified-is-unusable-712410983.html)

[](https://confluence.atlassian.com/confkb/the-scratchdir-specified-is-unusable-712410983.html "The scratchDir specified is unusable")It seems the home directory you specified is having issues being created, most likely due to permissions. That article will help you to correct them.

Otherwise, I'm not able to remote into your machine, but I could give you a call on Monday. Let me know if you're still having issues after this evening and I'll be creating a ticket for you in our support system where you can provide your contact information.

Kind Regards,  
Shannon


author: Gabriel Henton
body: That was it. Though I'm a local administrator, I went all out and set all users to full control (not just modify, though I'm sure modify would have done the trick). I'm in!


author: Gabriel Henton
body: Thanks so much for you help. If you hadn't told me about the BIN folder, I never would have found that error message to google, which led me to permissions.


author: Shannon S
body: Great news!

![](https://gifrific.com/wp-content/uploads/2012/04/costanza-clap.gif)

Thank you for confirming that :) Glad you're up and running.

If you have any other troubles feel free to ask a new question and you can even tag me on it.

Kind Regards,  
Shannon


author: Gabriel Henton
body: The problem came back! Just randomly.


author: Gabriel Henton
body: Now it's working so long as I leave the command line open after running the batch script.


author: Shannon S
body: Hi Gabriel,

This is a side-effect of running Confluence on Windows when it's not set up as a service.

You can set up Confluence as a service by following this article: [Start Confluence Automatically on Windows as a Service](https://confluence.atlassian.com/doc/start-confluence-automatically-on-windows-as-a-service-172071.html)

One thing to keep in mind when running Confluence as a service on Windows is that it uses the Java installed on the computer rather than the settings built into Confluence. Therefore, you'll want to make sure to have the latest supported Java installed on your Windows machine and properly set the Java home. Have a look at Installing [Java for Confluence](https://confluence.atlassian.com/doc/installing-java-for-confluence-144212101.html). You'll want to set up that first and then a[ny system variables for Java](https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html) and then you can set up Confluence as a service.

Have a look at that and let me know if you have trouble :)

Kind Regards,  
Shannon