Confluence (self-hosted) fails to start
Asked by Pascal Crausaz:

Following an update to macOS High Sierra 10.13.2 Beta (17C60c) my local instance of Confluence fails to start this morning. I was running running Confluence 6.2.3 so I tried to update to Confluence 6.5.0, but I get the same error:

06-Nov-2017 08:00:35.807 INFO \[localhost-startStop-2\] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'dispatcher': initialization completed in 1126 ms06-Nov-2017 08:00:41.591 SEVERE \[localhost-startStop-1\] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file06-Nov-2017 08:00:41.591 SEVERE \[localhost-startStop-1\] org.apache.catalina.core.StandardContext.startInternal Context \[\] startup failed due to previous errors06-Nov-2017 08:00:41.658 WARNING \[localhost-startStop-1\] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application \[ROOT\] registered the JDBC driver \[org.postgresql.Driver\] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

Any suggestions?


Answers:
author: AnnWorley
body: Please stop Confluence using the **stop-confluence.sh** script and as you start it again, use

```
tail -f atlassian-confluence.log?
```

to watch as it starts up. After the catalina.out logs a line like "server startup in so-many ms" then atlassian-confluence.log should have an entry "Starting Confluence .... version" etc

On a healthy startup, there will be a system report, then a list of plugins loading, then the message "Confluence is ready to serve". To find the issue, look for any ERROR entries between Starting Confluence and Confluence is ready to serve.

I look forward to hearing what you find and will be happy to help research any errors.

comments: author: Pascal Crausaz
body: Hi Ann, here is the output, as you can see it stops right away:

2017-11-06 10:47:10,278 INFO \[localhost-startStop-1\] \[com.atlassian.confluence.lifecycle\] contextInitialized Starting Confluence 6.5.0 \[build 7502 based on commit hash b9217199c27dd617c8d51f6186067d7767c5001b\] - synchrony version 2.1.0-release-confluence_6.5-8d720dbe  
2017-11-06 10:47:13,302 INFO \[localhost-startStop-1\] \[atlassian.confluence.cluster.DefaultClusterConfigurationHelper\] lambda$populateExistingClusterSetupConfig$1 Populating setup configuration if running with Cluster mode...  
2017-11-06 10:47:13,580 INFO \[localhost-startStop-1\] \[springframework.web.context.ContextLoader\] initWebApplicationContext Root WebApplicationContext: initialization started  
2017-11-06 10:47:16,092 WARN \[localhost-startStop-1\] \[atlassian.confluence.setup.ConfluenceAnnotationConfigWebApplicationContext\] refresh Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hostComponentProvider': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.atlassian.plugin.spring.SpringHostComponentProviderFactoryBean.setSpringHostComponentProviderConfig(com.atlassian.plugin.spring.SpringHostComponentProviderConfig); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource \[databaseSubsystemContext.xml\]: Cannot resolve reference to bean 'tenantRegistry' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantRegistry' defined in class path resource \[applicationContext.xml\]: Cannot resolve reference to bean 'eventPublisher' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eventPublisher' defined in class path resource \[services/eventServiceContext.xml\]: Cannot create inner bean 'com.atlassian.event.internal.EventPublisherImpl#1b4eb342' of type \[com.atlassian.event.internal.EventPublisherImpl\] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.event.internal.EventPublisherImpl#1b4eb342' defined in class path resource \[services/eventServiceContext.xml\]: Cannot resolve reference to bean 'eventDispatcher' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eventDispatcher' defined in class path resource \[services/eventServiceContext.xml\]: Cannot resolve reference to bean 'threadLocalContextManager' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'threadLocalContextManager' defined in URL

