Database Connection port problems

Source: Internet
Author: User

This problem occurs when you use SSH to operate the database. Later, the database connection port is incorrect.

 

Communications link failure due to underlying exception:

** Begin nested exception **

Java. Io. eofexception
Message: can not read response from server. expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.

Stacktrace:

Java. Io. eofexception: can not read response from server. expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
At com. MySQL. JDBC. mysqlio. readfully (mysqlio. Java: 1997)
At com. MySQL. JDBC. mysqlio. reuseandreadpacket (mysqlio. Java: 2411)
At com. MySQL. JDBC. mysqlio. checkerrorpacket (mysqlio. Java: 2916)
At com. MySQL. JDBC. mysqlio. sendcommand (mysqlio. Java: 1631)
At com. MySQL. JDBC. mysqlio. sqlquerydirect (mysqlio. Java: 1723)
At com.mysql.jdbc.connection.exe csql (connection. Java: 3256)
At com.mysql.jdbc.preparedstatement.exe cuteinternal (preparedstatement. Java: 1313)
At com.mysql.jdbc.preparedstatement.exe cutequery (preparedstatement. Java: 1448)
At org.apache.tomcat.dbcp.dbcp.delegatingpreparedstatement.exe cutequery (delegatingpreparedstatement. Java: 93)
At jdbcconnect.dbconnect.exe cuteprequery (dbconnect. Java: 214)
At Inc. chkuser. checklogin (chkuser. Java: 84)
At org. Apache. jsp. orderset_jsp. _ jspservice (orderset_jsp.java: 97)
At org. Apache. Jasper. runtime. httpjspbase. Service (httpjspbase. Java: 70)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 803)
At org. Apache. Jasper. servlet. jspservletwrapper. Service (jspservletwrapper. Java: 393)
At org. Apache. Jasper. servlet. jspservlet. servicejspfile (jspservlet. Java: 320)
At org. Apache. Jasper. servlet. jspservlet. Service (jspservlet. Java: 266)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 803)
At org. Apache. Catalina. Core. applicationfilterchain. internaldofilter (applicationfilterchain. Java: 290)
At org. Apache. Catalina. Core. applicationfilterchain. dofilter (applicationfilterchain. Java: 206)
At org. Apache. Catalina. Core. standardwrappervalve. Invoke (standardwrappervalve. Java: 233)
At org. Apache. Catalina. Core. standardcontextvalve. Invoke (standardcontextvalve. Java: 175)
At org. Apache. Catalina. Core. standardhostvalve. Invoke (standardhostvalve. Java: 128)
At org. Apache. Catalina. Valves. errorreportvalve. Invoke (errorreportvalve. Java: 102)
At org. Apache. Catalina. Core. standardenginevalve. Invoke (standardenginevalve. Java: 109)
At org. Apache. Catalina. connector. coyoteadapter. Service (coyoteadapter. Java: 263)
At org. Apache. JK. server. jkcoyotehandler. Invoke (jkcoyotehandler. Java: 190)
At org. Apache. JK. Common. handlerrequest. Invoke (handlerrequest. Java: 283)
At org. Apache. JK. Common. channelsocket. Invoke (channelsocket. Java: 767)
At org. Apache. JK. Common. channelsocket. processconnection (channelsocket. Java: 697)
At org. Apache. JK. Common. channelsocket $ socketconnection. Runit (channelsocket. Java: 889)
At org. Apache. tomcat. util. threads. threadpool $ controlrunnable. Run (threadpool. Java: 690)
At java. Lang. thread. Run (thread. Java: 595)

** End nested exception **

Connection Pool settings
<Resource
Name = "JDBC/song"
Type = "javax. SQL. datasource"
Driverclassname = "com. MySQL. JDBC. Driver"
Password = "haishui"
Maxidle = "20"
Maxwait = "5000"
Username = "MySQL"
Url = "JDBC: mysql: // 210.21.206.200/enshine"
Maxactive = "80"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.