Oracle Java Mission 컨트롤을 사용하여 Java Spring 애플리케이션을 프로파일하려고합니다. JVM 연결을 localhost:7091
으로 설정하고 java -Dcom.sun.management.jmxremote.rmi.port=7091 -jar app.jar
으로 애플리케이션을 시작했습니다.Java Mission Control : Flight Recorder throws : javax.naming.ServiceUnavailableException
비행 기록기를 시작하려고하면 오류 메시지가 나타납니다.
Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused: connect]
Could not connect to a JVM at service:jmx:rmi:///jndi/rmi://localhost:7091/jmxrmi. Make sure one is running and that you are using the correct protocol in the Service URL.
누가 그 오류의 원인 일 수 있는지 알고 있습니까?
나는 이것이 오래된 사람이라면 누구나 재주를 알고있다. localhost (127.0.0.1)에서 외부 IP 주소 (일반적으로 192.168.X.X)로 호스트 이름을 변경하면이 문제가 발생합니다. 또한 방화벽 (ufw)과 라우터가 다른 호스트에서 액세스하는 경우 라우터를 확인하십시오. –