Full file at : [https://pastebin.com/s8iSvP42](https://pastebin.com/s8iSvP42?)


author: AnnWorley
body: If there is nothing confidential in the log, could you post it again? It appears to have been removed.


author: Pascal Crausaz
body: Sorry, did not see the message till now, try this: <https://www.dropbox.com/s/8v437x4tpx5l170/atlassian-confluence.log?dl=0>


author: AnnWorley
body: Hi Pascal,

Thanks for the log! I think it's a name resolution issue based on:

```
Invocation of init method failed; nested exception is java.lang.IllegalStateException: Unable to get Inet address
```

and

```
Caused by: java.net.UnknownHostException: Failed to determine LAN address: java.net.SocketException: Operation not permitted
```

Please try the resolution on: [Unable to start Confluence due to java.net.BindException: Cannot assign requested address](https://confluence.atlassian.com/confkb/unable-to-start-confluence-due-to-java-net-bindexception-cannot-assign-requested-address-297666525.html) Basically, add an entry for localhost to the /etc/hosts file on your Mac.

I look forward to hearing whether that helps.

Thanks,

Ann


author: Pascal Crausaz
body: No luck, /etc/hosts already includes localhost (and is un-commented.![localhost.png](https://community.atlassian.com/t5/image/serverpage/image-id/9071iD57BDBA5B211F6FD/image-size/large?v=v2&px=999 "localhost.png")


author: AnnWorley
body: It looks like you may need to also add the Mac's host name to the hosts file, check this out:

[java.net.InetAddress: getLocalHost() slow after MacOS Sierra upgrade?](https://thoeni.io/post/macos-sierra-java/)

Please remember to restart your Mac after editing the file, to pick up the change. If Confluence still won't start, please post a new log.


author: Pascal Crausaz
body: Nope, that did not do it:  
![hosts.png](https://community.atlassian.com/t5/image/serverpage/image-id/9336i7581E0606B9EA197/image-size/large?v=v2&px=999 "hosts.png")


author: AnnWorley
body: I was surprised when I ran the *hostname* command on my Mac. It wasn't what I expected, it didn't have the **.local** for one thing. Please make sure the right hostname is in the hosts file by running the *hostname* command in a Terminal window.

If Confluence still doesn't start, please post a new log so I can see if it's the same error.


author: Pascal Crausaz
body: It does include .local for me (see below).  

![hostname.png](https://community.atlassian.com/t5/image/serverpage/image-id/9407i472C36C7CA4767E3/image-size/large?v=v2&px=999 "hostname.png")

It still does not work. New logs at he link below

<https://www.dropbox.com/s/1mytr23btwqx39q/atlassian-confluence-11-14.log?dl=0>


author: AnnWorley
body: I am sorry to hear that.

Thanks for the log. It still looks like a name resolution error:

```
Failed to determine LAN address: java.net.SocketException: Operation not permitted
```

I hate to keep asking you to restart your Mac, but could you add the "real" LAN IP to the hosts file for pascal.local, restart the system and try Confluence again? I look forward to hearing whether that works.


author: Pascal Crausaz
body: Like so:

![hosts.png](https://community.atlassian.com/t5/image/serverpage/image-id/9509iE5ADE63313022282/image-size/large?v=v2&px=999 "hosts.png")

Nope...No luck...(after a restart)


author: Pascal Crausaz
body: Interesting, I updated to macOS High Sierra 10.13.2 Beta (17C76a), restarted and now everything is working.

Looks like this may have been an issue with macOS High Sierra 10.13.2 Beta (17C60c)

Thanks for the help.


author: AnnWorley
body: Thanks for the update, it could be of help to the next person trying out Confluence on a Mac.

Now that everything is working, I should mention that MacOS is not a [supported platform](https://confluence.atlassian.com/doc/supported-platforms-207488198.html#SupportedPlatforms-Operatingsystems) for Production (fine for evaluation which is what I figure you are doing :) ).


author: Pascal Crausaz
body: hehe, I have been evaluating on that platform since 2009 and frankly the issue above was the first serious issue I encountered. I use Confluence as a 'smart' note pad, having it running on my laptop give me a way to create documents 'offline' before I move them into our corporate server when needed as well as a personal wiki.


author: AnnWorley
body: Happy to hear you use Confluence on your local machine as a staging instance, seems like a good idea.

I often use my Mac for test instances as well and have been leery of upgrading my MacOS because of your experience.

Thanks again for sharing the experience on the forum so others can benefit.


author: Pascal Crausaz
body: \<deleted\> incorrect info \<deleted\>