Solve the Problem of java.net. UnknownHostException reported by java in linux.

Source: Internet
Author: User

Situation
 
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
 
Done.



Author fenglingcompany

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.