Sometimes when you start a Java program that contains JMX under Linux, a connection failure occurs when you use Jconsole to connect through the Jmxurl, and this happens if the Java program configuration and code are correct. Need to modify the Linux Hosts file
Vi/etc/hosts
The default configuration for hosts is:
# do don't remove the following line, or various programs
# that require network functionality would fail.
127.0.0.1 localhost.localdomain localhost localhost
:: 1 localhost6.localdomain6 Localhost6
Modify hosts:
# do don't remove the following line, or various programs
# that require network functionality would fail.
192.168.0.1 localhost.localdomain localhost localhost
127.0.0.1 localhost.localdomain localhost localhost
:: 1 localhost6.localdomain6 Localhost6
This configuration can also be:
Modify hosts:
# do don't remove the following line, or various programs
# that require network functionality would fail.
192.168.0.1 localhost.localdomain localhost localhost
:: 1 localhost6.localdomain6 Localhost6
is to add a line on the 127.0.0.1, fill in your current Linux matching IP, this article I found on the Internet that this is a JDK in Linux bug,jmx load when the IP read out the file is 127.0 0.1, so that remote access will be problematic, because 127.0.0.1 is native IP and is not a remote access IP, after the configuration and restart the program reload JMX, and then remote access you will find that you can connect.
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.