我在使用SSM框架的时候,连接的是sqlserver 2008r2数据库,但是查询数据的时候总是出现这样的警告信息,导致的结果是第一次登录的时候获取数据慢或者获取数据失败,具体的log信息如下

警告: ConnectionID:2 ClientConnectionId: 26d4b559-c985-4b2e-bd8e-dd7a53b67e48 Prelogin error: host 127.0.0.1 port 1434 Error reading prelogin response: Connection reset ClientConnectionId:26d4b559-c985-4b2e-bd8e-dd7a53b67e48
二月 13, 2017 12:16:11 下午 com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
警告: ConnectionID:4 ClientConnectionId: 38e230ee-3a2f-4f40-bd1d-31fab938416e Prelogin error: host 127.0.0.1 port 1434 Error reading prelogin response: Software caused connection abort: recv failed ClientConnectionId:38e230ee-3a2f-4f40-bd1d-31fab938416e
二月 13, 2017 12:16:11 下午 com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
警告: ConnectionID:2 ClientConnectionId: 43054ba2-7b80-4b14-b4bb-675a44da850c Prelogin error: host 127.0.0.1 port 1434 Error reading prelogin response: Connection reset ClientConnectionId:43054ba2-7b80-4b14-b4bb-675a44da850c
二月 13, 2017 12:16:11 下午 com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
警告: ConnectionID:4 ClientConnectionId: 6a46f819-0541-469d-badf-3afe648a2334 Prelogin error: host 127.0.0.1 port 1434 Error reading prelogin response: Connection reset ClientConnectionId:6a46f819-0541-469d-badf-3afe648a2334
2017-02-13 12:16:11,482 [http-apr-8080-exec-8] DEBUG [org.mybatis.spring.transaction.SpringManagedTransaction] - JDBC Connection [jdbc:sqlserver://127.0.0.1:1434;authenticationScheme=nativeAuthentication;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;multiSubnetFailover=false;loginTimeout=15;lockTimeout=-1;lastUpdateCount=true;encrypt=false;disableStatementPooling=true;databaseName=db_zngkpt;applicationName=Microsoft JDBC Driver for SQL Server;applicationIntent=readwrite;, UserName=sa, Microsoft JDBC Driver 4.0 for SQL Server] will not be managed by Spring

然后在网上找解决方案,有很多说原因是:

第一次数据库连接后没有释放,然后接着第二次连接,就连接失败了,但是我使用的框架使用的是c3p0连接池,这个并不是我自己建的connection,所以,这个可以忽略了,那么还是别的原因么?

这个时候突然蹦出来一个说1434这个端口是已经被占用了,所以,没法使用,应该启用一个1433这个端口就没问题了,然后我就试着换了一个端口,然后呢,就正常了,以此来记录一下。

解决方案:

那么问题来了,1434和1433这两个端口各自的作用是什么呢?

关于1433和1434可以百度一下。

Prelogin error: host 127.0.0.1 port 1434 Error reading prelogin response: Connection reset ClientConnectionId:26d4b559-c985-4b2e-bd8e-dd7a53b67e48的更多相关文章

  1. connection reset by peer, socket write error问题排查

    2018-03-15更新:弄明白connection reset产生的原因,见重新分析connection reset by peer, socket write error错误原因 在开发文件上传功 ...

  2. 安装xlrd包的时候,总是报错:ERROR: Could not install packages due to an EnvironmentError: HTTPConnectionPool (host='127.0.0.1', port=8888):。。。

    安装xlrd包的时候,总是报错:ERROR: Could not install packages due to an EnvironmentError: HTTPConnectionPool (ho ...

  3. 解决org.openqa.selenium.WebDriverException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms org.springframework.beans.BeanInstantiation

    解决方法为将selenium-server-standalone-2.37.0.jar升级至selenium-server-standalone-2.41.0.jar即可. 下载地址:http://s ...

  4. IntelliJ运行下载的Servlet时报错 Error running Tomcat 8.5.8: Unable to open debugger port (127.0.0.1:49551): java.net.SocketException

    学习Java Servlet时,从Wrox上下载了示例代码,准备run/debug时发现以下错误: Error running Tomcat 8.5.8: Unable to open debugge ...

  5. selenium在Eclipse中打开fireFox浏览器是报报错connect to host 127.0.0.1 on port 7055

    1.相信很多同学刚接触selenium时,在Eclipse中打开fireFox浏览器是报报错: org.openqa.selenium.firefox.NotConnectedException: U ...

  6. Selenium2学习-038-firefox、webdriver版本不对称问题解决:org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055

    今天有个朋友在群里问,为何脚本运行不通过,其脚本操作步骤简单描述如下: 1.启动火狐浏览器 2.打开百度 3.查询框输入关键字 4.点击按钮[百度一下] 脚本挺简单的,其给出的应用报错信息如下所示: ...

  7. WebDriver:org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms

    今天尝试最新的webDriver与fireFox搭配: 运行代码时出现如下的问题,但是浏览器却可以打开: org.openqa.selenium.firefox.NotConnectedExcepti ...

  8. selenium 运行之后错误提示Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output

    错误提示: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port ...

  9. selenium 问题:Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms

    问题:Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms 原因: selenium-server-standalone-x. ...

随机推荐

  1. HashMap源码-Basic hash bin node

    /** * Basic hash bin node, used for most entries. (See below for * TreeNode subclass, and in LinkedH ...

  2. Git -- 自己项目关联新建的git

  3. 设置html属性为disabled时flask后台获取数据失败

    标签input的值如果不需要用户修改,则设置属性为 readonly,不要设置为 disabled.因为设置disabled会导致flask后端获取不到这个input得value rule_maker ...

  4. Python - 文本处理模块

    文本处理模块 本文地址: http://blog.csdn.net/caroline_wendy/article/details/27050431 Python的文本处理模块, 使用四种内置库. st ...

  5. 部署Redis 成windows服务

    Redis是可以安装成windows服务的,开机自启动,命令如下: redis-server --service-install redis.windows.conf 安装完之后,就可看到Redis已 ...

  6. jsp+servlet实现文件上传

    上传(上传不能使用BaseServlet) 1. 上传对表单限制 * method="post" * enctype="multipart/form-data" ...

  7. python基础 实战作业 ---Excel基本读写与数据处理

    代码地址如下:http://www.demodashi.com/demo/11650.html 看完本篇需要: 10min 作业练习需要: 0.5h~3h(依练习者对python熟悉程度而定) 看完本 ...

  8. php文件加载路径

    <?php require('reusable.php'); echo "相对路径加载<br/>"; /* ./ 表示当前文件所在的目录 ../ 表示当前文件所在 ...

  9. ARM(CM3)的汇编指令

    转http://blog.csdn.net/gaojinshan/article/details/11534569 16位数据操作指令 名字 功能ADC  带进位加法(ADD with Carry)  ...

  10. JanusGraph与Cassandra集成模式

    //如果使用的是cassandra 2.2或更高版本,需要开启thift,以使janus连接到cassandra. ./bin/nodetool enablethrift. 15.1 Local Se ...