我在使用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. Android ProgressBar手动控制开始和停止

    这两天有个需求,点击按钮从SD卡解压压缩包,并读取压缩包内txt文档内容,然后在街面上显示出来.毕竟IO操作很耗时,如果文件较大会花费不少时间.所以,在处理数据的时候能给个进度就好了.我们通常的做法就 ...

  2. JSON.parse(str),JSON.stringify(a)

    1.JSON.parse(str),字符串转换成对象 var str = '{"name":"huangxiaojian","age":&q ...

  3. [Python爬虫] 之二十二:Selenium +phantomjs 利用 pyquery抓取界面网站数据

    一.介绍 本例子用Selenium +phantomjs爬取界面(https://a.jiemian.com/index.php?m=search&a=index&type=news& ...

  4. netty handlers模式

    netty的handler模式真的挺方便的,可以像插件一样随意的插入自己新增的功能而不用队系统进行大的变动. 下面我们来看一下这个模式是如何实现和运行的. 待续...

  5. HTML5 Canvas 绘制库存变化折线 计算出最高最低库存

    <!DOCTYPE html> <html lang="utf-8"> <meta http-equiv="Content-Type&quo ...

  6. RGB颜色工具大全 and 网页配色方案

    RGB颜色工具:http://www.ostools.net/commons?type=3 配色方案:http://www.wzsky.net/html/Website/Color/103380.ht ...

  7. Mycat探索之旅(3)----Mycat的全局序列号

    一.本地文件方式 原理:此方式MyCAT将sequence配置到文件中,当使用到sequence中的配置后,MyCAT会更下classpath中的sequence_conf.properties文件中 ...

  8. python——socket模块与列表映射

    从socket模块学习中的一段奇怪代码说起 前言:在学习python标准库中的Socket模块中,发现了一段奇怪的代码. import socket def get_constants(prefix) ...

  9. vue 项目中 自定义 webpack 的 配置文件(webpack.config.babel.js)

    webpack.config.babel.js,这样命名是想让webpack在编译的时候自动识别es6的语法,现在貌似不需要这样命名了,之前用webpack1.x的时候貌似是需要的 let path ...

  10. kinect脸部三维数据特征点标签语义具体说明

    非常多零零碎碎的事情,导致非常久没写blog了.face animation的demo做完了也快一个月了.是时候总结总结了. Kinect获得的标识点共用121个.其给的sdk里面也给出了响应的标签. ...