ODC查看信息报错

问题描述:
ODC直接查看表数据或者表结构等操作都会报错,但是通过sql窗口能够查询表数据,使用的是root账户,截图如下:




此种是何问题?

2 个赞

没遇到过

:call_me_hand: :call_me_hand: :call_me_hand: :call_me_hand:

ORGANIZATION…是 OceanBase Oracle 模式下用于定义索引组织表(IOT)的语法,当前oceanbase是mysql模式?

ODC版本是多少

是mysql模式



图片是ob版本和odc版本信息

麻烦复现下然后提供下 odc.log

[2026-03-10 15:57:58.680][pool-120280-thread-1][66424c1ad62a48b0,RS36GS4D0FILBQ42AECBUT][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource][209]: Established shared JDBC Connection, lock=1067932143
[2026-03-10 15:57:58.680][pool-120280-thread-1][66424c1ad62a48b0,RS36GS4D0FILBQ42AECBUT][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource][146]: Get connection lock success, lock=1067932143
[2026-03-10 15:57:58.684][pool-120280-thread-1][66424c1ad62a48b0,RS36GS4D0FILBQ42AECBUT][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource$CloseIgnoreInvocationHandler][249]: Get connection unlock, lock=1067932143
[2026-03-10 15:58:02.040][http-nio-8989-exec-10][d03bd4cab21b4261,LX13UOHRAIKS2M5CHCF1E7][WARN][com.oceanbase.odc.service.db.browser.DBSchemaAccessors][63]: Get SYS-DATASOURCE failed, may lack of sys tenant permission,message=Sys username can not be null
[2026-03-10 15:58:02.041][pool-120281-thread-1][dc3bcd9631fe4ec5,YZBY1WTLLCBKBA4KMPTID][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource][209]: Established shared JDBC Connection, lock=1209274244
[2026-03-10 15:58:02.041][pool-120281-thread-1][dc3bcd9631fe4ec5,YZBY1WTLLCBKBA4KMPTID][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource][146]: Get connection lock success, lock=1209274244
[2026-03-10 15:58:02.045][pool-120281-thread-1][dc3bcd9631fe4ec5,YZBY1WTLLCBKBA4KMPTID][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource$CloseIgnoreInvocationHandler][249]: Get connection unlock, lock=1209274244
[2026-03-10 15:58:02.053][http-nio-8989-exec-10][d03bd4cab21b4261,LX13UOHRAIKS2M5CHCF1E7][WARN][com.oceanbase.odc.plugin.schema.obmysql.parser.OBMySQLGetDBTableByParser][84]: Failed to parse table ddl, error message=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2
[2026-03-10 15:58:02.128][http-nio-8989-exec-10][d03bd4cab21b4261,LX13UOHRAIKS2M5CHCF1E7][WARN][com.oceanbase.tools.dbbrowser.schema.mysql.MySQLNoLessThan5700SchemaAccessor][1077]: Failed to get table options by parse table ddl, message=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2
[2026-03-10 15:58:02.147][http-nio-8989-exec-10][d03bd4cab21b4261,LX13UOHRAIKS2M5CHCF1E7][INFO][com.oceanbase.odc.server.web.controller.RestExceptionHandler][391]: ODC_FAILED_REQUEST, httpMethod=GET, fullURL=http://203.123.86.154:8989/api/v2/connect/sessions/eyJkYklkIjoyNiwiZHNJZCI6NCwiZnJvbSI6IjE3Mi4xNy4wLjEiLCJyZWFsSWQiOiJhN2YyNzFhMmEyIn0=/databases/test/tables/dGVzdF9wYXJ0?currentOrganizationId=10000, remoteHost=8.219.139.151, clientAddress=8.219.139.151, handler=com.oceanbase.odc.server.web.controller.v2.DBTableController#getTable[3 args], exceptionType=UnexpectedException, message=Query table information failed, table name=test_part, error massage=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2, rootReason= at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at com.oceanbase.odc.server.web.controller.v2.DBTableController$$FastClassBySpringCGLIB$$a1ca1193.invoke() at com.oceanbase.odc.server.web.controller.v2.DBTableController.getTable(DBTableController.java:74) at com.oceanbase.odc.service.db.DBTableService.getTable(DBTableService.java:101) com.oceanbase.odc.core.shared.exception.UnexpectedException: 预期外异常,错误详情:Query table information failed, table name=test_part, error massage=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2, perfLevel=P3, response=ErrorResponse(error=Error(code=Unexpected, message=预期外异常,错误详情:Query table information failed, table name=test_part, error massage=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2, details=[Error.Detail(code=Unexpected, target=null, message=Query table information failed, table name=test_part, error massage=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2), Error.Detail(code=UnexpectedException, target=null, message=Query table information failed, table name=test_part, error massage=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2)]), code=Unexpected, message=预期外异常,错误详情:Query table information failed, table name=test_part, error massage=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2)
[2026-03-10 15:58:02.507][http-nio-8989-exec-9][6632f64991214a7c,CXIBQ6C8QM58MHYXUJOH7I][WARN][com.oceanbase.odc.service.db.browser.DBSchemaAccessors][63]: Get SYS-DATASOURCE failed, may lack of sys tenant permission,message=Sys username can not be null
[2026-03-10 15:58:02.516][http-nio-8989-exec-9][6632f64991214a7c,CXIBQ6C8QM58MHYXUJOH7I][WARN][com.oceanbase.odc.plugin.schema.obmysql.parser.OBMySQLGetDBTableByParser][84]: Failed to parse table ddl, error message=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2
[2026-03-10 15:58:02.569][http-nio-8989-exec-9][6632f64991214a7c,CXIBQ6C8QM58MHYXUJOH7I][WARN][com.oceanbase.tools.dbbrowser.schema.mysql.MySQLNoLessThan5700SchemaAccessor][1077]: Failed to get table options by parse table ddl, message=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2
[2026-03-10 15:58:02.587][http-nio-8989-exec-9][6632f64991214a7c,CXIBQ6C8QM58MHYXUJOH7I][INFO][com.oceanbase.odc.server.web.controller.RestExceptionHandler][391]: ODC_FAILED_REQUEST, httpMethod=GET, fullURL=http://203.123.86.154:8989/api/v2/connect/sessions/eyJkYklkIjoyNiwiZHNJZCI6NCwiZnJvbSI6IjE3Mi4xNy4wLjEiLCJyZWFsSWQiOiJhN2YyNzFhMmEyIn0=/databases/test/tables/dGVzdF9wYXJ0?currentOrganizationId=10000, remoteHost=8.219.139.151, clientAddress=8.219.139.151, handler=com.oceanbase.odc.server.web.controller.v2.DBTableController#getTable[3 args], exceptionType=UnexpectedException, message=Query table information failed, table name=test_part, error massage=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2, rootReason= at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at com.oceanbase.odc.server.web.controller.v2.DBTableController$$FastClassBySpringCGLIB$$a1ca1193.invoke() at com.oceanbase.odc.server.web.controller.v2.DBTableController.getTable(DBTableController.java:74) at com.oceanbase.odc.service.db.DBTableService.getTable(DBTableService.java:101) com.oceanbase.odc.core.shared.exception.UnexpectedException: 预期外异常,错误详情:Query table information failed, table name=test_part, error massage=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2, perfLevel=P2, response=ErrorResponse(error=Error(code=Unexpected, message=预期外异常,错误详情:Query table information failed, table name=test_part, error massage=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2, details=[Error.Detail(code=Unexpected, target=null, message=Query table information failed, table name=test_part, error massage=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2), Error.Detail(code=UnexpectedException, target=null, message=Query table information failed, table name=test_part, error massage=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2)]), code=Unexpected, message=预期外异常,错误详情:Query table information failed, table name=test_part, error massage=You have an error in your SQL syntax; check the manual for the right syntax to use near ‘Y KEY (id)\n) ORGANIZATION…’ at line 6, col 2)
[2026-03-10 15:58:05.406][pool-120282-thread-1][6c0265ad4e464e60,286CPQFQBH6J4LE83G6N79V][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource][209]: Established shared JDBC Connection, lock=481293966
[2026-03-10 15:58:05.406][pool-120282-thread-1][6c0265ad4e464e60,286CPQFQBH6J4LE83G6N79V][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource][146]: Get connection lock success, lock=481293966
[2026-03-10 15:58:05.412][pool-120282-thread-1][6c0265ad4e464e60,286CPQFQBH6J4LE83G6N79V][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource$CloseIgnoreInvocationHandler][249]: Get connection unlock, lock=481293966
[2026-03-10 15:58:08.754][pool-120283-thread-1][432be19a80284927,JHY3CI9JCQKTLRTRI5MAO][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource][209]: Established shared JDBC Connection, lock=1603081501
[2026-03-10 15:58:08.754][pool-120283-thread-1][432be19a80284927,JHY3CI9JCQKTLRTRI5MAO][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource][146]: Get connection lock success, lock=1603081501
[2026-03-10 15:58:08.760][pool-120283-thread-1][432be19a80284927,JHY3CI9JCQKTLRTRI5MAO][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource$CloseIgnoreInvocationHandler][249]: Get connection unlock, lock=1603081501
[2026-03-10 15:58:12.575][pool-120284-thread-1][c3a6d5f7bb2d4430,0FVZDLUWDV6MW6BF9ZRI4CL][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource][209]: Established shared JDBC Connection, lock=1963988781
[2026-03-10 15:58:12.575][pool-120284-thread-1][c3a6d5f7bb2d4430,0FVZDLUWDV6MW6BF9ZRI4CL][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource][146]: Get connection lock success, lock=1963988781
[2026-03-10 15:58:12.581][pool-120284-thread-1][c3a6d5f7bb2d4430,0FVZDLUWDV6MW6BF9ZRI4CL][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource$CloseIgnoreInvocationHandler][249]: Get connection unlock, lock=1963988781
[2026-03-10 15:58:20.684][database-sync-62][,41fdb704c4b7,][WARN][com.oceanbase.odc.service.connection.database.DatabaseService][601]: Failed to obtain the connection, errorMessage=java.sql.SQLException: java.sql.SQLSyntaxErrorException: Could not connect to 172.16.22.240:2883 : (conn=288681) Access denied for user ‘root@general_ledger#qianbao’@‘172.16.22.197’ (using password: YES)
[2026-03-10 15:58:20.684][database-sync-62][,41fdb704c4b7,][WARN][com.oceanbase.odc.service.connection.database.DatabaseService][503]: Sync database failed, dataSourceId=1, errorMessage=java.sql.SQLException: java.sql.SQLSyntaxErrorException: Could not connect to 172.16.22.240:2883 : (conn=288681) Access denied for user ‘root@general_ledger#qianbao’@‘172.16.22.197’ (using password: YES)
[2026-03-10 15:58:20.687][pool-120285-thread-1][,1d43eeefbf05,][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource][209]: Established shared JDBC Connection, lock=229250163
[2026-03-10 15:58:20.687][pool-120285-thread-1][,1d43eeefbf05,][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource][146]: Get connection lock success, lock=229250163
[2026-03-10 15:58:20.691][pool-120287-thread-1][,6942a1f3f12f,][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource][209]: Established shared JDBC Connection, lock=383748077
[2026-03-10 15:58:20.691][pool-120287-thread-1][,6942a1f3f12f,][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource][146]: Get connection lock success, lock=383748077
[2026-03-10 15:58:20.695][pool-120285-thread-1][,1d43eeefbf05,][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource$CloseIgnoreInvocationHandler][249]: Get connection unlock, lock=229250163
[2026-03-10 15:58:20.697][pool-120287-thread-1][,6942a1f3f12f,][INFO][com.oceanbase.odc.core.datasource.SingleConnectionDataSource$CloseIgnoreInvocationHandler][249]: Get connection unlock, lock=383748077

麻烦升级一下odc版本到441bp1吧。该问题在新版本已经修复了

1 个赞

ODC工具bug?

是的

ODC工具不区分企业版和社区版吧,我看官网上odc工具4.4.1相关版本没有x86-web镜像版本,web镜像最新版本为4.3.4_BP3,该版本解决了上述bug么

区分的 odc后续web版仅在商业版发布。434bp3也解决了

学习了!!!