Bitbucket app not starting up - Database may be already in use: "Locked by another process". Possibl

sakshi Mittal November 27, 2017

I have installed bitbucket v 4.13 in linux server as a new installation as mentioned in the atlassian documentation. I am new to bitbucket and linux so please be patient. 

I have checked all prerequistes that I must have. I intent to use postgresql-9.6 which i have also installed in the same server.

When I start my bitbucket server using <installtion-directory>/bin/start-bitbucket.sh , it starts sucessfully. But when i try to launch the app, it fails.

I checked atalssian-bitbucket.log , the error says following :

o.s.w.c.s.XmlWebApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdUserDao' defined in class path resource [crowd-spi-context.xml]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'projectDao' defined in URL [jar:file:/home/smittal/bitbucket/bitsoftware/atlassian-bitbucket-4.13.0/atlassian-bitbucket/WEB-INF/lib/bitbucket-dao-impl-4.13.0.jar!/com/atlassian/stash/internal/project/HibernateProjectDao.class]: Unsatisfied dependency expressed through constructor 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:/home/smittal/bitbucket/bitsoftware/atlassian-bitbucket-4.13.0/atlassian-bitbucket/WEB-INF/lib/bitbucket-service-impl-4.13.0.jar!/com/atlassian/stash/internal/license/DefaultLicenseHelper.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'databaseSupplier' defined in URL [jar:file:/home/smittal/bitbucket/bitsoftware/atlassian-bitbucket-4.13.0/atlassian-bitbucket/WEB-INF/lib/bitbucket-dao-impl-4.13.0.jar!/com/atlassian/stash/internal/db/DefaultDatabaseSupplier.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [stash-context.xml]: Cannot create inner bean 'dataSourceFactory$created#1735a728' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceFactory$created#1735a728' defined in class path resource [stash-context.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.stash.internal.hikari.ExtendedHikariDataSource]: Factory method 'create' threw exception; nested exception is com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Database may be already in use: "Locked by another process". Possible solutions: close all other connection(s); use the server mode [90020-176]

Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'dataSource' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [stash-context.xml]: Cannot create inner bean 'dataSourceFactory$created#1735a728' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceFactory$created#1735a728' defined in class path resource [stash-context.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.stash.internal.hikari.ExtendedHikariDataSource]: Factory method 'create' threw exception; nested exception is com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Database may be already in use: "Locked by another process". Possible solutions: close all other connection(s); use the server mode [90020-176]

Things I Tried to resolve this:

1. Delete file db.lock.db in the home directory

2. delete file.lock in the home directory

 

What other possible connection can be blocking?

Any help would be appreciated.

Thanks.

 

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 28, 2017

Hi Sakshi, we'll need to look at the full logs to see what's happening. As they might contain sensitive data, I've created a Support ticket for you.

You should have received a notification regarding the creation of this ticket, and the instructions on how to proceed. Please continue via that channel :) And let us know if you need anything else!

Best regards,

Ana

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events