Booting Debug mode is didn’t smoothly on MacOS
Cause: Java8 Bug
方法一
查看本机名字1
hostname
1 | sudo vim /private/etc/hosts |
方法二
vm option 添加
1 | -Djava.net.preferIPv4Stack=true |
In general, a java agent is just a specially crafted jar file. It utilizes the Instrumentation API that the JVM provides to alter existing byte-code that is loaded in a JVM.
For an agent to work, we need to define two methods:
An interesting concept to keep in mind is that a JVM implementation, like Oracle, OpenJDK, and others, can provide a mechanism to start agents dynamically, but it is not a requirement.
https://www.baeldung.com/java-instrumentation
https://juejin.im/post/5ac32eba5188255c313af0dd
https://www.ibm.com/developerworks/cn/java/j-lo-jse61/index.html
http://www.iocoder.cn/SkyWalking/agent-plugin-system/
configure service
1 | # /etc/systemd/system/test.service |
1 | cat >> /etc/systemd/system/mosh-server.service <<EOF |
boot service
1 | sudo systemctl enable mosh-server |
1 | cat >> /etc/systemd/system/mosh.service <<EOF |