getLocalMAC error

created at 02-23-2022 views: 2


In the process of using logj4j once, the system reports getLocalMAC error when it starts up. By viewing the source code, it is found that the InetAddress.getLocalHost() method will obtain the name of the personal computer. If your personal computer name is the ip found by localhost It will be, resulting in an error.


Just change the PC name to something other than localhost.

created at:02-23-2022
edited at: 02-23-2022: