报错原因
今天新安装的SQL SERVER 2012,于是ruoyi框架就测试多数据源,结果发现无法连接。奇怪的是navicat可以连接,SQL Server Management Studio也可以正常连接。
我们都知道SQLSERVER默认的端口是1433,结果我用1433连接不上。于是查询了端口,发现只有1434端口开着,这个端口一看就是SSL的连接端口。于是修改代码1434,发现代码报错,但是可以连接上。一直很无语。但是至少找到原因了,就是1433端口没有打开。
报错内容
10:01:14.003 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: 170a5548-f12f-40e6-920a-a85953262ac0 Prelogin error: host localhost port 1434 Error reading prelogin response: Connection reset ClientConnectionId:170a5548-f12f-40e6-920a-a85953262ac0
10:01:14.122 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: 6a59001a-9cbc-4ab7-908e-96256ce93bf7 Prelogin error: host localhost port 1434 Error reading prelogin response: Software caused connection abort: recv failed ClientConnectionId:6a59001a-9cbc-4ab7-908e-96256ce93bf7
10:01:14.338 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: 8c081455-7734-482e-8aa4-f4914506b591 Prelogin error: host localhost port 1434 Error reading prelogin response: Connection reset ClientConnectionId:8c081455-7734-482e-8aa4-f4914506b591
10:01:14.754 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: a27012a1-5007-4f07-bb01-1945e17df7cb Prelogin error: host localhost port 1434 Error reading prelogin response: Connection reset ClientConnectionId:a27012a1-5007-4f07-bb01-1945e17df7cb
10:01:15.565 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: 29b8edbd-dde8-4601-bae5-49f2b132be55 Prelogin error: host localhost port 1434 Error reading prelogin response: Software caused connection abort: recv failed ClientConnectionId:29b8edbd-dde8-4601-bae5-49f2b132be55
10:01:16.578 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: 02c70a93-4c00-4810-958e-415279b2e48b Prelogin error: host localhost port 1434 Error reading prelogin response: Software caused connection abort: recv failed ClientConnectionId:02c70a93-4c00-4810-958e-415279b2e48b
10:01:17.582 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: cb0730d2-08c5-4399-b120-b628d3d3a9be Prelogin error: host localhost port 1434 Error reading prelogin response: Software caused connection abort: recv failed ClientConnectionId:cb0730d2-08c5-4399-b120-b628d3d3a9be
10:01:18.589 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: 7ea5f5af-efd9-4abb-a7c2-1b69610b6a1b Prelogin error: host localhost port 1434 Error reading prelogin response: Software caused connection abort: recv failed ClientConnectionId:7ea5f5af-efd9-4abb-a7c2-1b69610b6a1b
10:01:19.605 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: ad45c5a2-0df3-43f1-80ec-2b869224e360 Prelogin error: host localhost port 1434 Error reading prelogin response: Software caused connection abort: recv failed ClientConnectionId:ad45c5a2-0df3-43f1-80ec-2b869224e360
10:01:20.611 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: ed93912a-b27d-4ecb-840b-d321b3011a04 Prelogin error: host localhost port 1434 Error reading prelogin response: Connection reset ClientConnectionId:ed93912a-b27d-4ecb-840b-d321b3011a04
10:01:21.626 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: 8c63902a-301d-483c-8d3f-5899a2767139 Prelogin error: host localhost port 1434 Error reading prelogin response: Connection reset ClientConnectionId:8c63902a-301d-483c-8d3f-5899a2767139
10:01:22.639 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: 42786c5d-22bf-4c95-b736-d71176055c39 Prelogin error: host localhost port 1434 Error reading prelogin response: Software caused connection abort: recv failed ClientConnectionId:42786c5d-22bf-4c95-b736-d71176055c39
10:01:23.643 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: 83439621-454c-400b-b27d-ea22e96fafa8 Prelogin error: host localhost port 1434 Error reading prelogin response: Software caused connection abort: recv failed ClientConnectionId:83439621-454c-400b-b27d-ea22e96fafa8
10:01:24.646 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: be5401eb-8256-46e0-8eab-3c2c08ecea4e Prelogin error: host localhost port 1434 Error reading prelogin response: Software caused connection abort: recv failed ClientConnectionId:be5401eb-8256-46e0-8eab-3c2c08ecea4e
10:01:25.651 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: d1d7d593-a172-46bd-b683-d70be08e9dae Prelogin error: host localhost port 1434 Error reading prelogin response: Connection reset ClientConnectionId:d1d7d593-a172-46bd-b683-d70be08e9dae
10:01:26.667 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: 4f8194c4-55b4-47c9-99a4-017ac9148d68 Prelogin error: host localhost port 1434 Error reading prelogin response: Connection reset ClientConnectionId:4f8194c4-55b4-47c9-99a4-017ac9148d68
10:01:27.682 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: d3a82303-a1ff-48b5-8444-2e848f40ea01 Prelogin error: host localhost port 1434 Error reading prelogin response: Software caused connection abort: recv failed ClientConnectionId:d3a82303-a1ff-48b5-8444-2e848f40ea01
10:01:28.699 [http-nio-8181-exec-2] WARN c.m.s.j.i.SQLServerConnection - [Prelogin,2919] - ConnectionID:2 ClientConnectionId: 9da64004-59b4-4eed-b84b-32411515a228 Prelogin error: host localhost port 1434 Error reading prelogin response: Software caused connection abort: recv failed ClientConnectionId:9da64004-59b4-4eed-b84b-32411515a228
10:01:28.702 [http-nio-8181-exec-2] ERROR c.a.d.p.DruidDataSource - [init,929] - init datasource error, url: jdbc:sqlserver://localhost:1434;databaseName=fos
com.microsoft.sqlserver.jdbc.SQLServerException: Software caused connection abort: recv failed ClientConnectionId:9da64004-59b4-4eed-b84b-32411515a228
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:3206)
at com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:2066)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.Prelogin(SQLServerConnection.java:2917)
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 com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:118)
at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:232)
at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:112)
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1703)
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1786)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:925)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1444)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1440)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:83)
at org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.getConnection(AbstractRoutingDataSource.java:194)
at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:265)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.startTransaction(AbstractPlatformTransactionManager.java:400)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:595)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:382)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)
at com.ruoyi.framework.aspectj.DataSourceAspect.around(DataSourceAspect.java:49)
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.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
at com.ruoyi.flowinn.service.FosUserV3Service$$EnhancerBySpringCGLIB$$7f9fd83d.list(<generated>)
at com.ruoyi.flowinn.testController.BladeUserTest.sqlserver(BladeUserTest.java:37)
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.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:895)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
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)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:114)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at com.ruoyi.common.filter.RepeatableFilter.doFilter(RepeatableFilter.java:39)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:121)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at com.ruoyi.framework.security.filter.JwtAuthenticationTokenFilter.doFilterInternal(JwtAuthenticationTokenFilter.java:47)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:2058)
... 146 common frames omitted
10:01:28.704 [http-nio-8181-exec-2] INFO c.a.d.p.DruidDataSource - [init,996] - {dataSource-2} inited
解决方法
1、查看数据库端口
-- 需要sa登录
-- 执行下面的代码,返回数据库端口
--
exec sys.sp_readerrorlog 0, 1, 'listening'
2、启动1433服务
3、重启服务
4、结束
这时候代码中用1433端口去连接就可以了。
标签:web,jdbc,java,caused,springframework,doFilter,org,recv,ApplicationFilterChain From: https://blog.csdn.net/renkai721/article/details/143051977