Skip to content
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

[bug]添加sql server数据源,校验失败 #186

Closed
tirestay opened this issue Mar 6, 2023 · 3 comments
Closed

[bug]添加sql server数据源,校验失败 #186

tirestay opened this issue Mar 6, 2023 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@tirestay
Copy link

tirestay commented Mar 6, 2023

环境:
sql server 2008 R2,防火墙已开放端口,通过工具(navicat)可以链接。

错误信息:

2023-03-06 11:32:40 INFO  executeaction- com.qlangtech.tis.coredefine.module.action.PluginAction:doSavePluginConfig
三月 06, 2023 11:34:52 上午 com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
警告: ConnectionID:9 ClientConnectionId: 25e7f8c7-35ff-4e92-9347-1ca21c6fc323 Prelogin error: host 192.168.3.199 port 1433 Unexpected end of prelogin response after 0 bytes read
2023-03-06 11:34:52 WARN  c.q.t.p.d.DataSourceFactory$BaseDataSourceFactoryDescriptor- java.lang.RuntimeException: com.qlangtech.tis.lang.TisException: 请确认插件:SqlServerDatasourceFactory配置:jindieyun,jdbcUrl:jdbc:sqlserver://192.168.3.199:1433;databaseName=yong;user=sa;password=Password123
java.lang.RuntimeException: java.lang.RuntimeException: com.qlangtech.tis.lang.TisException: 请确认插件:SqlServerDatasourceFactory配置:jindieyun,jdbcUrl:jdbc:sqlserver://192.168.3.199:1433;databaseName=yong;user=sa;password=Password123
	at com.qlangtech.tis.plugin.ds.BasicDataSourceFactory.getTablesInDB(BasicDataSourceFactory.java:199)
	at com.qlangtech.tis.plugin.ds.DataSourceFactory$BaseDataSourceFactoryDescriptor.validateDSFactory(DataSourceFactory.java:420)
	at com.qlangtech.tis.plugin.ds.DataSourceFactory$BaseDataSourceFactoryDescriptor.verify(DataSourceFactory.java:415)
	at com.qlangtech.tis.extension.Descriptor$3.visit(Descriptor.java:605)
	at com.qlangtech.tis.extension.Descriptor$3.visit(Descriptor.java:593)
	at com.qlangtech.tis.extension.impl.RootFormProperties.accept(RootFormProperties.java:75)
	at com.qlangtech.tis.extension.Descriptor.verify(Descriptor.java:593)
	at com.qlangtech.tis.util.AttrValMap.validate(AttrValMap.java:99)
	at com.qlangtech.tis.coredefine.module.action.PluginAction.parsePluginItems(PluginAction.java:731)
	at com.qlangtech.tis.coredefine.module.action.PluginAction.doSavePluginConfig(PluginAction.java:653)
	at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.qlangtech.tis.runtime.module.action.BasicModule.execute(BasicModule.java:115)
	at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:899)
	at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1544)
	at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)
	at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:98)
	at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:90)
	at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1620)
	at ognl.ASTMethod.getValueBody(ASTMethod.java:91)
	at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
	at ognl.SimpleNode.getValue(SimpleNode.java:258)
	at ognl.Ognl.getValue(Ognl.java:470)
	at ognl.Ognl.getValue(Ognl.java:434)
	at com.opensymphony.xwork2.ognl.OgnlUtil$3.execute(OgnlUtil.java:401)
	at com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecuteMethod(OgnlUtil.java:453)
	at com.opensymphony.xwork2.ognl.OgnlUtil.callMethod(OgnlUtil.java:399)
	at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:438)
	at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:293)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
	at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:250)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:179)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
	at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:49)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:142)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:137)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:137)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:201)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:67)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:133)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:89)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:101)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:142)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:160)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:175)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:121)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:167)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:203)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:196)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.qlangtech.tis.manage.common.valve.OperationLogInterceptor.doIntercept(OperationLogInterceptor.java:64)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.qlangtech.tis.manage.common.valve.TisExceptionInterceptor.doIntercept(TisExceptionInterceptor.java:86)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.qlangtech.tis.manage.spring.aop.AuthorityCheckAdvice.doIntercept(AuthorityCheckAdvice.java:85)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:137)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:48)
	at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:574)
	at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:79)
	at org.apache.struts2.dispatcher.servlet.StrutsServlet.service(StrutsServlet.java:80)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1395)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
	at com.qlangtech.tis.manage.common.DefaultFilter.doFilter(DefaultFilter.java:169)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1596)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:590)
	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:1610)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1300)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1215)
	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:500)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
	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:103)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: com.qlangtech.tis.lang.TisException: 请确认插件:SqlServerDatasourceFactory配置:jindieyun,jdbcUrl:jdbc:sqlserver://192.168.3.199:1433;databaseName=yong;user=sa;password=Password123
	at com.qlangtech.tis.plugin.ds.BasicDataSourceFactory.visitConnection(BasicDataSourceFactory.java:176)
	at com.qlangtech.tis.plugin.ds.BasicDataSourceFactory.visitFirstConnection(BasicDataSourceFactory.java:156)
	at com.qlangtech.tis.plugin.ds.BasicDataSourceFactory.getTablesInDB(BasicDataSourceFactory.java:186)
	... 127 common frames omitted
