Development Tip

IntelliJ, 간단한 웹 응용 프로그램을 시작할 수 없음 : localhost : 1099에서 서버를 ping 할 수 없음

yourdevel 2020. 11. 27. 21:31
반응형

IntelliJ, 간단한 웹 응용 프로그램을 시작할 수 없음 : localhost : 1099에서 서버를 ping 할 수 없음


이 자습서를 따라 IntelliJ에서 간단한 웹 앱을 만들려고합니다. http://wiki.jetbrains.net/intellij/Creating_a_simple_Web_application_for_Tomcat_in_IntelliJ_IDEA_12

내가 갈 때 tomcat 사진을 볼 수 있기 때문에 Tomcat이 올바르게 설치되었다고 생각합니다. http://localhost:8080/

실행하라는 메시지가 표시 될 때까지 모든 단계를 수행했는데이 index.jsp시점에서 오류가 발생합니다.

Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: nodename nor servname provided, or not known

나는 로그에서 이것을 본다.

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

이 1099는 실행-> 구성 편집의 JMX 포트에서 가져옵니다.

이 문제를 어떻게 해결합니까?


이 문제를 해결하려면 localhost (127.0.0.1)를 가리 키도록 / etc / hosts 파일에 시스템 이름을 추가해야합니다.

다음 명령을 실행하여 머신 이름을 찾을 수 있습니다.

$ hostname
macbook-pro

위의 출력에서 ​​호스트 이름이 "macbook-pro"임을 알 수 있습니다. "/ etc / hosts"파일을 편집하고 127.0.0.1이 나열된 줄 끝에 해당 이름을 추가합니다.

127.0.0.1 localhost macbook-pro

파일을 저장하십시오.

이제 IntelliJ가 서버를 시작할 수 있습니다.


사용중인 바람둥이가 Java 버전과 호환되는지 확인하십시오. 나에게 문제는 Tomcat-9에 Java-8이 필요했습니다. 이전 버전의 Java가있는 경우 Tomcat-7을 사용하여 테스트 할 수 있습니다.


내 호스트 이름을 localhost의 / etc / hosts에 추가했습니다. JAVA_HOME을 추가했지만 여전히 동일한 오류가 표시되었습니다. 콘솔에 다음과 같은 출력이 있습니다.

Unable to start as CATALINA_BASE contains a colon (:) character

구성 편집-> 시작 / 연결-> CATALINA_BASE 값을 tomcat 설치 폴더로 변경하여 문제를 해결했습니다. 그 전에는

CATALINA_BASE:   C:\Program Files\Apache Software Foundation\Tomcat 8.0

리눅스 머신에서는 정확하지 않습니다.)


참고로 특정 네트워크 조건에서 호스트 이름이 변경되거나 올바르지 않을 수 있습니다. Mac을 사용하는 경우 다음을 통해 호스트 이름을 상당히 영구적으로 설정할 수 있습니다.

sudo scutil --set HostName correct-name

이것은 mac이 / etc / hosts 파일을 읽는 방식에 문제가있는 것 같습니다. 예를 들어 http://youtrack.jetbrains.com/issue/IDEA-96865를 참조하십시오.

설명 된 결합으로 호스트 파일에 호스트 이름을 추가 할 필요는 없지만 문제가 해결됩니다.


내 문제는 tomcat 8 이상이 Java 6과 호환되지 않는다는 것입니다. Java 7로 변경하면 해결되었습니다.


나는 intellij 15.0을 사용할 때이 질문을 만난 다음 15.02 버전으로 업데이트합니다. 그 후 구성을 편집하고 기본 JRE를 내 JRE로 재설정합니다.


여기에 매우 큰 항구에 들어갈 때 비슷한 문제가 발생했습니다. 여기에 이미지 설명 입력

그러나 오프셋 범위에있는 더 작은 것으로 수정했을 때 : 여기에 이미지 설명 입력

Issue was resolved.


I had same problem. In "Edit Configurations.." -> "Tomcat Server" I changed JRE from "Default" to my current version with SDK directory address (like C:\Program Files\Java\jdk1.8.0_121\jre)

My Tomcat version is 8.5.31


I solve this problem adding the environment variables JAVA_HOME(C:\Program Files\Java\jdkx.x.x_xx) and JRE_HOME.


This error came to me when I configured (wrong) 3 Gb memory where there was none. IntelliJ does shows the real error message (Could not reserve enough space for object heap) in the Output frame. I was confused, and attracted by the message in the Event Log, which is to be ignored in this case.


None of the answers above worked for me. In the end I figured out it was an configuration error (I used the android SDK and not Java SDK for compilation).

Got to [Right Click on Project] --> Open Module Settings --> Module --> [Dependendecies] and make sure you have configured and selected the Java SDK (not the android java sdk)


I added the following VM Options and it worked for me:

-Dcom.sun.management.jmxremote= 
-Dcom.sun.management.jmxremote.port=1099 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false

I had the same problem of "Unable to ping server at localhost:1099" while I was using intellij 2016 version.

However, as soon as I upgraded it to 2017 version(Ultimate 2017.1) which is installed using "ideaIU-2017.1.exe" the problem disappeared.


I had this issue when running Tomcat 6.0.53 on Mac OS Sierra with Intellij IDEA to deploy Spring projects. This problem was solved after changing the Tomcat version to the 'tar.gz' one from official site. It seems the 'zip' one is for windows.


Setting project's SDK in IntelliJ (File > Project Structure > Project:Project SDK) worked for me


For those who encounter this when you just recently updated IntelliJ (In my case 2019.2).

I am using JBoss server so i tried to run standalone.bat in the command line and I saw the real issue on the console.

It can be different to yours, but in my case I saw:

failure description: "WFLYSRV0137: No deployment content with

And on that error I was able to fix this by removing the items (war or ear) inside the <deployments/> node in my standalone.xml

Hope this helps for those using JBoss+IntelliJ


On top pointing my hostname to 127.0.0.1 in hosts (just run hostname in cmd to get it) as well as doing what David GC mentioned, for me the error cleared and debugging worked when I went into the tomcat configuration and changed the debugging startup script from startup.bat (which was just my monkeying around) back to the catalina.bat start default.


I had same issue and my mistake was, I was trying to start tomcat server with incompatible version of JDK and installed Apache tomcat server. In my case I had installed JDK 7 with Apache tomcat 9. For Apache 9 JDK should be >= 8.

For compatibility check this https://tomcat.apache.org/whichversion.html

참고URL : https://stackoverflow.com/questions/19068977/intellij-cant-start-simple-web-application-unable-to-ping-server-at-localhost

반응형