odc部署失败

【 使用环境 】测试环境
odc版本:4.3.4_bp3_20250729 部署odc-web
odc部署服务器: centos7.6
docker版本: 19.03.13
odc 部署的元数据库: mysql.5.7.20
【报错】
第一种报错:
Bean create failed, beanName=dataSourceScriptDatabaseInitializer, message=Error creating bean with name ‘dataSourceScriptDatabaseInitializer’ defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #7 of class path resource [data.sql]: INSERT INTO config_system_configuration (key, value, application, profile, label, description) VALUES (‘odc.config.userConfig.cacheRefreshTimeSeconds’, ‘60’, ‘odc’, ‘default’, ‘master’, ‘个人配置缓存刷新时间’) ON DUPLICATE KEY UPDATE id=id; nested exception is java.sql.SQLTransientConnectionException: (conn=28319) Incorrect string value: ‘\xE4\xB8\xAA\xE4\xBA\xBA…’ for column ‘description’ at row 1

Action:
please check configuration then restart odc-server

APPLICATION FAILED TO START


第二种报错:
Description:

Bean create failed, beanName=dataSourceScriptDatabaseInitializer, message=Error creating bean with name ‘dataSourceScriptDatabaseInitializer’ defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #1 of class path resource [schema.sql]: CREATE TABLE IF NOT EXISTS config_system_configuration( id bigint(20) NOT NULL AUTO_INCREMENT COMMENT ‘auto-increment id’, key varchar(256) NOT NULL COMMENT ‘system config key’, value varchar(1024) DEFAULT NULL COMMENT ‘system config value’, application varchar(256) NOT NULL DEFAULT ‘odc’ COMMENT ‘application name’, profile varchar(256) NOT NULL DEFAULT ‘default’ COMMENT ‘profile name’, label varchar(128) NOT NULL DEFAULT ‘master’ COMMENT ‘label name’, create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT ‘insertion time’, update_time datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT ‘latest update time’, description varchar(1024) DEFAULT NULL COMMENT ‘description of the config’, creator_id bigint(20) DEFAULT NULL COMMENT ‘user id of the creator’, last_modifier_id bigint(20) DEFAULT NULL COMMENT ‘user id of the last modifier’, CONSTRAINT pk_system_configuration_id PRIMARY KEY (id), UNIQUE KEY uk_system_configuration_key_label (application, profile, label, key) ) ; nested exception is java.sql.SQLSyntaxErrorException: (conn=29682) Specified key was too long; max key length is 1000 bytes

如果元数据库为mysql,建议mysql最低版本是哪个版本

日志信息 提供一下
odc应用日志:

日志目录:docker 内 /opt/odc/log/
登录宿主机,执行以下命令进入 ODC Docker

查看 odc docker image name

docker ps -a --format “{{.Names}}” | grep odc

进入 odc docker,假设 docker image name 为 odc

IMAGE_NAME=odc &&
docker exec -it ${IMAGE_NAME} sh

cd /opt/odc/log
sh-4.2# ls -l
total 540
-rw-r–r-- 1 root root 9062 May 13 15:23 gc.log.0.current
-rw-r–r-- 1 root root 523802 May 13 15:23 odc.log

日志文件请查收:
logs.tar.gz (405.7 KB)

你在哪看到的 部署odc可以使用mysql做为元数据库的

但是目前使用mysql5.7.0部署odc的时候报错呢?上面的2个报错都是从odc的里显示出来的

你在哪看到的可以使用mysql作为元数据库 部署odc的 官方的文档也没有写可以使用mysql可以做为元数据库呀

是的,官方没有说元数据库可以使用mysql,也没说不能用呀,哈哈,我以为既然odc可以管理mysql,同时手头临时没有测试的ob,就使用了mysql作为元数据库,目前确认是不能使用mysql作为odc的元数据库是吗?

应该是不行的 建议使用ob作为元数据库