zoukankan      html  css  js  c++  java
  • Prelogin error: host 127.0.0.1 port 1434 Error reading prelogin response: Connection reset ClientConnectionId:26d4b559-c985-4b2e-bd8e-dd7a53b67e48

    我在使用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可以百度一下。

  • 相关阅读:
    常见的HTTP状态码(HTTP Status Code)说明
    eclipse tomcat maven热部署
    log4j.properties 详解与配置步骤
    js玩命加载……
    git学习
    vim学习笔记
    Android中在不同activity中进行自定义广播的解析
    Android中本地广播的实现
    Android中自定义广播的实现
    Android中获得网络状况的实现
  • 原文地址:https://www.cnblogs.com/ningheshutong/p/6393400.html
Copyright © 2011-2022 走看看