Skip to content

Can't initialize database #4544

Closed
Closed
@lenin41211

Description

@lenin41211

System information

java-tron version: java -jar FullNode.jar -v - 4.5.1
OS & Version: Windows/Linux/OSX - Linux Ubuntu 20.04.4

1. What did you do?

I tried to start full node with pre downloaded main net database

2. What did you expect to see?

normal block synchronization

3. What did you see instead?

05:06:32.060 ERROR [main] app Uncaught exception
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'applicationImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.net.TronNetService org.tron.common.application.ApplicationImpl.tronNetService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tronNetService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.net.service.AdvService org.tron.core.net.TronNetService.advService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'advService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.net.TronNetDelegate org.tron.core.net.service.AdvService.tronNetDelegate; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tronNetDelegate': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.db.Manager org.tron.core.net.TronNetDelegate.dbManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'manager': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.db.TransactionCache org.tron.core.db.Manager.transactionCache; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionCache' defined in org.tron.core.config.DefaultConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.tron.core.db.TransactionCache]: Factory method 'transactionCache' threw exception; nested exception is java.lang.RuntimeException: Can't initialize database
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
at org.tron.program.FullNode.main(FullNode.java:80)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.net.TronNetService org.tron.common.application.ApplicationImpl.tronNetService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tronNetService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.net.service.AdvService org.tron.core.net.TronNetService.advService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'advService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.net.TronNetDelegate org.tron.core.net.service.AdvService.tronNetDelegate; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tronNetDelegate': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.db.Manager org.tron.core.net.TronNetDelegate.dbManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'manager': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.db.TransactionCache org.tron.core.db.Manager.transactionCache; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionCache' defined in org.tron.core.config.DefaultConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.tron.core.db.TransactionCache]: Factory method 'transactionCache' threw exception; nested exception is java.lang.RuntimeException: Can't initialize database
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
... 11 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tronNetService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.net.service.AdvService org.tron.core.net.TronNetService.advService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'advService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.net.TronNetDelegate org.tron.core.net.service.AdvService.tronNetDelegate; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tronNetDelegate': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.db.Manager org.tron.core.net.TronNetDelegate.dbManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'manager': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.db.TransactionCache org.tron.core.db.Manager.transactionCache; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionCache' defined in org.tron.core.config.DefaultConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.tron.core.db.TransactionCache]: Factory method 'transactionCache' threw exception; nested exception is java.lang.RuntimeException: Can't initialize database

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
... 39 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.db.Manager org.tron.core.net.TronNetDelegate.dbManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'manager': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.db.TransactionCache org.tron.core.db.Manager.transactionCache; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionCache' defined in org.tron.core.config.DefaultConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.tron.core.db.TransactionCache]: Factory method 'transactionCache' threw exception; nested exception is java.lang.RuntimeException: Can't initialize database
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
... 50 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'manager': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.db.TransactionCache org.tron.core.db.Manager.transactionCache; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionCache' defined in org.tron.core.config.DefaultConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.tron.core.db.TransactionCache]: Factory method 'transactionCache' threw exception; nested exception is java.lang.RuntimeException: Can't initialize database
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
... 52 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.tron.core.db.TransactionCache org.tron.core.db.Manager.transactionCache; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionCache' defined in org.tron.core.config.DefaultConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.tron.core.db.TransactionCache]: Factory method 'transactionCache' threw exception; nested exception is java.lang.RuntimeException: Can't initialize database
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
... 63 common frames omitted

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionCache' defined in org.tron.core.config.DefaultConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.tron.core.db.TransactionCache]: Factory method 'transactionCache' threw exception; nested exception is java.lang.RuntimeException: Can't initialize database
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
... 65 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.tron.core.db.TransactionCache]: Factory method 'transactionCache' threw exception; nested exception is java.lang.RuntimeException: Can't initialize database
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
... 77 common frames omitted
Caused by: java.lang.RuntimeException: Can't initialize database
at org.tron.common.storage.leveldb.LevelDbDataSourceImpl.initDB(LevelDbDataSourceImpl.java:119)
at org.tron.common.storage.leveldb.LevelDbDataSourceImpl.(LevelDbDataSourceImpl.java:87)
at org.tron.core.db2.common.TxCacheDB.(TxCacheDB.java:58)
at org.tron.core.db.TransactionCache.(TransactionCache.java:15)
at org.tron.core.config.DefaultConfig.transactionCache(DefaultConfig.java:114)
at org.tron.core.config.DefaultConfig$$EnhancerBySpringCGLIB$$870d3fc0.CGLIB$transactionCache$1()
at org.tron.core.config.DefaultConfig$$EnhancerBySpringCGLIB$$870d3fc0$$FastClassBySpringCGLIB$$7837898d.invoke()
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:355)
at org.tron.core.config.DefaultConfig$$EnhancerBySpringCGLIB$$870d3fc0.transactionCache()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
... 78 common frames omitted
Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException: IO error: lock /mnt/storage/output-directory/database/trans-cache/LOCK: Resource temporarily unavailable
at org.fusesource.leveldbjni.internal.NativeDB.checkStatus(NativeDB.java:200)
at org.fusesource.leveldbjni.internal.NativeDB.open(NativeDB.java:218)
at org.fusesource.leveldbjni.JniDBFactory.open(JniDBFactory.java:168)
at org.tron.common.storage.leveldb.LevelDbDataSourceImpl.openDatabase(LevelDbDataSourceImpl.java:135)
at org.tron.common.storage.leveldb.LevelDbDataSourceImpl.initDB(LevelDbDataSourceImpl.java:116)
... 92 common frames omitted

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions