『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 1322|回复: 1

[已解决] 关于hassio插件启动失败的问题

[复制链接]

106

主题

551

帖子

2775

积分

金牌会员

Rank: 6Rank: 6

积分
2775
金钱
2224
HASS币
20
发表于 2020-11-9 09:49:07 | 显示全部楼层 |阅读模式
本帖最后由 comeon_000 于 2020-11-14 15:53 编辑

请教,hassio里的插件也有启动失败的情况吗,按道理都是docker镜像安装,不应该有啥依赖问题吧
下面这个是tracar插件启动失败的日志,坛友帮看看咋解决,MariaDB也已经装好了
[09:13:37] INFO: Starting Traccar server...
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
2020-11-09 09:13:39  INFO: HikariPool-1 - Starting...
2020-11-09 09:13:39  WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2020-11-09 09:13:40  INFO: HikariPool-1 - Start completed.
2020-11-09 09:13:42  INFO: Clearing database change log checksums
2020-11-09 09:13:43  INFO: Successfully acquired change log lock
2020-11-09 09:13:44  INFO: Successfully released change log lock
2020-11-09 09:13:44  INFO: Successfully acquired change log lock
2020-11-09 09:13:44  INFO: Can not use class liquibase.parser.core.yaml.YamlChangeLogParser as a Liquibase service because org.yaml.snakeyaml.constructor.BaseConstructor is not in the classpath
2020-11-09 09:13:44  INFO: Can not use class liquibase.parser.core.json.JsonChangeLogParser as a Liquibase service because org.yaml.snakeyaml.constructor.BaseConstructor is not in the classpath
2020-11-09 09:13:46  INFO: Reading from traccar.DATABASECHANGELOG
2020-11-09 09:13:48 ERROR: Change Set changelog-4.0-clean::changelog-4.0-clean::author failed.  Error: Table 'tc_attributes' already exists [Failed SQL: (1050) CREATE TABLE traccar.tc_attributes (id INT AUTO_INCREMENT NOT NULL, `description` VARCHAR(4000) NOT NULL, type VARCHAR(128) NOT NULL, attribute VARCHAR(128) NOT NULL, expression VARCHAR(4000) NOT NULL, CONSTRAINT PK_TC_ATTRIBUTES PRIMARY KEY (id))]
2020-11-09 09:13:48  INFO: Successfully released change log lock
2020-11-09 09:13:48 ERROR: Main method error - Table 'tc_attributes' already exists - SQLSyntaxErrorException (... < DataManager:312 < *:90 < Context:299 < Main:137 < ...)
Exception in thread "main" java.lang.RuntimeException: liquibase.exception.MigrationFailedException: Migration failed for change set changelog-4.0-clean::changelog-4.0-clean::author:
     Reason: liquibase.exception.DatabaseException: Table 'tc_attributes' already exists [Failed SQL: (1050) CREATE TABLE traccar.tc_attributes (id INT AUTO_INCREMENT NOT NULL, `description` VARCHAR(4000) NOT NULL, type VARCHAR(128) NOT NULL, attribute VARCHAR(128) NOT NULL, expression VARCHAR(4000) NOT NULL, CONSTRAINT PK_TC_ATTRIBUTES PRIMARY KEY (id))]
        at org.traccar.Main.run(Main.java:165)
        at org.traccar.Main.main(Main.java:110)
Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set changelog-4.0-clean::changelog-4.0-clean::author:
     Reason: liquibase.exception.DatabaseException: Table 'tc_attributes' already exists [Failed SQL: (1050) CREATE TABLE traccar.tc_attributes (id INT AUTO_INCREMENT NOT NULL, `description` VARCHAR(4000) NOT NULL, type VARCHAR(128) NOT NULL, attribute VARCHAR(128) NOT NULL, expression VARCHAR(4000) NOT NULL, CONSTRAINT PK_TC_ATTRIBUTES PRIMARY KEY (id))]
        at liquibase.changelog.ChangeSet.execute(ChangeSet.java:659)
        at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53)
        at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:97)
        at liquibase.Liquibase.update(Liquibase.java:201)
        at liquibase.Liquibase.update(Liquibase.java:178)
        at liquibase.Liquibase.update(Liquibase.java:174)
        at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:312)
        at org.traccar.database.DataManager.<init>(DataManager.java:90)
        at org.traccar.Context.init(Context.java:299)
        at org.traccar.Main.run(Main.java:137)
        ... 1 more
Caused by: liquibase.exception.DatabaseException: Table 'tc_attributes' already exists [Failed SQL: (1050) CREATE TABLE traccar.tc_attributes (id INT AUTO_INCREMENT NOT NULL, `description` VARCHAR(4000) NOT NULL, type VARCHAR(128) NOT NULL, attribute VARCHAR(128) NOT NULL, expression VARCHAR(4000) NOT NULL, CONSTRAINT PK_TC_ATTRIBUTES PRIMARY KEY (id))]
        at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:430)
        at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:87)
        at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:159)
        at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1276)
        at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1258)
        at liquibase.changelog.ChangeSet.execute(ChangeSet.java:622)
        ... 10 more
Caused by: java.sql.SQLSyntaxErrorException: Table 'tc_attributes' already exists
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
        at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:764)
        at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648)
        at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:426)
        ... 15 more


[09:13:37] INFO: Starting Traccar server...Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.2020-11-09 09:13:39  INFO: HikariPool-1 - Starting...2020-11-09 09:13:39  WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.2020-11-09 09:13:40  INFO: HikariPool-1 - Start completed.2020-11-09 09:13:42  INFO: Clearing database change log checksums2020-11-09 09:13:43  INFO: Successfully acquired change log lock2020-11-09 09:13:44  INFO: Successfully released change log lock2020-11-09 09:13:44  INFO: Successfully acquired change log lock2020-11-09 09:13:44  INFO: Can not use class liquibase.parser.core.yaml.YamlChangeLogParser as a Liquibase service because org.yaml.snakeyaml.constructor.BaseConstructor is not in the classpath2020-11-09 09:13:44  INFO: Can not use class liquibase.parser.core.json.JsonChangeLogParser as a Liquibase service because org.yaml.snakeyaml.constructor.BaseConstructor is not in the classpath2020-11-09 09:13:46  INFO: Reading from traccar.DATABASECHANGELOG2020-11-09 09:13:48 ERROR: Change Set changelog-4.0-clean::changelog-4.0-clean::author failed.  Error: Table 'tc_attributes' already exists [Failed SQL: (1050) CREATE TABLE traccar.tc_attributes (id INT AUTO_INCREMENT NOT NULL, `description` VARCHAR(4000) NOT NULL, type VARCHAR(128) NOT NULL, attribute VARCHAR(128) NOT NULL, expression VARCHAR(4000) NOT NULL, CONSTRAINT PK_TC_ATTRIBUTES PRIMARY KEY (id))]2020-11-09 09:13:48  INFO: Successfully released change log lock2020-11-09 09:13:48 ERROR: Main method error - Table 'tc_attributes' already exists - SQLSyntaxErrorException (... < DataManager:312 < *:90 < Context:299 < Main:137 < ...)Exception in thread "main" java.lang.RuntimeException: liquibase.exception.MigrationFailedException: Migration failed for change set changelog-4.0-clean::changelog-4.0-clean::author:     Reason: liquibase.exception.DatabaseException: Table 'tc_attributes' already exists [Failed SQL: (1050) CREATE TABLE traccar.tc_attributes (id INT AUTO_INCREMENT NOT NULL, `description` VARCHAR(4000) NOT NULL, type VARCHAR(128) NOT NULL, attribute VARCHAR(128) NOT NULL, expression VARCHAR(4000) NOT NULL, CONSTRAINT PK_TC_ATTRIBUTES PRIMARY KEY (id))]        at org.traccar.Main.run(Main.java:165)        at org.traccar.Main.main(Main.java:110)Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set changelog-4.0-clean::changelog-4.0-clean::author:     Reason: liquibase.exception.DatabaseException: Table 'tc_attributes' already exists [Failed SQL: (1050) CREATE TABLE traccar.tc_attributes (id INT AUTO_INCREMENT NOT NULL, `description` VARCHAR(4000) NOT NULL, type VARCHAR(128) NOT NULL, attribute VARCHAR(128) NOT NULL, expression VARCHAR(4000) NOT NULL, CONSTRAINT PK_TC_ATTRIBUTES PRIMARY KEY (id))]        at liquibase.changelog.ChangeSet.execute(ChangeSet.java:659)        at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53)        at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:97)        at liquibase.Liquibase.update(Liquibase.java:201)        at liquibase.Liquibase.update(Liquibase.java:178)        at liquibase.Liquibase.update(Liquibase.java:174)        at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:312)        at org.traccar.database.DataManager.<init>(DataManager.java:90)        at org.traccar.Context.init(Context.java:299)        at org.traccar.Main.run(Main.java:137)        ... 1 moreCaused by: liquibase.exception.DatabaseException: Table 'tc_attributes' already exists [Failed SQL: (1050) CREATE TABLE traccar.tc_attributes (id INT AUTO_INCREMENT NOT NULL, `description` VARCHAR(4000) NOT NULL, type VARCHAR(128) NOT NULL, attribute VARCHAR(128) NOT NULL, expression VARCHAR(4000) NOT NULL, CONSTRAINT PK_TC_ATTRIBUTES PRIMARY KEY (id))]        at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:430)        at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:87)        at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:159)        at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1276)        at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1258)        at liquibase.changelog.ChangeSet.execute(ChangeSet.java:622)        ... 10 moreCaused by: java.sql.SQLSyntaxErrorException: Table 'tc_attributes' already exists        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)        at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:764)        at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648)        at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:426)        ... 15 more
回复

使用道具 举报

106

主题

551

帖子

2775

积分

金牌会员

Rank: 6Rank: 6

积分
2775
金钱
2224
HASS币
20
 楼主| 发表于 2020-11-14 15:52:30 | 显示全部楼层
做了一下操作问题解决
1 取消HA使用MariaDB,重启HA
2 停止traccar插件
3 删除MariaDB插件
4 删除traccar插件
5 重新安装MariaDB插件并启动
6 重新安装traccar插件并启动
问题得到解决,怀疑是在启动traccar之前,HA先使用的MariaDB导致数据库有什么冲突
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-6-14 08:40 , Processed in 0.083161 second(s), 24 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表