我要评分
获取效率
正确性
完整性
易理解

Java Profiler Functions Unavailable After Tool Installation

Symptom

After the tool is installed, users can successfully log in to the Kunpeng DevKit, but fail to use the Java Profiler. The output of the netstat -anp | grep 19090 command shows that port 19090 is not occupied.

If no information is displayed, the port is not occupied. In the preceding command, 19090 indicates the internal module communication port number of the Java Profiler, which is set during the installation. Change it as required.

Possible Causes

In Linux, securerandom.source=file:/dev/random is configured in the $JAVA_HOME/conf/security/java.security file by default. The random pool of file:/dev/random depends on the number of system interrupts. Therefore, when the number of system interrupts is less than the threshold, the /dev/random device is locked always, and the process that attempts to read data enters the waiting state. As a result, the startup of the Java Profiler service is delayed.

Troubleshooting Procedure

  1. Open the java.security file.
    1
    vi $JAVA_HOME/conf/security/java.security
    
  2. Locate the following code:
    1
    securerandom.source=file:/dev/random
    

    Press i to enter the insert mode and change the code after the equal sign to file:/dev/urandom.

    securerandom.source=file:/dev/urandom

    Press Esc, type :wq!, and press Enter to save the file and exit.

  3. Restart the tool.
    1
    systemctl restart java_perf