检查
监听的host的主机名是否存在
/etc/hosts 查看
如果没有则添加, 前面对应服务器IP 后面为主机名
修改oracle的监听host
oracle/product/11.2.0/dbhome_1/network/admin
vimlistener.ora
# listener.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora # Generated by Oracle configuration tools. LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = oracledb)(PORT = 1521))#oracle为与之对应的主机名 ) ) ADR_BASE_LISTENER = /home/oracle/app/oracle
ps:
如果监听host = localhost 那么 监听的是本机(服务器) 其他主机根部无法链接