我正在尝试通过远程计算机上的SQL Developer连接到Oracle。
正如我使用以下命令验证的那样,侦听器已启动:
lsnrctl status
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 12-JUL-2018 13:59:38
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 12-JUL-2018 13:40:56
Uptime 0 days 0 hr. 18 min. 42 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/sicm/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "cfmisiro.cross.dc.uel.br" has 1 instance(s).
Instance "fmisiro", status READY, has 1 handler(s) for this service...
Service "fmisiro.cross.dc.uel.br" has 1 instance(s).
Instance "fmisiro", status READY, has 1 handler(s) for this service...
Service "fmisiroXDB.cross.dc.uel.br" has 1 instance(s).
Instance "fmisiro", status READY, has 1 handler(s) for this service...
The command completed successfully
我使用以下命令配置了iptable:
iptables -A INPUT -p tcp -s 0.0.0.0 --dport 1521 -j ACCEPT
正在监听该端口:
netstat -an | grep "LISTEN "
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:1521 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:61544 0.0.0.0:* LISTEN
tcp6 0 0 :::111 :::* LISTEN
tcp6 0 0 :::80 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:631 :::* LISTEN
tcp6 0 0 :::23064 :::* LISTEN
tcp6 0 0 ::1:6010 :::* LISTEN
tcp6 0 0 :::443 :::* LISTEN
tcp6 0 0 127.0.0.1:8005 :::* LISTEN
tcp6 0 0 :::22312 :::* LISTEN
tcp6 0 0 :::8009 :::* LISTEN
但是,当我尝试从远程计算机连接时,它会失败。
尝试通过telnet连接
telnet host 1521
我得到了错误:
telnet: Unable to connect to remote host: Connection timed out
当我尝试通过SQL Developer连接时,出现错误:
Status : Erro de ES: The Network Adapter could not establish the connection
我想念什么?
我还有另一个连接到SQL Developer的数据库。
这个:
lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 12-JUL-2018 14:34:18
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 29-JUN-2018 14:30:41
Uptime 13 days 0 hr. 3 min. 37 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "fmisir.cross.dc.uel.br" has 1 instance(s).
Instance "fmisir", status READY, has 1 handler(s) for this service...
Service "fmisirXDB.cross.dc.uel.br" has 1 instance(s).
Instance "fmisir", status READY, has 1 handler(s) for this service...
The command completed successfully