1

I want to study btrace.

java process user is yubaofu

yubaofu@btrace sudo sh /home/yubaofu/study/btrace/bin/btrace 24234 JInfo.class
well-known file is not secure

yubaofu@btrace sh /home/yubaofu/study/btrace/bin/btrace 24234 JInfo.class
Connection refused

I find a similar issue

how to solve it ?

os:ubuntu12
jdk:jdk7

Community
  • 1
  • 1
fuyou001
  • 1,594
  • 4
  • 16
  • 27

2 Answers2

2

You should check the file /tmp/hsperfdata_$USER/$PID. what's the $USER exactly ? Make sure it's the same user that you initialize btrace with.

Gavin Xiong
  • 957
  • 6
  • 9
0

I've encountered this issue when attaching btrace to a process that has already been attached to. The workaround I found was

killall -KILL java

which simply kills all the java processes.