Mac under idea error unable to ping server at localhost:1099

Source: Internet
Author: User
Tags macbook

This problem has been killing me for hours, and I don't know what I changed when I last configured Tomcat or when I configured idea, resulting in a HelloWorld Web project not starting, always error unable to ping server at localhost : 1099, check the next network solution, found that whether to change the Catlina.bat file or modify the Setenv file, can not solve my problem. Google the problem, found a solution, here affixed to the original address StackOverflow.


The original question is as follows:



Favorite

I ' m trying to make a simple web App in IntelliJ by following this tutorial:http://wiki.jetbrains.net/intellij/creating_a_s Imple_web_application_for_tomcat_in_intellij_idea_12

I believe my tomcat is installed correctly since I, the Tomcat pictures when I go to http://localhost:8080/

I ' ve followed all the "steps up until" part it tells me to run index.jsp, at which point I get the error:

Error:exception thrown by the agent:java.net.MalformedURLException:Local host name Unknown:java.net.UnknownHostExcept Ion:nodename nor servname provided, or not known

I'll be in the log:

Application server is not connected before run configuration stop, reason:unable to ping Server at localhost:1099

The answer is as follows:

/etc/hosts file to point to localhost (127.0.0.1).

If you are a Mac user, you can enter hostname in the terminal to obtain hostname

$ hostname
Macbook-pro

From the output above your know your hostname is "Macbook-pro". Edit '/etc/hosts ' file and add ' name at the ' End of line ' that lists 127.0.0.1

Now that you know the hostname, replace the following macbook-pro for your hostname, and then add the following paragraph to the end of the host file

127.0.0.1 localhost Macbook-pro


This method solves the problem in the Mac version perfectly.


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.