使用Docker从1.3.1升级到2.0

时间:2018-07-11 14:00:50

标签: docker thingsboard

我正在使用Thingsboard 1.3.1运行docker,我想迁移到2.0,但是我无法使其工作。

我试图在容器内触发升级脚本。 出现错误:

Connector configured to listen on port 8080 failed to start
ThingsBoard upgrade failed!

我试图在容器外运行脚本。出现错误:

Error creating bean with name 'thingsboardInstallService': Unsatisfied 
dependency expressed through field 'databaseSchemaService'; nested exception 
is org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'sqlDatabaseSchemaService': Unsatisfied dependency 
expressed through field 'installScripts'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'installScripts': Unsatisfied dependency expressed 
through field 'ruleChainService'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'baseRuleChainService': Unsatisfied dependency 
expressed through field 'relationService'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'baseRelationService': Unsatisfied dependency 
expressed through field 'entityService'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'baseEntityService': Unsatisfied dependency expressed 
through field 'deviceService'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'deviceServiceImpl': Unsatisfied dependency expressed 
through field 'cacheManager'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'cacheManager' defined in class path resource [org/thingsboard
/server/dao/cache/CaffeineCacheConfiguration.class]: Invocation of init method 
failed; nested exception is java.lang.NullPointerException
ThingsBoard upgrade failed!

感谢帮助

1 个答案:

答案 0 :(得分:0)

更新平台的唯一方法是:在Docker容器外部安装Thingsboard 1.4.0,并使用“ $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion初始化更新脚本。 = 1.4.0“(Linux的示例)。这会将数据库更新为Thingsboard版本2.0,然后可以用较新的版本替换Docker容器。 我找不到从容器内部更新数据库的方法。