免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 4830 | 回复: 11
打印 上一主题 下一主题

hosts 文件似乎无法完成域名解析 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-04-28 20:20 |只看该作者 |倒序浏览
[root@node1 ~]# more /etc/host.conf
order hosts,bind
[root@node1 ~]# more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
25.179.2.13     node1
25.179.2.14     node2
25.179.2.23     node1-vip
10.10.10.13     node1-priv
25.179.2.24     node2-vip
10.10.10.14     node2-priv
[root@node1 ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:6A:14E  
          inet addr:25.179.2.13  Bcast:25.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::20c:29ff:fe6a:14de/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:258907 errors:2 dropped:2 overruns:0 frame:0
          TX packets:3754 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:26802194 (25.5 MiB)  TX bytes:403556 (394.0 KiB)
          Interrupt:185 Base address:0x1480

eth0:1    Link encap:Ethernet  HWaddr 00:0C:29:6A:14E  
          inet addr:25.179.2.23  Bcast:25.179.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:185 Base address:0x1480

eth0:2    Link encap:Ethernet  HWaddr 00:0C:29:6A:14E  
          inet addr:25.179.2.24  Bcast:25.179.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:185 Base address:0x1480

eth1      Link encap:Ethernet  HWaddr 00:0C:29:6A:14:E8  
          inet addr:10.10.10.13  Bcast:10.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::20c:29ff:fe6a:14e8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:257701 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:26703598 (25.4 MiB)  TX bytes:1344 (1.3 KiB)
          Interrupt:193 Base address:0x1800

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:91600 errors:0 dropped:0 overruns:0 frame:0
          TX packets:91600 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:16268339 (15.5 MiB)  TX bytes:16268339 (15.5 MiB)

[root@node1 ~]# hostname
node1
[root@node1 ~]# nslookup
> node1
;; connection timed out; no servers could be reached


在我应用程序中 因为要用到node1,但又不能解析,所以一直出现故障。
上面的eth0:1 eth0:2 是集群中的两个vip,应为node2 没有启动,所以就先飘逸到了node1上
我也不能确定现在的问题是否和这个有关系,所以也把他们保留了。
望达人赐教!

[ 本帖最后由 Meets_fan 于 2009-4-28 20:24 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2009-04-28 20:27 |只看该作者
[root@node1 ~]# ping node1
PING node1 (25.179.2.13) 56(84) bytes of data.
64 bytes from node1 (25.179.2.13): icmp_seq=0 ttl=64 time=0.029 ms
64 bytes from node1 (25.179.2.13): icmp_seq=1 ttl=64 time=0.060 ms

论坛徽章:
0
3 [报告]
发表于 2009-04-28 21:13 |只看该作者
您的应用程序放在哪台机器?
是不是在ip为25.179.2.13的那台?

论坛徽章:
0
4 [报告]
发表于 2009-04-28 21:21 |只看该作者

回复 #3 diyself 的帖子

是的

论坛徽章:
0
5 [报告]
发表于 2009-04-28 21:37 |只看该作者
原帖由 Meets_fan 于 2009-4-28 21:21 发表
是的

如果ping可以啊,那也许是您的程序的问题吧?

论坛徽章:
0
6 [报告]
发表于 2009-04-28 22:29 |只看该作者

回复 #5 diyself 的帖子

真是不熟悉这里的“本帖看法”这个东西,不小心就点住了, 不好意思啊。。。

这是在我启动oracle的em时出现了点错误,后来追踪问题的时候 就到了这里。

论坛徽章:
0
7 [报告]
发表于 2009-04-28 23:36 |只看该作者
nslookup是用DNS查询的,不用hosts文件吧?

你直接ping node1看看.

论坛徽章:
0
8 [报告]
发表于 2009-04-28 23:43 |只看该作者
原帖由 ipaddr 于 2009-4-28 23:36 发表
nslookup是用DNS查询的,不用hosts文件吧?

你直接ping node1看看.


lz在2楼贴出了ping的结果

论坛徽章:
1
操作系统版块每日发帖之星
日期:2015-07-11 22:20:00
9 [报告]
发表于 2009-04-28 23:47 |只看该作者
原帖由 ipaddr 于 2009-4-28 23:36 发表
nslookup是用DNS查询的,不用hosts文件吧?

你直接ping node1看看.

up你。

论坛徽章:
0
10 [报告]
发表于 2009-04-29 10:22 |只看该作者
解决了?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP