本机能找到监听,其他机器却找不到[已解决]

[复制链接]
查看11 | 回复9 | 2015-3-4 14:48:58 | 显示全部楼层 |阅读模式
本帖最后由 foolcatjr 于 2014-1-9 14:02 编辑
本机监听显示正常
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias
LISTENER
Version
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date
08-JAN-2014 14:24:36
Uptime
0 days 0 hr. 1 min. 27 sec
Trace Level
off
Security
ON: Local OS Authentication
SNMP
OFF
Listener Parameter File /home/ora11g/database/network/admin/listener.ora
Listener Log File /home/ora11g/diag/tnslsnr/dg1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "dg" has 1 instance(s).
Instance "dg", status READY, has 1 handler(s) for this service...
Service "dgXDB" has 1 instance(s).
Instance "dg", status READY, has 1 handler(s) for this service...
The command completed successfully

要连接的就是这个叫dg的数据库
在本机连接正常
[oracle@dg1 ~]$ sqlplus system/oracle@dg
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 8 14:26:14 2014
Copyright (c) 1982, 2009, Oracle.All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
但在客户端
C:\Users\BB-VHD>tnsping dg81
TNS Ping Utility for 64-bit Windows: Version 11.2.0.3.0 - Production on 08-JAN-2
014 14:31:00
Copyright (c) 1997, 2011, Oracle.All rights reserved.
Used parameter files:
d:\oracle11r2\ora112\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 192.168.3.81) (PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = dg) (SERV
ER = DEDICATED)))
TNS-12541: TNS:no listener

直接连接也不行
C:\Users\BB-VHD>sqlplus system/[email protected]/dg
SQL*Plus: Release 11.2.0.3.0 Production on Wed Jan 8 14:32:03 2014
Copyright (c) 1982, 2011, Oracle.All rights reserved.
ERROR:
ORA-12541: TNS:no listener

网络连接正常
C:\Users\BB-VHD>ping 192.168.3.81
Pinging 192.168.3.81 with 32 bytes of data:
Reply from 192.168.3.81: bytes=32 time<1ms TTL=64
Reply from 192.168.3.81: bytes=32 time<1ms TTL=64
Reply from 192.168.3.81: bytes=32 time<1ms TTL=64
Reply from 192.168.3.81: bytes=32 time<1ms TTL=64

从来没有遇到过这种问题,这是什么情况??

--------------------------------------------------------------------------------------------------------------------
补充:这个是用vmware做的虚拟机,在安装完操作系统后,通过复制磁盘文件,创建的新的虚拟机。
创建后更改过ip和机器名,但此时并未安装数据库软件,只有操作系统。
不知道跟这个有没有关系
--------------------------------------------------------------------------------------------------------------------
问题已经解决,在17楼

回复

使用道具 举报

千问 | 2015-3-4 14:48:58 | 显示全部楼层
本帖最后由 jiqing1004 于 2014-1-8 15:05 编辑
/etc/hosts 是不是有问题
回复

使用道具 举报

千问 | 2015-3-4 14:48:58 | 显示全部楼层
这是什么情况哦
回复

使用道具 举报

千问 | 2015-3-4 14:48:58 | 显示全部楼层
jiqing1004 发表于 2014-1-8 15:02
/etc/hosts 是不是有问题

host已经改过,只保留了本机ip和机器名
回复

使用道具 举报

千问 | 2015-3-4 14:48:58 | 显示全部楼层
防火墙呢


回复

使用道具 举报

千问 | 2015-3-4 14:48:58 | 显示全部楼层
foolcatjr 发表于 2014-1-8 15:35
host已经改过,只保留了本机ip和机器名

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
监听状态 只有 127.0.0.1 ,listener.ora 里 host 改成 ip 试试呢
回复

使用道具 举报

千问 | 2015-3-4 14:48:58 | 显示全部楼层
本帖最后由 还不算晕 于 2014-1-8 16:44 编辑
jiqing1004 发表于 2014-1-8 16:18
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
监听状态 只有 127.0.0.1 ,lis ...


我觉得可能会和这个有关,监听没在192.168.3.81这个上面启动。。。
ORA-12541: TNS:no listener 这个错误时,主机是可达的--192.168.3.81,主要还是在要连接的主机上相应端口没有监听服务,,比如是1521端口没打开。。。
http://blog.csdn.net/haibusuanyun/article/details/14517211 多种TNS报错总结--监听器及tnsnames.ora配置文件多种出错总结
回复

使用道具 举报

千问 | 2015-3-4 14:48:58 | 显示全部楼层
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
监听文件不要使用127.0.0.1 ,使用192.168.3.81.
回复

使用道具 举报

千问 | 2015-3-4 14:48:58 | 显示全部楼层
服务器监听配置文件IP改为192.168.3.81仔细检查下客户端监听文件 PING的通TNSPING也会通的
回复

使用道具 举报

千问 | 2015-3-4 14:48:58 | 显示全部楼层
查看/etc/hosts 文件,是否第一行 加入了127.0.0.1,去掉后重启监听。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行