Io exception: The Network Adapter could not establish the connection workaround

Source: Internet
Author: User
Tags server port

1. IP Error:
Error when setting URL, for example: JDBC:ORACLE:THIN:@192.168.1.80:1521:ORCL
Database server is correct: Ping server IP is unobstructed. Ping does not change the URL correctly.
The port number is correct.
To do this: type Sqlplus on DOS to check if Oracle is turned on
All normal then perform the 2nd step below.
2. Firewall
If a fire wall is installed on the machine, it may be caused by a server port number screen. After shutting down the firewall, try reconnecting.
The 3rd step is still not possible.
3. The database listener does not start modifying the ImagePath value in the registry on your PC.
The following is an example of an Oracle database
Restart the database listener manually:
1: Start → run → input cmd→ into DOS command prompt interface
D:>lsnrctl
lsnrctl> status
Or
Lsnrctl> start
If it's similar to the information in the picture

Congratulations, your problem has been found, is caused by the database listener is not started.
Here's how to manually start a database:
Execute regedit at run to enter the registry to
Start → Run →regedit
Press the path below
Hkey_local_machine/system/currentcontrolset/services/oracleorahome90tnslistener
Find Oracleorahome90tnslistener (I'm using oracle9i other version of it should be Oracleorahomexxxtnslistener)

Once found, you will find that ImagePath key value does not exist, create it: (if there is, click to modify, the method is described below)
Right-click, pop-up menu select New Key (N) → string value (S)

Name it ImagePath
Select the ImagePath right-click and select Modify:

Enter your Oracle installation directory in the value/ora90 (other versions correspond to the ORAXXX directory)/bin/tnslsnr

When you are sure, exit the registry:
Then type start in the DOS command
If the following screen appears, congratulations, the listener started successfully:

Shut down DOS, start your program to test, should return to normal.

These are the reasons why the Network Adapter could not establish the connection exception, which is common in 3.

Original address: http://blog.csdn.net/mr_von/article/details/2880626

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.