【已解决】doris202版本,日志频繁报错,影响日志查询

Viewed 220

doris版本:doris-2.0.2-rc05
使用没发现什么问题,但影响日志查询

日志报错内容:
Encountered: IDENTIFIER
Expected: ||, COMMA

at org.apache.doris.qe.ConnectProcessor.parse(ConnectProcessor.java:505) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:401) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.ConnectProcessor.dispatch(ConnectProcessor.java:583) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.ConnectProcessor.processOnce(ConnectProcessor.java:834) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.mysql.ReadListener.lambda$handleEvent$0(ReadListener.java:52) ~[doris-fe.jar:1.2-SNAPSHOT]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_161]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_161]
at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_161]

Caused by: org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = Syntax error
at org.apache.doris.analysis.SqlParser.unrecovered_syntax_error(SqlParser.java:2774) ~[doris-fe.jar:1.2-SNAPSHOT]
at java_cup.runtime.lr_parser.parse(lr_parser.java:616) ~[jflex-1.4.3.jar:?]
at org.apache.doris.common.util.SqlParserUtils.getMultiStmts(SqlParserUtils.java:60) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.ConnectProcessor.parse(ConnectProcessor.java:496) ~[doris-fe.jar:1.2-SNAPSHOT]
... 7 more
2024-03-11 14:54:23,122 WARN (mysql-nio-pool-4930|252325) [ConnectProcessor.handleQueryException():471] Process one query failed because.
org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = Syntax error in line 1:
...ORDER BY ORDINAL_POSITION SEPARATOR ', ') PARAMETER, R...
^
Encountered: IDENTIFIER
Expected: ||, COMMA

at org.apache.doris.qe.ConnectProcessor.parse(ConnectProcessor.java:505) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:401) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.ConnectProcessor.dispatch(ConnectProcessor.java:583) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.ConnectProcessor.processOnce(ConnectProcessor.java:834) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.mysql.ReadListener.lambda$handleEvent$0(ReadListener.java:52) ~[doris-fe.jar:1.2-SNAPSHOT]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_161]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_161]
at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_161]

Caused by: org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = Syntax error
at org.apache.doris.analysis.SqlParser.unrecovered_syntax_error(SqlParser.java:2774) ~[doris-fe.jar:1.2-SNAPSHOT]
at java_cup.runtime.lr_parser.parse(lr_parser.java:616) ~[jflex-1.4.3.jar:?]
at org.apache.doris.common.util.SqlParserUtils.getMultiStmts(SqlParserUtils.java:60) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.ConnectProcessor.parse(ConnectProcessor.java:496) ~[doris-fe.jar:1.2-SNAPSHOT]
... 7 more

2 Answers

看样子应该是其他 BI 工具连接了Doris,下发给Doris的 SQL 语句可能Doris中不支持这个语法导致的,可以排查下看看的

应该是上游在不断地下发 Syntax error 的sql到doris,需要定位出该语法异常的sql并终止下发。