当前位置:操作系统 > Unix/Linux >>

易做图错误处理一则:主机名和IP错位

易做图错误处理一则:主机名和IP错位
 
  报错信息如下:
 
[plain] 
[oracle@odd ~]$ lsnrctl status  
  
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 01-MAY-2013 15:40:54  
  
Copyright (c) 1991, 2005, Oracle.  All rights reserved.  
  
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))  
TNS-12560: TNS:protocol adapter error  
 TNS-00530: Protocol adapter error  
  Linux Error: 113: No route to host  
 
     netca 报错信息截图如下:
 
     
 
[plain] 
[root@odd ~]# hostname -f  
odd.example.com  
  
[root@odd ~]# ifconfig eth0  
eth0      Link encap:Ethernet  HWaddr 00:0C:29:67:0C:98    
          inet addr:192.168.1.112  Bcast:255.255.255.255  Mask:255.255.255.0  
          inet6 addr: fe80::20c:29ff:fe67:c98/64 Scope:Link  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1  
          RX packets:1254 errors:0 dropped:0 overruns:0 frame:0  
          TX packets:128 errors:0 dropped:0 overruns:0 carrier:0  
          collisions:0 txqueuelen:0   
          RX bytes:444873 (434.4 KiB)  TX bytes:12771 (12.4 KiB)  
  
[root@odd ~]# cat /etc/hosts  
# Do not remove the following line, or various programs  
# that require network functionality will fail.  
127.0.0.1               localhost.localdomain localhost  
192.168.1.114           even.example.com   even  
192.168.1.115           odd.example.com    odd  
 
     看了上面的输出、大家应该明白了、hosts 文件里面主机名和IP参差不齐
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,