IO Error: The Network Adapter could not establish the connection - with Oracle 11gR2. Connecting with SQL developer

坚强是说给别人听的谎言 提交于 2019-12-10 13:38:06

问题


I have installed Oracle 11g ON a RedHat6 linux instance, by following all the steps mentioned in "http://technologylair.net/2013/08/oracle-11g-installation-linux/#comment-50" I am trying to connect to the database from a remote machine using the sql developer. But always ending up with - "IO Error: The Network Adapter could not establish the connection".

The parameters i am using are

Username: sys as sysdba 
Password: <oracle password> 
Hostname: IP address of the server on which Oracle SQL is installed. 
Port: 1521 
SID: testdb

I have also created a listener.ora file at location - "/oracle/product/11.2.0/db_1/network/admin", as it was not present before. Whose contents are -

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/oracle/product/11.2.0/db_1)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_TESTDB))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 173.39.238.15)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (TESTDB)

I have posted this question on dba.stackexchange too. but i need to get this resolved as soon as possible. and need help. Hence posting it here too.

Can you please tell me what i might be doing wrong.

Thanks.

EDIT the out put of "lsnrctl status"

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_TESTDB))) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error
TNS-00511: No listener Linux Error: 2: No such file or directory Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=173.39.238.15)(PORT=1521))) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error
TNS-00511: No listener Linux Error: 111: Connection refused


回答1:


Looks like your listener is not running. On the DB server, ps -ef | grep lsnr to see if there's a PID running tnslsnr. If not, then you need to start the listener with lsnrctl start.




回答2:


If you confirm from ps eaf | grep lsnr and its working, then run below probably a firewall is blocking your connection.

telnet hostname/IP 1521
Trying hostname/IP ...
telnet: connect to address hostname/IP: Connection refused
telnet: Unable to connect to remote host

If that is the case, then you need to get that checked.

Regards,



来源:https://stackoverflow.com/questions/24289096/io-error-the-network-adapter-could-not-establish-the-connection-with-oracle-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!