An example of ORA-12170: TNS: Connection timeout Solution

Source: Internet
Author: User
A few days ago when the data center to connect to the database server, the report rdquo; ORA-12170: TNS: Connection timeout rdquo ;. This error took me two days to solve the problem.

A few days ago when the data center to connect to the database server, the report rdquo; ORA-12170: TNS: Connection timeout rdquo ;. This error took me two days to solve the problem.

A few days ago when the machine room to connect to the database server, reported "ORA-12170: TNS: Connection timeout ". It took me two days to solve this error. Now, I hope you will not take any detours.

The error message indicates that the local client is not connected to the server, and the Oracle of the two machines cannot communicate directly. This problem is too much. Here is a summary:

A tns configuration file is incorrect

This problem is the most basic and is the basis of the connection. We recommend that you copy the file directly from the server so that no error will occur. I have seen that the server cannot be parsed because there is a space after the server name.

2. The server firewall is enabled.

The firewall will organize a direct connection to tns, and verify that you can turn off the server's firewall.

Configuration of three routes

This is what I want to talk about today. It also took me two days to figure it out. This is especially important for users who want to send and receive emails over the Internet and connect to the server over the Intranet.

When I was in the data center, I used wireless connection to the Internet for Internet access, and wired connection to the Intranet for database connection. Under normal circumstances, the Internet and Intranet cannot be accessed at the same time. You must first set the route table information so that the Internet and Intranet gateways are not in the same subnet mask. You can use route print in the console to view local route information.

You may not understand it. I will give an example. The following figure shows the routing information when I cannot connect to the server. The focus is on the first two lines. We can see the gateway of my Internet (192.168.1.1) and the gateway of the Intranet (132.77.124.129) in the same network mask (0.0.0.0), the route cannot be parsed.

In this case, you can disconnect the Internet wireless network so that the Intranet can be connected. I can see this to understand the reason for the network, not the reason for tns. Next, I should see how to achieve simultaneous Intranet and Internet access.

I used the following command:

Route delete 0.0.0.0

Route add 0.0.0.0 mask 0.0.0.0 192.168.1.1

Route add 132.77.0.0 mask route 255.0.0 132.77.124.129

Route add 132.78.0.0 mask route 255.0.0 132.77.124.129

Route add 10.193.0.0 mask route 255.0.0 132.77.124.129

You can enter data in the console one by one or manually execute the data in the form of a bat file. After running, information about my routes is shown in

We can also see that my Internet gateway (192.168.1.1) and the Intranet Gateway (132.77.124.129) are not in the same network mask, so that the route can be parsed.

To sum up, do not panic when this problem occurs. You need to find the cause step by step.

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.