<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: VisualVM's Memory Sampler is inactive for Axon.ivy Engine running as WIndows Service</title><link>https://answers.axonivy.com/questions/1516/visualvm-s-memory-sampler-is-inactive-for-axon-ivy-engine-running-as-windows-service</link><description>&lt;p&gt;We have an Axon.ivy Engine running as a Window Service. The version of the Axon.ivy we are using is 5.1.4.48243. We intentionally installed JDK 1.7.0_60 in order to use the VisualVM to monitor and investigate some memory issue. The Axon.ivy Engine is configured with JMX port.&lt;/p&gt;
&lt;p&gt;We are able to view the Axon.ivy Enigne application in the VisualVM but the Memory Sampler is rendered inactive and the notification given to us is:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Memory sampling:
Not available. Cannot connect to target application. Make sure the application is running on a supported JDK 6 or JDK 7.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If we run the Axon.ivy Engine as a non-service, everything works.&lt;/p&gt;
&lt;p&gt;We looked into the Axon.ivy Engine and discovered that it included a JRE inside which was also 1.7.0_60. We tried to configure the argument &lt;code&gt;ivy.dir.jre&lt;/code&gt; to the JDK's &lt;code&gt;jre&lt;/code&gt; but it still didn't work.&lt;/p&gt;
&lt;p&gt;We also discovered that the file &lt;code&gt;jre/bin/server/jvm.dll&lt;/code&gt; in the JDK and the Axon.ivy Engine's JRE were different (using SHA-1 checksume) despite everything looks the same on the surface.&lt;/p&gt;
&lt;p&gt;The questions are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Is it possible to use Memory Sampler on VisualVM to the Axon.ivy Engine running as a Windows Service? How?&lt;/li&gt;
&lt;li&gt;Why we cannot start the Axon.ivy Engine when we change the argument &lt;code&gt;ivy.dir.jre&lt;/code&gt;?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I managed to find a way to start both Axon.ivy Engine service and VisualVM both under Local System account using &lt;a href="http://stackoverflow.com/questions/77528/how-do-you-run-cmd-exe-under-the-local-system-account"&gt;PSTools&lt;/a&gt;. However, the result is still the same, the Memory Sampler is still inactive.&lt;/p&gt;
&lt;p&gt;&lt;img alt="VisualVM and Axon.ivy Engine service are both started under Local System account" src="http://s27.postimg.org/byxe5nb0j/visual_vm_and_axonivy_service_both_started_as_sy.png"&gt;
&lt;img alt="Axon.ivy Engine JVM details" src="http://s27.postimg.org/8qswsloqr/axon_ivy_engine_jvm_details.png"&gt;
&lt;img alt="VisualVM JVM details" src="http://s27.postimg.org/o22pt7m2r/visual_vm_jvm_details.png"&gt;&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1516/visualvm-s-memory-sampler-is-inactive-for-axon-ivy-engine-running-as-windows-service" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 19 Oct 2015 08:44:41 -0400</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/1516/visualvm-s-memory-sampler-is-inactive-for-axon-ivy-engine-running-as-windows-service/1517</link><description>&lt;p&gt;You need to start the JVisualVM with the same user that is used to start the engine service.  See the service properties in the "Log on" tab. &lt;img alt="alt text" src="http://answers.axonivy.com/upfiles/serviceAccount.PNG"&gt;&lt;/p&gt;
&lt;p&gt;In most cases it is sufficient to right click on the jvisualvm binary an run it as administrator. Otherwise you can use "runas" to start a windows process with as a special user.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Mon, 19 Oct 2015 08:44:41 -0400</pubDate><guid>https://answers.axonivy.com/questions/1516/visualvm-s-memory-sampler-is-inactive-for-axon-ivy-engine-running-as-windows-service/1517</guid></item></channel></rss>