Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // REMOTE DEBUG
- // mvn -DskipTests package (will obtain .jar)
- //
- // java -agentlib:jdwp=transport=dt_socket,resourceserver=y,suspend=n,address=5005 -jar my-app-0.1.jar
- // may set suspend=y to suspend application execution until debugger has been attached
- //
- // REMOTE JMX MONITORING AND DEBUG TCP v4
- // -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
- // -Dcom.sun.management.jmxremote.port=5006
- // -Dcom.sun.management.jmxremote.rmi.port=5006
- // -Dcom.sun.management.jmxremote.local.only=true
- // -Dcom.sun.management.jmxremote.host=localhost
- // -Dcom.sun.management.jmxremote.authenticate=false
- // -Dcom.sun.management.jmxremote.ssl=false
- // -Dcom.sun.management.jmxremote.authenticate=false
- // -Djava.rmi.server.hostname=127.0.0.1
- //
- // remote-alias - алиас ssh-соединения, сконфигурировано в ~/.ssh/config
- //
- // Будет держать туннель(проброс портов) до посинения
- // ssh -fNT -L 5005:localhost:5005 -L 5006:localhost:5006 remote-alias
- //
- //
- // Через 100с тунель автоматически закроется, если не был открыт сокет
- // (если соединение было установлено - будет ждать когда сокет закроется)
- // ssh -f -L 5005:localhost:5005 -L 5006:localhost:5006 remote-alias sleep 100;
- //
- //
- // по дополнительным портам, можно, например, ходить клиентом(браузер, curl) к приложению, если оно слушает этот порт
- //
- // -f run in background
- // -N no command execution
- // -T no terminal allocation
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement