Unable to open connection to host, on port 1521: Connection failed resolution (modify Remote Desktop Connection port)

Source: Internet
Author: User
Tags mongodb postgresql server port
1, modify the Remote Desktop Connection port

The default port for Remote Desktop Terminal Services is "3389", and you need to make changes to the default port to prevent others from making malicious connections. On this, open Registry Editor, expand Hkey_local_machine\system\
currentcontrolset\control\terminal server\wds\rdpwd\tds\tcp "Branch, the" PortNumber "key value corresponding to the port number, it can be modified. Once the above settings are complete, you need to expand the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
\terminal Server\winstations\rdp-tcp Branch, also changes the "PortNumber" key value below it.




2, Unable to open connection to host, on port 1521: Connection Failed resolution

The project started today and suddenly prompted that remote Oracle could not be connected. I tried telnet to the Oracle server 1521 port, prompting the connection to fail.

D:\Documents and Settings\administrator>telnet 10.201.70.68 1521
Www.2cto.com
Connecting to 10.201.70.68 ... Unable to open connection to host on port 1521: Connection failed

Oracle server and this machine are in the LAN, there is no network problem, how can not connect.

Check that the 10.201.70.68 does not start the firewall, you can ping.

However, it is found that connecting Oracle directly on the Oracle server does not connect properly.

After the discovery for Listener.ora caused, after the modified \product\10.2.0\db_1\network\admin\listener.ora database returned to normal.

Telnet to the Oracle server's 1521 port again, still fails to connect.

D:\Documents and Settings\administrator>telnet 10.201.70.68 1521
Www.2cto.com
Connecting to 10.201.70.68 ... Unable to open connection to host on port 1521: Connection failed

Use commands to view current port conditions Netstat-a–n

C:\Documents and Settings\administrator>netstat-a-n

Active connections

Proto Local Address Foreign

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: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
Www.2cto.com
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 10.201.70.68: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 *:*

The 1521 port is in the listening state, but the server port cannot be telnet from my native computer.

I tried to telnet 1080 port, found that it can, the only difference is that one end is "0.0.0.0", One is "127.0.0.1". In order to verify, I also telnet 1035/1026 can pass.

But why, is it because of this IP reason, how can this "127.0.0.1" changed to "0.0.0.0".

1521 is the Oracle listening port, and the problem is estimated to be on the monitor itself.

I opened another machine with Oracle and 1521 connected, looked at the Network\admin\listener.ora file, carefully contrasted the differences between the two Oracle files, and found the normal Oracle server, Listener.ora files, The following host shows the name of the machine and cannot connect to "localhost".

LISTENER =

(DESCRIPTION =
Www.2cto.com
(address = (PROTOCOL = TCP) (HOST = lggsuper_pc) (PORT = 1521))
)
After I have backed up the file, I will also change the localhost to my native name and restart listening. Check that the database is properly connected from the database server.

Then execute the command netstat-a–n view, at which point the IP in front of 1521 has become "0.0.0.0".

C:\Documents and Settings\administrator>netstat-a-n
Www.2cto.com
Active connections

Proto Local Address Foreign

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:1035 0.0.0.0: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 10.201.70.68: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 *:*

UDP 0.0.0.0:1044 *:*

It seems that the probability of success is very high, then I pass my Computer telnet Oracle server 1521 port, it was successful.

Solve the problem.

Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

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.