Bitbucket Data Center showing error 'SpringMVC dispatcher could not be started' while starting up
Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Bitbucket Server fails to startup.
The following message is displayed on the UI:
The following problem occurred which prevents Atlassian Bitbucket Server from starting correctly:
SpringMVC dispatcher [springMvc] could not be startedBefore you begin: Identify the root cause
The root cause of this error is almost always visible in the logs. Do not attempt any fix steps until you have reviewed the logs and identified the underlying issue.
Stop Bitbucket (if still running)
Open
atlassian-bitbucket.log(located in your Bitbucket home directory)Search for the most recent ERROR or WARN message that appears before the "SpringMVC dispatcher" error
Note the full error message — this indicates whether the cause is configuration, port conflict, or database connectivity etc.
Match the error message with the below causes and follow the resolution steps accordingly
Cause
There are different root causes for this problem.
Cause #1: Home directory is not accessible
The following exception is reported in the atlassian-bitbucket.log file:
15:08:16,767 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[bitbucket.application] - openFile(/var/atlassian/application-data/bitbucket/log/atlassian-bitbucket.log,true) call failed. java.io.FileNotFoundException: /var/atlassian/application-data/bitbucket/log/atlassian-bitbucket.log (Permission denied)
at java.io.FileNotFoundException: /var/atlassian/application-data/bitbucket/log/atlassian-bitbucket.log (Permission denied)
at at java.io.FileOutputStream.open(Native Method)
at at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at at ch.qos.logback.core.recovery.ResilientFileOutputStream.<init>(ResilientFileOutputStream.java:28)
at at ch.qos.logback.core.FileAppender.openFile(FileAppender.java:149)
at at ch.qos.logback.core.FileAppender.start(FileAppender.java:108)
at at ch.qos.logback.core.rolling.RollingFileAppender.start(RollingFileAppender.java:86)
at at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:96)
at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:317)
at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:196)
at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:182)
at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:149)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:135)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49)
at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:148)
at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129)
at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108)
at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:276)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288)
at at com.atlassian.bitbucket.internal.lifecycle.DefaultStartupManager.<clinit>(DefaultStartupManager.java:18)
at at com.atlassian.bitbucket.internal.spring.Bitbucket ServerWebApplicationInitializer.onStartup(Bitbucket ServerWebApplicationInitializer.java:65)
at at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175)
at at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5423)
at at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at at java.lang.Thread.run(Thread.java:744)In this case, /var/atlassian/application-data/bitbucket/, which is being used as Bitbucket Server Home Directory, is not accessible to the user running Bitbucket Server. The permissions on the directories contained within <Bitbucket home directory> might be mixed where the user running Bitbucket Server is not the same.
For further steps on how to diagnose this please see - How to View Detailed permissions for Bitbucket Server directory
Cause #2: The database is unavailable
The following exception is reported in the atlassian-bitbucket.log file:
2018-07-08 01:01:11,128 ERROR [spring-startup] c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdAliasDao': Unsatisfied dependency expressed through method 'setSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is liquibase.exception.DatabaseException: java.sql.SQLTransientConnectionException: bitbucket - Connection is not available, request timed out after 15000ms.
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:667)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.lang.Thread.run(Thread.java:748)
... 18 frames trimmed
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is liquibase.exception.DatabaseException: java.sql.SQLTransientConnectionException: bitbucket - Connection is not available, request timed out after 15000ms.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628)
... 5 common frames omitted
Caused by: liquibase.exception.DatabaseException: java.sql.SQLTransientConnectionException: bitbucket - Connection is not available, request timed out after 15000ms.
at liquibase.database.jvm.JdbcConnection.getDatabaseProductName(JdbcConnection.java:43)
at liquibase.database.core.OracleDatabase.isCorrectDatabaseImplementation(OracleDatabase.java:210)
at liquibase.database.DatabaseFactory.findCorrectDatabaseImplementation(DatabaseFactory.java:111)
at liquibase.integration.spring.SpringLiquibase.createDatabase(SpringLiquibase.java:471)
at liquibase.database.ExtendedSpringLiquibase.createDatabase(ExtendedSpringLiquibase.java:40)
at liquibase.integration.spring.SpringLiquibase.createLiquibase(SpringLiquibase.java:437)
at liquibase.database.ExtendedSpringLiquibase.afterPropertiesSet(ExtendedSpringLiquibase.java:32)
... 5 common frames omitted
Caused by: java.sql.SQLTransientConnectionException: bitbucket - Connection is not available, request timed out after 15000ms.
at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:602)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:195)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:145)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:85)
at com.atlassian.stash.internal.hikari.ExtendedHikariDataSource.getConnection(ExtendedHikariDataSource.java:125)
at org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy$LazyConnectionInvocationHandler.getTargetConnection(LazyConnectionDataSourceProxy.java:403)
at org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy$LazyConnectionInvocationHandler.invoke(LazyConnectionDataSourceProxy.java:376)
at liquibase.database.jvm.JdbcConnection.getDatabaseProductName(JdbcConnection.java:41)
... 11 common frames omittedIn this case, the database used by Bitbucket Server is unavailable.
Cause #3: Incompatible MySQL connector
The following exception is reported in atlassian-bitbucket.log
WARN [spring-startup] o.s.w.c.s.XmlWebApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdAliasDao': Unsatisfied dependency expressed through method 'setSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sharedHomeLockAcquirer' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'licenseHelper' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'licenseHelper' defined in URL [jar:file:/opt/atlassian/bitbucket/7.6.8/app/WEB-INF/lib/bitbucket-service-impl-7.6.8.jar!/com/atlassian/stash/internal/license/DefaultLicenseHelper.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootstrapLiquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String
2021-07-30 14:52:40,809 INFO [spring-startup] c.a.s.internal.home.HomeLockAcquirer Releasing lock on /var/atlassian/application-data/bitbucket
2021-07-30 14:52:40,818 ERROR [spring-startup] c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdAliasDao': Unsatisfied dependency expressed through method 'setSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sharedHomeLockAcquirer' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'licenseHelper' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'licenseHelper' defined in URL [jar:file:/opt/atlassian/bitbucket/7.6.8/app/WEB-INF/lib/bitbucket-service-impl-7.6.8.jar!/com/atlassian/stash/internal/license/DefaultLicenseHelper.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootstrapLiquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:723)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.lang.Thread.run(Thread.java:748)
... 18 frames trimmed
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sharedHomeLockAcquirer' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'licenseHelper' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'licenseHelper' defined in URL [jar:file:/opt/atlassian/bitbucket/7.6.8/app/WEB-INF/lib/bitbucket-service-impl-7.6.8.jar!/com/atlassian/stash/internal/license/DefaultLicenseHelper.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootstrapLiquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342)
... 5 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'licenseHelper' defined in URL [jar:file:/opt/atlassian/bitbucket/7.6.8/app/WEB-INF/lib/bitbucket-service-impl-7.6.8.jar!/com/atlassian/stash/internal/license/DefaultLicenseHelper.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootstrapLiquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798)
... 5 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootstrapLiquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
... 5 common frames omitted
Caused by: java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String
at liquibase.changelog.StandardChangeLogHistoryService.getRanChangeSets(StandardChangeLogHistoryService.java:324)
at liquibase.changelog.AbstractChangeLogHistoryService.upgradeChecksums(AbstractChangeLogHistoryService.java:66)
at liquibase.changelog.StandardChangeLogHistoryService.upgradeChecksums(StandardChangeLogHistoryService.java:293)
at liquibase.Liquibase.checkLiquibaseTables(Liquibase.java:1221)
at liquibase.Liquibase.update(Liquibase.java:193)
at liquibase.Liquibase.update(Liquibase.java:179)
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:317)
at liquibase.database.ExtendedSpringLiquibase.afterPropertiesSet(ExtendedSpringLiquibase.java:39)
... 5 common frames omittedThis is caused by using an incompatible MySQL connector 8, whereas Bitbucket accepts only 5.1x
Cause #4: JVM could not read parameter
The following exceptions are seen in atlassian-bitbucket.log
2021-08-30 12:23:43,101 ERROR [spring-startup] c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'scheduledJobLifecycle' defined in URL [jar:file:/opt/atlassian/atlassian-bitbucket-6.5.1/app/WEB-INF/lib/bitbucket-platform-6.5.1.jar!/com/atlassian/stash/internal/scheduling/ScheduledJobLifecycle.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'instanceAnalyticsJob' defined in URL [jar:file:/opt/atlassian/atlassian-bitbucket-6.5.1/app/WEB-INF/lib/bitbucket-service-impl-6.5.1.jar!/com/atlassian/stash/internal/server/analytics/InstanceAnalyticsJob.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'awsAnalyticsFactory' defined in URL [jar:file:/opt/atlassian/atlassian-bitbucket-6.5.1/app/WEB-INF/lib/bitbucket-service-impl-6.5.1.jar!/com/atlassian/stash/internal/server/analytics/DefaultAwsAnalyticsFactory.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.stash.internal.server.analytics.DefaultAwsAnalyticsFactory]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
Caused by: java.lang.IllegalArgumentException: Error in security property. Constraint unknown: jdk.disabled.namedCurves
at sun.security.util.DisabledAlgorithmConstraints$Constraints.<init>(DisabledAlgorithmConstraints.java:329)
at sun.security.util.DisabledAlgorithmConstraints.<init>(DisabledAlgorithmConstraints.java:100)
at sun.security.ssl.SSLAlgorithmConstraints.<clinit>(SSLAlgorithmConstraints.java:50)
... 18 common frames omittedIn this case, underlying Java JVM couldn't understand the parameter jdk.disabled.namedCurves and fails to start the service.
Cause #5: Unsupported Git version
The following exceptions are seen in atlassian-bitbucket.log
Exception while getting build number <build-number> of 'jira' from Marketplace :org.apache.http.conn.HttpHostConnectException:Connect to marketplace.atlassian.com:443 [...] failed: Connection timed outCause #6: NFS is not mounted
2025-04-28 16:26:08,124 ERROR [spring-startup] c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'migrationService' defined in URL [jar:file:/opt/atlassian-bitbucket-8.6.1/app/WEB-INF/lib/bitbucket-service-impl-8.6.1.jar!/com/atlassian/stash/internal/migration/DefaultMigrationService.class]: Unsatisfied dependency expressed through constructor parameter 9; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshMigrationService' defined in URL [jar:file:/opt/atlassian-bitbucket-8.6.1/app/WEB-INF/lib/bitbucket-service-impl-8.6.1.jar!/com/atlassian/stash/internal/migration/DefaultMeshMigrationService.class]: Unsatisfied dependency expressed through constructor parameter 5; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'repositoryMigrator' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'repositoryMigrator' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshGitCommandBuilderFactory' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'gitCommandBuilderFactory' parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gitCommandCreator' defined in com.atlassian.stash.internal.scm.git.GitWiring: Unsatisfied dependency expressed through method 'gitCommandCreator' parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nioProcessHelper' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is com.atlassian.bitbucket.internal.process.NioUnsupportedException: Failed to initialize NIO
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.base/java.lang.Thread.run(Thread.java:829)
... 18 frames trimmed
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshMigrationService' defined in URL [jar:file:/opt/atlassian-bitbucket-8.6.1/app/WEB-INF/lib/bitbucket-service-impl-8.6.1.jar!/com/atlassian/stash/internal/migration/DefaultMeshMigrationService.class]: Unsatisfied dependency expressed through constructor parameter 5; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'repositoryMigrator' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'repositoryMigrator' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshGitCommandBuilderFactory' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'gitCommandBuilderFactory' parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gitCommandCreator' defined in com.atlassian.stash.internal.scm.git.GitWiring: Unsatisfied dependency expressed through method 'gitCommandCreator' parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nioProcessHelper' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is com.atlassian.bitbucket.internal.process.NioUnsupportedException: Failed to initialize NIO
... 6 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'repositoryMigrator' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'repositoryMigrator' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshGitCommandBuilderFactory' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'gitCommandBuilderFactory' parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gitCommandCreator' defined in com.atlassian.stash.internal.scm.git.GitWiring: Unsatisfied dependency expressed through method 'gitCommandCreator' parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nioProcessHelper' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is com.atlassian.bitbucket.internal.process.NioUnsupportedException: Failed to initialize NIO
... 6 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshGitCommandBuilderFactory' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'gitCommandBuilderFactory' parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gitCommandCreator' defined in com.atlassian.stash.internal.scm.git.GitWiring: Unsatisfied dependency expressed through method 'gitCommandCreator' parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nioProcessHelper' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is com.atlassian.bitbucket.internal.process.NioUnsupportedException: Failed to initialize NIO
... 6 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gitCommandCreator' defined in com.atlassian.stash.internal.scm.git.GitWiring: Unsatisfied dependency expressed through method 'gitCommandCreator' parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nioProcessHelper' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is com.atlassian.bitbucket.internal.process.NioUnsupportedException: Failed to initialize NIO
... 6 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nioProcessHelper' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is com.atlassian.bitbucket.internal.process.NioUnsupportedException: Failed to initialize NIO
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804)
... 5 common frames omitted
Caused by: com.atlassian.bitbucket.internal.process.NioUnsupportedException: Failed to initialize NIO
at com.atlassian.bitbucket.internal.process.nu.NuNioProcessHelper.validate(NuNioProcessHelper.java:151)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
... 5 common frames omitted
Caused by: java.lang.ExceptionInInitializerError: null
at com.zaxxer.nuprocess.linux.LinuxProcess.<clinit>(LinuxProcess.java:41)
at com.zaxxer.nuprocess.linux.LinProcessFactory.runProcess(LinProcessFactory.java:49)
at com.zaxxer.nuprocess.NuProcessBuilder.run(NuProcessBuilder.java:275)
at com.atlassian.bitbucket.internal.process.nu.NuNioProcessHelper.validate(NuNioProcessHelper.java:146)
... 8 common frames omitted
Caused by: java.lang.UnsupportedOperationException: Failed to allocate closure
at com.sun.jna.Native.registerMethod(Native Method)
at com.sun.jna.Native.register(Native.java:1906)
at com.sun.jna.Native.register(Native.java:1775)
at com.sun.jna.Native.register(Native.java:1493)
at com.zaxxer.nuprocess.linux.LibEpoll.<clinit>(LibEpoll.java:29)
... 12 common frames omittedCause #7: Address already in use The following exceptions are seen in atlassian-bitbucket.log
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)This error indicates that another application is already running on the same port that Bitbucket Data Center is trying to use typically port 7990 (HTTP) or 7999 (SSH), or there is conflict with Bitbucket's additional HTTP connectors.
Resolution
These are the resolutions for the root causes above:
Resolution for cause #1:
Ensure the user has sufficient read/write/execute permissions on the above folder and restart the application.
For the example above, the following commands were run:
For non-Docker environment
$ cd /var/atlassian/application-data/Bitbucket
$ chown -R atlbitbucket:atlbitbucket *For Docker environment
$ cd /var/atlassian/application-data/bitbucket
$ chown -R bitbucket:bitbucket *Resolution for cause #2:
Make sure that the database service is up and running.
Resolution for cause #3:
Download and install a compatible driver as described in Connecting Bitbucket to MySQL .
Also, make sure that the driver in bitbucket.properties is of the form jdbc.driver=com.mysql.jdbc.Driverwhich is the syntax compatible with a 5.1x driver.
Resolution for cause #4:
Verify if there is a problem with the version of ca-certificates java package.
Use a different JDK version to start the Bitbucket server.
Resolution for cause #5:
The error message states unsatisfied dependency exception for GIT version on the Bitbucket server. On Some of the latest linux distributions GIT version is 2.38.x or later, which is still not supported on Bitbucket 8.6.x or below and will likely Bitbucket fails to start. Please refer Supported platform page for your Bitbucket version and compile a supported version of GIT to resolve the issue.
Resolution for cause #6:
Ensure that your NFS is mounted and accessible from your server or each data center node.
Resolution for cause #7:
If there is another application running on that port and you wish to continue running it on port 7990, you will need to change the default listening port for Bitbucket Server. Follow the steps on Change the port Bitbucket listens on to change the port for Bitbucket Server.
If the error is caused by a duplicate additional connector port defined in bitbucket.properties file, change the value of the server.additional-connector.1.port not to be 7990.
Verifying a successful startup
After applying the fix, start Bitbucket
Monitor the log file
$BITBUCKET_HOME/log/atlassian-bitbucket.logfor any errorLook for the message "Application server started in [Xms]" — this indicates successful startup
Confirm no ERROR messages appear after that startup message
Access the Bitbucket UI using the Bitbucket Base URL and verify it loads without errors
Related Articles:
Was this helpful?