You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by "cdmikechen (Jira)" <ji...@apache.org> on 2022/07/04 07:03:00 UTC

[jira] [Assigned] (SUBMARINE-1128) Submarine server can not connect to database

     [ https://issues.apache.org/jira/browse/SUBMARINE-1128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

cdmikechen reassigned SUBMARINE-1128:
-------------------------------------

    Assignee: cdmikechen

> Submarine server can not connect to database
> --------------------------------------------
>
>                 Key: SUBMARINE-1128
>                 URL: https://issues.apache.org/jira/browse/SUBMARINE-1128
>             Project: Apache Submarine
>          Issue Type: Bug
>          Components: Backend Server
>            Reporter: cdmikechen
>            Assignee: cdmikechen
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.7.0
>
>
> I run submarine server in my computer and start a mysql with command *docker run -it -p 3306:3306 -d --name submarine-database -e MYSQL_ROOT_PASSWORD=password apache/submarine:database-0.7.0-SNAPSHOT
> *. 
> when I start server and login, the server report error:
> {code}
> ### Error querying database.  Cause: java.sql.SQLException: The connection property 'allowMultiQueries' only accepts values of the form: 'true', 'false', 'yes' or 'no'. The value 'truefailOverReadOnly=false' is not in this set.
> ### The error may exist in org/apache/submarine/database/mappers/SysUserMapper.xml
> ### The error may involve org.apache.submarine.server.workbench.database.mappers.SysUserMapper.login
> ### The error occurred while executing a query
> ### Cause: java.sql.SQLException: The connection property 'allowMultiQueries' only accepts values of the form: 'true', 'false', 'yes' or 'no'. The value 'truefailOverReadOnly=false' is not in this set.
> org.apache.ibatis.exceptions.PersistenceException: 
> ### Error querying database.  Cause: java.sql.SQLException: The connection property 'allowMultiQueries' only accepts values of the form: 'true', 'false', 'yes' or 'no'. The value 'truefailOverReadOnly=false' is not in this set.
> ### The error may exist in org/apache/submarine/database/mappers/SysUserMapper.xml
> ### The error may involve org.apache.submarine.server.workbench.database.mappers.SysUserMapper.login
> ### The error occurred while executing a query
> ### Cause: java.sql.SQLException: The connection property 'allowMultiQueries' only accepts values of the form: 'true', 'false', 'yes' or 'no'. The value 'truefailOverReadOnly=false' is not in this set.
> 	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:66)
> 	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:68)
> 	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
> 	at com.sun.proxy.$Proxy49.login(Unknown Source)
> 	at org.apache.submarine.server.workbench.rest.LoginRestApi.login(LoginRestApi.java:61)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
> 	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
> 	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
> 	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:200)
> 	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
> 	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
> 	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
> 	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)
> 	at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
> 	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
> 	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
> 	at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
> 	at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
> 	at org.glassfish.jersey.internal.Errors.process(Errors.java:268)
> 	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)
> 	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)
> 	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)
> 	at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416)
> 	at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)
> 	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
> 	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
> 	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> 	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:516)
> 	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
> 	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
> 	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
> 	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
> 	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> 	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
> 	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
> 	at java.lang.Thread.run(Thread.java:748)
> Caused by: java.sql.SQLException: The connection property 'allowMultiQueries' only accepts values of the form: 'true', 'false', 'yes' or 'no'. The value 'truefailOverReadOnly=false' is not in this set.
> 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
> 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:897)
> 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:886)
> 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
> 	at com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty.validateStringValues(ConnectionPropertiesImpl.java:314)
> 	at com.mysql.jdbc.ConnectionPropertiesImpl$BooleanConnectionProperty.initializeFrom(ConnectionPropertiesImpl.java:91)
> 	at com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty.initializeFrom(ConnectionPropertiesImpl.java:216)
> 	at com.mysql.jdbc.ConnectionPropertiesImpl.initializeProperties(ConnectionPropertiesImpl.java:2503)
> 	at com.mysql.jdbc.ConnectionImpl.initializeDriverProperties(ConnectionImpl.java:3153)
> 	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:774)
> 	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> 	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
> 	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400)
> 	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:664)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:208)
> 	at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:195)
> 	at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:190)
> 	at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:92)
> 	at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:375)
> 	at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:84)
> 	at org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:134)
> 	at org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:61)
> 	at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:279)
> 	at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:72)
> 	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:59)
> 	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
> 	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)
> 	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)
> 	at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:108)
> 	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:60)
> 	at com.sun.proxy.$Proxy48.query(Unknown Source)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
> 	... 60 more
> {code}
> I've found that a recently submitted PR has modified the database link url.
> [SUBMARINE-1052. Create submarine model management service in server|https://github.com/apache/submarine/commit/9ba44b975d3971664c9bd3daa9945d845a335251]
> I think maybe we need to check this url and check whether the parameters are valid



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org