-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.4.2 创建命名空间失败/数据库语法问题 #12625
Comments
看着是SQL出现了错误,请问数据库类型是Mysql吗?"`"是Mysql的语法,其它的数据库类型就会出错。 |
用的默认的数据库,不是mysql
用的默认数据库,未修改配置文件中spring.sql.init.platform参数 |
我的意思是,你连接的外部数据库类型是否是Mysql。 |
用的默认数据库,未设置使用任何外部数据库
|
刚刚去验证了一下,确实会由于是mysql语法"`"的问题,导致sql执行出现了异常。在默认情况下,使用的是内嵌的数据库也会出现该问题。 |
@i will solve it@ |
同样的问题,不知这个怎么解决 |
Version v2.4.0 can be rolled back |
已经提交了PR修改了,当前2.4.2会存在这个问题,可以使用下之前的版本或者手动修改下源码,或者使用外部的Mysql进行存储,可以临时使用下。 |
好的,谢谢 |
嗯嗯,谢谢,我回退到2.4.1,也可用 |
着急的话,可以有如下 几种方案:
|
什么时候退修复版本?2.4.3? |
#12659 先回滚了导致问题的PR,但是问题其实没有彻底解决。 |
2.4.2.1版本正常了 |
2.4.2开启鉴权后,登录web页面,输入初始密码,重新登录后,日志会报如下错误。
jdk版本:openjdk17.02
修改配置项目:
nacos.core.auth.server.identity.key=${NACOS_AUTH_IDENTITY_KEY:serverIdentity}
nacos.core.auth.server.identity.value=${NACOS_AUTH_IDENTITY_KEY:security}
nacos.core.auth.plugin.nacos.token.secret.key=${NACOS_AUTH_TOKEN:SecretKeyXLP62MnrR6vgScdgj3QvCb2HfgmcWeausN2gvwag4vfbQaAAtF345WsRe2}
日志详情:
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT id,quota,
usage
,max_size
,max_aggr_count,max_aggr_size,tenant_id FROM tenant_capacity WHERE tenant_id = ?]; nested exception is java.sql.SQLSyntaxErrorException: Lexical error at line 1, column 17. Encountered: "`" (96), after : "".at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:236)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1575)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:667)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:713)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:744)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:757)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:810)
at com.alibaba.nacos.config.server.service.capacity.TenantCapacityPersistService.getTenantCapacity(TenantCapacityPersistService.java:101)
at com.alibaba.nacos.config.server.service.NamespaceConfigInfoService.injectDetail(NamespaceConfigInfoService.java:48)
at com.alibaba.nacos.core.namespace.injector.NamespaceDetailInjectorHolder.injectDetail(NamespaceDetailInjectorHolder.java:54)
at com.alibaba.nacos.core.service.NamespaceOperationService.getNamespaceList(NamespaceOperationService.java:69)
at com.alibaba.nacos.console.controller.NamespaceController.getNamespaces(NamespaceController.java:73)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:903)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:809)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:529)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
The text was updated successfully, but these errors were encountered: