Linux基础知识系列之四种常见错误以及校验

Permission denied

这个错误就是在Linux基础知识系列之三开头就提到过了,通常就是权限不足,须要sudo权限,至于怎么设置请看以前的文章。安全

Name or service not known

服务器不认识hostname,那么怎么增长hostname呢?bash

Linux:/etc/hosts  在文件末尾添加 内网IP hostname
Windows:C:\Windows\System32\drivers\etc\hosts 在文件末尾添加  外网IP  hostname
复制代码

timeout

请求超时,通常使用ping来测试,输入ping IP/hostname,通常出现如下就是没问题:服务器

[root@hadoop001 ~]$ ping 114.67.73.xxx
PING 114.67.73.xxx (114.67.73.xxx) 56(84) bytes of data.
64 bytes from 114.67.73.xxx: icmp_seq=1 ttl=54 time=1.36 ms
64 bytes from 114.67.73.xxx: icmp_seq=2 ttl=54 time=1.29 ms
64 bytes from 114.67.73.xxx: icmp_seq=3 ttl=54 time=1.30 ms
^C
--- 114.67.73.xxx ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 1.290/1.320/1.362/0.042 ms
复制代码

不然,网络存在问题,可能须要修改DNS网络

Connection refused

链接拒接,通常使用telnet IP 端口,呈现如下就是成功:oop

[root@hadoop000 ~]# telnet 39.108.xxx.xx 9000
Trying 39.108.xxx.xx...
Connected to 39.108.xxx.xx.
Escape character is '^]'.

复制代码

不然多是防火墙未开端口,也有多是外部软件控制端口未开,例如:阿里云的安全组post

相关文章
相关标签/搜索