running as Windows Service is not working
Asked by Christian Hoffmann:

I can start Confluence with the Batch-File "starup_bundled_jre.bat" in that Way Confluence is working properly.  
I also installed the Windows Service as descriped here: <https://confluence.atlassian.com/doc/start-confluence-automatically-on-windows-as-a-service-172071.html>

Unfortunately this is not working for me. If I start the Service Confluence is not comming up and after 2 Minutes the Service is stopping.  
I looked into the Logs and can see several Exceptions.  
I tried this with several accounts with Admin Privilegs but no success.


Answers:
author: Daniel Ebers
body: Hi [@Christian Hoffmann](/t5/user/viewprofilepage/user-id/5008506)

in case you do not want to provide the logs for a reason there is a troubleshooting section in the page you linked, in case you have not seen it.  
You can try to work along the troubleshooting hints to see if the service comes up then.

<https://confluence.atlassian.com/doc/start-confluence-automatically-on-windows-as-a-service-172071.html#StartConfluenceAutomaticallyonWindowsasaService-TroubleshootingConfluencewhilerunningasaWindowsservice>

Regards,  
Daniel

comments: author: Christian Hoffmann
body: Hi [@Daniel Ebers](/t5/user/viewprofilepage/user-id/800113)

How can I upload a Log File to the Community? I can't find the Way. The Log is not very big. I deleted all Logs and start the service. Only the atlassian-confluence Log has entries:  

2022-08-16 07:59:51,654 INFO \[Catalina-utility-1\] \[com.atlassian.confluence.lifecycle\] contextInitialized Starting Confluence 7.19.0 \[build 8804 based on commit hash 461303fa9ce9818638da0428d06eaa8eb48fbab3\] - synchrony version 4.1.1  
2022-08-16 07:59:55,228 INFO \[Catalina-utility-1\] \[springframework.web.context.ContextLoader\] initWebApplicationContext Root WebApplicationContext: initialization started  
2022-08-16 07:59:58,444 INFO \[Catalina-utility-1\] \[com.atlassian.confluence.lifecycle\] \<init\> Loading EhCache cache manager  
2022-08-16 08:00:12,436 INFO \[Catalina-utility-1\] \[springframework.web.context.ContextLoader\] initWebApplicationContext Root WebApplicationContext initialized in 17208 ms  
2022-08-16 08:00:12,665 INFO \[Catalina-utility-1\] \[atlassian.plugin.manager.DefaultPluginManager\] lambda$earlyStartup$5 Plugin system earlyStartup begun  
2022-08-16 08:00:15,720 WARN \[FelixStartLevel\] \[extender.internal.support.ExtenderConfiguration\] addDefaultDependencyFactories Gemini Blueprint extensions bundle not present, annotation processing disabled.  
2022-08-16 08:00:29,566 WARN \[ThreadPoolAsyncTaskExecutor::Thread 15\] \[scanner.runtime.impl.ComponentImportBeanFactoryPostProcessor\] loadServiceClass Unable to load class 'com.atlassian.jira.user.UserKeyService' for component importation purposes. Skipping...  
2022-08-16 08:00:29,567 WARN \[ThreadPoolAsyncTaskExecutor::Thread 15\] \[scanner.runtime.impl.ComponentImportBeanFactoryPostProcessor\] loadServiceClass Unable to load class 'com.atlassian.jira.util.I18nHelper' for component importation purposes. Skipping...  
2022-08-16 08:00:38,335 INFO \[Catalina-utility-1\] \[atlassian.plugin.manager.DefaultPluginManager\] logTime Plugin system earlyStartup ended  
2022-08-16 08:00:38,584 INFO \[Catalina-utility-1\] \[atlassian.plugin.manager.DefaultPluginManager\] lambda$lateStartup$6 Plugin system lateStartup begun  
2022-08-16 08:00:40,259 WARN \[ThreadPoolAsyncTaskExecutor::Thread 5\] \[addons.analytics.scheduler.DataRetentionScheduleManagerImpl\] afterPropertiesSet Initializing Data Retention Schedule with frequency: 60000 milliseconds, batch size: 10000  
2022-08-16 08:00:40,365 WARN \[ThreadPoolAsyncTaskExecutor::Thread 5\] \[addons.analytics.scheduler.EventLimiterScheduleManagerImpl\] afterPropertiesSet Initializing Event Limiter Schedule with frequency: 60000 milliseconds  
2022-08-16 08:00:40,788 INFO \[ThreadPoolAsyncTaskExecutor::Thread 35\] \[plugins.synchrony.bootstrap.DefaultSynchronyProxyMonitor\] \<init\> synchrony-proxy healthcheck url: <http://127.0.0.1:8090/synchrony-proxy/healthcheck>  
2022-08-16 08:00:42,555 INFO \[ThreadPoolAsyncTaskExecutor::Thread 15\] \[service.stepexecutor.attachment.AttachmentMigrationExecutor\] info Initialized attachment migration executor with concurrency = 5 and batch size = 20.  
2022-08-16 08:00:42,566 INFO \[ThreadPoolAsyncTaskExecutor::Thread 15\] \[migration.agent.queue.QueueBroker\] info Started queue broker. Registered consumers: \[com.atlassian.migration.agent.service.stepexecutor.user.UsersMigrationExecutor@4c9d12b4, com.atlassian.migration.agent.service.stepexecutor.space.SpaceExportExecutor@6b981061, com.atlassian.migration.agent.service.stepexecutor.space.SpaceUploadExecutor@4404754c, com.atlassian.migration.agent.service.stepexecutor.attachment.AttachmentMigrationExecutor@7903b8d1, com.atlassian.migration.agent.service.stepexecutor.space.SpaceImportExecutor@5d2f1df7\]  
2022-08-16 08:00:42,574 INFO \[ThreadPoolAsyncTaskExecutor::Thread 15\] \[agent.service.analytics.AnalyticsEventConsumer\] info Successfully registered AnalyticsEventConsumer job migration-plugin:analytics-events-consumer-runner-key.  
2022-08-16 08:00:42,579 INFO \[ThreadPoolAsyncTaskExecutor::Thread 15\] \[agent.service.analytics.AnalyticsEventConsumer\] info Successfully started AnalyticsEventConsumer poller.  
2022-08-16 08:00:42,614 INFO \[ThreadPoolAsyncTaskExecutor::Thread 15\] \[agent.service.impl.DetectedUserEmailAnalyticsScheduledRunner\] postConstruct Scheduled detected email analytics event collection job to be run each 120 hours.  
2022-08-16 08:00:42,629 INFO \[ThreadPoolAsyncTaskExecutor::Thread 16\] \[atlassian.ratelimiting.internal.RateLimitingConfiguration\] userRequestHandler Rate Limited Request Handler ENABLED  
2022-08-16 08:00:43,761 ERROR \[ThreadPoolAsyncTaskExecutor::Thread 35\] \[plugin.osgi.factory.OsgiPlugin\] onPluginContainerFailed Unable to start the plugin container for plugin 'org.swift.confluence.html'  
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appMigrationServiceImpl': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: 'void com.atlassian.migration.app.AppCloudMigrationGateway.registerListener(com.atlassian.migration.app.AppCloudMigrationListener)'  
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804)  
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)  
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)  
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)  
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)  
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)  
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)  
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)  
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)  
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:57)  
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:322)  
at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)  
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:287)  
at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)  
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
at java.base/java.lang.Thread.run(Unknown Source)  
Caused by: java.lang.NoSuchMethodError: 'void com.atlassian.migration.app.AppCloudMigrationGateway.registerListener(com.atlassian.migration.app.AppCloudMigrationListener)'  
at com.atlassian.migration.app.tracker.BoundCloudMigrationGateway.registerListener(BoundCloudMigrationGateway.java:34)  
at com.atlassian.migration.app.tracker.CloudMigrationAccessor.sendToRegistrar(CloudMigrationAccessor.java:75)  
at com.atlassian.migration.app.tracker.CloudMigrationAccessor.registerListener(CloudMigrationAccessor.java:35)  
at org.swift.confluence.html.service.AppMigrationServiceImpl.afterPropertiesSet(AppMigrationServiceImpl.java:119)  
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863)  
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)  
... 16 more


author: Daniel Ebers
body: The last line starts with an ERROR but I am not sure if this is the cause.  
There might be more lines, you could check.  
You could also review Windows event log if something more meaningful is logged.

With the given information I could not pinpoint it to a single cause.


author: Bastian Stehmann
body: Hi [@Christian Hoffmann](/t5/user/viewprofilepage/user-id/5008506) ,

Welcome to the community.

What errors in the logs do you see?


Tags: confluence-server

server