Connection refused exception solution for socket

Source: Internet
Author: User

Practice socket programming today, in the new socket accidentally encountered the following anomalies, and the good one, the original is not open the corresponding server, write down to prepare for reference, by the way for the vast number of netizens to mention a wake up, don't go a detour ...

Log Code

Java.net.ConnectException:Connection Refused:connect at
java.net.PlainSocketImpl.socketConnect (Native method) At
Java.net.PlainSocketImpl.doConnect (Unknown Source) at
java.net.PlainSocketImpl.connectToAddress ( Unknown source) at
Java.net.PlainSocketImpl.connect (Unknown source) at
Java.net.SocksSocketImpl.conn ECT (Unknown source) at
Java.net.Socket.connect (Unknown source) in
java.net.Socket.connect (Unknown so Urce) at
java.net.socket.<init> (Unknown source) at
java.net.socket.<init> (Unknown source )

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.