Caused by: com.qlangtech.tis.lang.TisException: 请确认插件:SqlServerDatasourceFactory配置:jindieyun,jdbcUrl:jdbc:sqlserver://192.168.3.199:1433;databaseName=yong;user=sa;password=Password123
	at com.qlangtech.tis.plugin.ds.BasicDataSourceFactory.visitConnection(BasicDataSourceFactory.java:284)
	at com.qlangtech.tis.plugin.ds.BasicDataSourceFactory.lambda$visitConnection$2(BasicDataSourceFactory.java:172)
	at com.qlangtech.tis.plugin.ds.DBConfig.vistDbName(DBConfig.java:127)
	at com.qlangtech.tis.plugin.ds.BasicDataSourceFactory.visitConnection(BasicDataSourceFactory.java:171)
	... 129 common frames omitted
Caused by: com.qlangtech.tis.lang.TisException: 通过端口 1433 连接到主机 192.168.3.199 的 TCP/IP 连接失败。错误:“驱动程序收到意外的登录前响应。请验证连接属性,并检查 SQL Server 的实例正在主机上运行,且在此端口接受 TCP/IP 连接。该驱动程序只能与 SQL Server 2005 或更高版本一起使用。”。 ClientConnectionId:25e7f8c7-35ff-4e92-9347-1ca21c6fc323,jdbcUrl:jdbc:sqlserver://192.168.3.199:1433;databaseName=yong;user=sa;password=Password123
	at com.qlangtech.tis.plugin.ds.DataSourceFactory.validateConnection(DataSourceFactory.java:98)
	at com.qlangtech.tis.plugin.ds.BasicDataSourceFactory.visitConnection(BasicDataSourceFactory.java:281)
	... 132 common frames omitted
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: 通过端口 1433 连接到主机 192.168.3.199 的 TCP/IP 连接失败。错误:“驱动程序收到意外的登录前响应。请验证连接属性,并检查 SQL Server 的实例正在主机上运行,且在此端口接受 TCP/IP 连接。该驱动程序只能与 SQL Server 2005 或更高版本一起使用。”。 ClientConnectionId:25e7f8c7-35ff-4e92-9347-1ca21c6fc323
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:3206)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:3195)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.Prelogin(SQLServerConnection.java:2937)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2756)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2418)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2265)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1291)
	at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:881)
	at java.sql.DriverManager.getConnection(DriverManager.java:664)
	at java.sql.DriverManager.getConnection(DriverManager.java:270)
	at com.qlangtech.tis.plugin.ds.sqlserver.SqlServerDatasourceFactory.getConnection(SqlServerDatasourceFactory.java:70)
	at com.qlangtech.tis.plugin.ds.DataSourceFactory.validateConnection(DataSourceFactory.java:93)
	... 133 common frames omitted
@baisui1981
Copy link
Member

baisui1981 commented Mar 6, 2023

先应急之用可以到先到本地目录: data/tis/libs/plugins/tis-datax-sqlserver-plugin/WEB-INF/lib 下:

-rw-r--r--  1 mozhenghua  wheel  1952759 Apr  7  2021 druid-1.0.15.jar
-rw-r--r--  1 mozhenghua  wheel    45024 Sep 16  2019 hamcrest-core-1.3.jar
-rw-r--r--  1 mozhenghua  wheel  1327642 Jun 23  2021 mssql-jdbc-9.2.1.jre8.jar
-rw-r--r--  1 mozhenghua  wheel    97719 Feb 27 12:59 plugin-rdbms-util-3.7.0.jar
-rw-r--r--  1 mozhenghua  wheel     8196 Feb 27 12:59 sqlserverreader-3.7.0.jar
-rw-r--r--  1 mozhenghua  wheel     7375 Feb 27 12:59 sqlserverwriter-3.7.0.jar
-rw-r--r--  1 mozhenghua  wheel    23196 Mar  6 09:46 tis-datax-sqlserver-plugin.jar

将SqlServer 的JDBC 驱动(mssql-jdbc-9.2.1.jre8.jar)升级到目前使用SqlServer所对应的SqlServer 版本

@baisui1981 baisui1981 added the enhancement New feature or request label Mar 6, 2023
@tirestay
Copy link
Author

tirestay commented Mar 6, 2023

先应急之用可以到先到本地目录: data/tis/libs/plugins/tis-datax-sqlserver-plugin/WEB-INF/lib 下:

-rw-r--r--  1 mozhenghua  wheel  1952759 Apr  7  2021 druid-1.0.15.jar
-rw-r--r--  1 mozhenghua  wheel    45024 Sep 16  2019 hamcrest-core-1.3.jar
-rw-r--r--  1 mozhenghua  wheel  1327642 Jun 23  2021 mssql-jdbc-9.2.1.jre8.jar
-rw-r--r--  1 mozhenghua  wheel    97719 Feb 27 12:59 plugin-rdbms-util-3.7.0.jar
-rw-r--r--  1 mozhenghua  wheel     8196 Feb 27 12:59 sqlserverreader-3.7.0.jar
-rw-r--r--  1 mozhenghua  wheel     7375 Feb 27 12:59 sqlserverwriter-3.7.0.jar
-rw-r--r--  1 mozhenghua  wheel    23196 Mar  6 09:46 tis-datax-sqlserver-plugin.jar

将SqlServer 的JDBC 驱动(mssql-jdbc-9.2.1.jre8.jar)升级到目前使用SqlServer所对应的SqlServer 版本

本地替换后可用,使用的官方驱动:https://www.microsoft.com/zh-cn/download/details.aspx?id=54671&751be11f-ede8-5a0c-058c-2ee190a24fa6=True&fa43d42b-25b5-4a42-fe9b-1634f450f5ee=True。

@baisui1981 baisui1981 added this to the v3.8.0 milestone Apr 13, 2023
@baisui1981
Copy link
Member

baisui1981 added a commit to qlangtech/plugins that referenced this issue Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants