Bug 1398493

Summary: [GSS](6.4.z) After installed and started EAP 6.x as Windows service, The "Java Flight Recorder" didn't work.
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: xuzhan
Component: InstallerAssignee: jboss-set
Status: CLOSED NOTABUG QA Contact: Jiri Truhlar <jtruhlar>
Severity: high Docs Contact:
Priority: high    
Version: 6.4.8CC: bmaxwell, dereed, mkopecky, thauser
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-28 15:11:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description xuzhan 2016-11-25 02:17:44 UTC
Description of problem:
Install EAP 6.4.8 as Windows 2008 service and set it for JFR according to link[1], start it as service, whoever JFR didn't work.
------
[1]https://access.redhat.com/solutions/662203

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. install EAP 6.4.8 on Windows 2008.
2. configure EAP to use JFR by link[1] above and then install EAP as service.
3. start EAP service, then run command "jcmd $JBOSS_PID JFR.start" to see the error.
4. or run command "jmc", the EAP will not show in the list. If change to SYSTEM role according to link[2], the list only show PID number along with a "!" sign, and it can't be open.
5. If use pstools command like "psexec.exe -s jcmd $JBOSS_PID ..." it didn't work either.
-------------------------
[2]https://blogs.technet.microsoft.com/askds/2008/10/22/getting-a-cmd-prompt-as-system-in-windows-vista-and-windows-server-2008/


Actual results:

Error for step 3th above:
~~~
com.sun.tools.attach.AttachNotSupportedException: Insufficient memory or insufficient privileges to attach
	at sun.tools.attach.WindowsVirtualMachine.<init>(WindowsVirtualMachine.java:64)
	at sun.tools.attach.WindowsAttachProvider.attachVirtualMachine(WindowsAttachProvider.java:69)
	at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:214)
	at sun.tools.jcmd.JCmd.executeCommandForPid(JCmd.java:139)
	at sun.tools.jcmd.JCmd.main(JCmd.java:128)
~~~

Error for step 4th above:
~~~
[3]http://www.stevenschwenke.de/couldNotOpenPerfMemory
~~~

Error for step 5th above:
~~~
jcmd exited on WIN-xxxxx with error code 0.
~~~


Expected results:
JFR will work as expected.

Additional info:

Comment 3 xuzhan 2016-12-05 01:26:17 UTC
Dear Experts,

Can we have any info or plan about this issue?

Best Regards,
Zhang Xu

Comment 5 dereed 2017-04-28 15:11:30 UTC
Closing.  This is completely unrelated to EAP.

This is a Java/OS level issue.  These Java utilities that connect directly to the JVM must be run as the same user that Java is running as.