本来在windows系统上调试mapabc是正常,今天转移到linux就出现问题了,经过反复调试,发现是linux无法访问到http://search1.mapabc.com/sisserver引起的问题。

抛出的异常片段:

java.net.UnknownHostException:search1.mapabc.com

这个异常其实是linux无法解析域名引起的,只要在配置一下这个域名对应的IP地址即可解决。

解决办法:

cd /etc/

vi hosts

输入:

211.151.71.11  search1.mapabc.com

保存再查看结果:

[root@localhost etc]# more hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
211.151.71.11   search1.mapabc.com

然后测试一下域名的连接:

[root@localhost etc]# ping 211.151.71.11
PING 211.151.71.11 (211.151.71.11) 56(84) bytes of data.
64 bytes from 211.151.71.11: icmp_seq=0 ttl=242 time=52.6 ms
64 bytes from 211.151.71.11: icmp_seq=1 ttl=242 time=52.4 ms

--- 211.151.71.11 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 52.492/52.560/52.628/0.068 ms, pipe 2

可以ping通了

最后测试网站,不再出现同一个问题,成功运行!


GitHub 加速计划 / li / linux-dash
12
2
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e added ecosystem file for PM2 5 年前
5def40a3 Add host customization support for the NodeJS version 5 年前
Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