Solve the problem of java.net. UnknownHostException reported by java in linux.
Source: Internet
Author: User
The java application interface developed in the window is useful when an http request is called for a domain name of an interface, but the Exception: java.net is reported every time it is deployed in linux. unknownHostException: msgmanager.com. I don't know what's going on. It's strange. First, the other party...
The java application interface developed in window is easy to use when an http request is called for an interface domain name, but is reported every time when it is deployed in linux: Exception: java.net. UnknownHostException: msgmanager.com. I don't know what's going on. It's strange. First, the other party's domain name is OK. The page I wrote is OK. It should be accessible through an ip address. This is strange. Today, google finally got it done. It turns out to be a problem with linux domain name settings.
Solution
1. modified vi/etc/hosts and added 201.253.102.122 fengye.com
2. set the resovl. conf file:
Search localdomain
Nameserver 211.150.124.82
Nameserver 211.150.125.195
Nameserver 8.8.8.8
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service