Cannot open the connection to the host. in port 1521: solution to connection failure

Source: Internet
Author: User


The connection to the host cannot be opened. when the project is started today on the port 1521: connection failure solution, a prompt is displayed that the remote Oracle cannot be connected. I tried to telnet port 1521 of the Oracle server, prompting that the connection failed. D: \ Documents ents and Settings \ Administrator> telnet 10.201.70.68 1521 www.2cto.com is connecting to 10.201.70.68... cannot open the connection to the host. in port 1521: the connection fails. the Oracle server and the local machine are both in the LAN. There is no network connection problem. How can this problem be solved. Check that 10...70.68 does not enable the firewall. You can ping it. However, Oracle cannot be connected directly to the oracle server. It was found that it was caused by listener. ora. After modification, the \ product \ 10.2.0 \ db_1 \ NETWORK \ ADMIN \ listener. ora database was restored to normal. Telnet port 1521 of the Oracle server again and the connection still fails. D: \ Documents ents and Settings \ Administrator> telnet 10.201.70.68 1521 www.2cto.com is connecting to 10.201.70.68... the connection to the host cannot be opened. In port 1521: connection failure, run the command to view the current port status netstat-a-n C: \ Documents and Settings \ Administrator> netstat-a-n Active Connections Proto Local Address Foreign Address State TCP 0.0.0.0: 23 0.0.0.0: 0 listening tcp 0.0.0.0: 80 0.0.0.0: 0 listening tcp 0.0.0.0: 135 0.0.0.0: 0 listening tcp 0.0.0.0: 445 0.0.0.0: 0 LIS Tening tcp 0.0.0.0: 1025 0.0.0.0: 0 listening tcp 0.0.0.0: 1026 0.0.0.0: 0 listening tcp 0.0.0.0: 1035 0.0.0.0: 0 listening tcp 0.0.0.0: 1080 0.0.0.0: 0 listening tcp 0.0.0.0: 1139 0.0.0.0: 0 LISTENING listen TCP 0.0.0.0: 1801 0.0.0.0: 0 listening tcp 0.0.0.0: 2103 0.0.0.0: 0 listening tcp 0.0.0.0: 2105 0.0.0.0: 0 listening tcp 0.0.0.0: 2107 0.0.0.0: 0 listening tcp 0.0.0.0: 3389 0.0.0.0: 0 listening tcp 10.201. 70.68: 139 0.0.0.0: 0 listening tcp protocol: 3389 10.201.70.75: 53370 established tcp 127.0.0.1: 1142 0.0.0.0: 0 listening tcp 127.0.0.1: 1521 0.0.0.0: 0 listening tcp 127.0.0.1: 42424 0.0.0.0: 0 listening udp 0.0.0.0: 445 *: * UDP 0.0.0.0: 1034 *: * port 1521 is in the LISTENING status, but the Telnet server port is still unavailable from my local machine. I tried to telnet port 1080, but I could find that the only difference is that one port is "0.0.0.0" and the other is "127.0.0.1 ". For verification, I can use telnet 1035/1026 again. But why? Is it because of this IP address? How can we change "127.0.0.1" to "0.0.0.0 ". 1521 is the Oracle listening port, and the problem is probably the listening itself. I open another machine that is also installed with Oracle and 1521 can be connected to, view NETWORK \ ADMIN \ listener. ora file, carefully compare the differences between the two Oracle files, found that the normal Oracle Server, listener. in the ora file, the following HOST displays the machine name, but cannot be connected to "localhost ". LISTENER = (DESCRIPTION = www.2cto.com (ADDRESS = (PROTOCOL = TCP) (HOST = lggsuper_pc) (PORT = 1521) after I back up the file, change localhost to the local name, restart the listener. Check whether the local connection of the database from the database server is normal. Run the netstat-a-n command to check whether the IP address before 1521 has changed to "0.0.0.0 ". C: \ Documents ents and Settings \ Administrator> netstat-a-n www.2cto.com Active Connections Proto Local Address Foreign Address State TCP 0.0.0.0: 23 0.0.0.0: 0 listening tcp 0.0.0.0: 80 0.0.0.0: 0 listening tcp 0.0.0.0: 135 0.0.0.0: 0 listening tcp 0.0.0.0: 445 0.0.0.0: 0 listening tcp 0.0.0.0: 1025 0.0.0.0: 0 listening tcp 0.0.0.0: 1026 0.0.0.0: 0 listening tcp 0.0.0.0.0: 1035: 0 listening tcp 0.0.0.0: 1080 0. 0.0.0: 0 listening tcp 0.0.0.0: 1317 0.0.0.0: 0 listening tcp 0.0.0.0: 1521 0.0.0.0: 0 listening tcp 0.0.0.0: 1801 0.0.0.0: 0 listening tcp 0.0.0.0: 2103 0.0.0.0: 0 listening tcp restart: 139 0.0.0.0: 0 listening tcp 127.0.0.1: 1324 127.0.0.1: 1521 TIME_WAIT TCP 127.0.0.1: 42424 0.0.0.0: 0 listening udp 0.0.0.0: 445 *: * www.2cto.com UDP 0.0.0.0: 1034 *: * 0.udp 0.0.0: 1044 *: * it seems that the probability of success is very high. Then I telnet the Oracle server through my computer. Port 1521 is successful. Solve the problem.
 

Related Article

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.