Not able to connect to remote application

Questions about YourKit .NET Profiler
Post Reply
soumyamukherjee
Posts: 7
Joined: Mon Oct 24, 2016 11:21 am

Not able to connect to remote application

Post by soumyamukherjee »

I have followed the below steps for remote profiling:
1) Downloaded the command line tool to the remote machine, unpacked it to new directory and ran the following command in command prompt started as administrator = YourKitTools64.exe enable (I guess there is no extra step to register the agent dll. kindly let me know if there are any steps for that)
2) I checked the folder path C:\Users\{..username...}\.ynp\log and the log file "MonitoringServer.exe-5200" contained the following.
16.02-41 0.004: Command line:
C:\Yourkit_commandlinetool_inst\YourKit-2016.02-b41-tools\YourKit-2016.02-b41-tools\MonitoringServer.exe
state
16.02-41 0.004: Executable: C:\Yourkit_commandlinetool_inst\YourKit-2016.02-b41-tools\YourKit-2016.02-b41-tools\MonitoringServer.exe
16.02-41 0.004: Windows Server 2008 R2; version 6.1.7601; 64-bit process
16.02-41 0.006: hid: 16022DX18U33YY828Y7Z4X49360ZXYY0569YX4Z6W3 64-bit machine
16.02-41 0.006: Today is 20161024
16.02-41 0.006: full_build_stamp: 2016.02.41 201608301347
16.02-41 0.006: Agent library path: C:\Yourkit_commandlinetool_inst\YourKit-2016.02-b41-tools\YourKit-2016.02-b41-tools\win64\ynpagent.dll
16.02-41 0.006: Reading startup options
16.02-41 0.006: Environment variable YNP_STARTUP_OPTIONS: not defined
16.02-41 0.006: Registry key HKLM\SOFTWARE\YNP\STARTUP_OPTIONS:
16.02-41 0.006: CLR_Agent_OnLoad: options=
16.02-41 0.006: Skipping C:\Yourkit_commandlinetool_inst\YourKit-2016.02-b41-tools\YourKit-2016.02-b41-tools\MonitoringServer.exe

No mention of the port number used by the profiler agent. Also skipping the monitor server.
I also restarted the IIS server after this. Then when I run the command
YourKitTools64.exe status , I get
The monitoring server is running.

Running .NET applications:

Name |PID |User |Profiler Status |Port
----------------+-----------+-------------------+-----------------------+------
mmc.exe |4784 64-bit|soumya.d.mukherjee |Started without profile|
mgssecsvc.exe |1588 32-bit|SYSTEM |Ready for attach |
SCNotification.e|6936 32-bit|soumya.d.mukherjee |Ready for attach |

Profiling of all processes that will start: enabled
Profiler startup options:

From my local desktop, I tried to connect to the remote application by giving, {username@remote_ip} / {username@remote_ip:port} / {remote_ip} and nothing works.
I am not sure whether the profiler agent has attached to the iis correctly.

Kindly let me know what am I missing here. Need the information urgently.
Thanks,
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Not able to connect to remote application

Post by Anton Katilin »

Do you want to profile IIS, right?

I don't see its executable w3wp.exe in the list of running applications:

Code: Select all

mmc.exe |4784 64-bit|soumya.d.mukherjee |Started without profile|
mgssecsvc.exe |1588 32-bit|SYSTEM |Ready for attach |
SCNotification.e|6936 32-bit|soumya.d.mukherjee |Ready for attach |
Please note that after restarting IIS you should access a dynamic page that will cause CLR to load.
From my local desktop, I tried to connect to the remote application by giving, {username@remote_ip} / {username@remote_ip:port} / {remote_ip} and nothing works.
You should normally connect as {remote_ip} or {remote_host_name}

However, you can connect only if the profiled application is running. As I stated above, I don't see w3wp is running at all.
soumyamukherjee
Posts: 7
Joined: Mon Oct 24, 2016 11:21 am

Re: Not able to connect to remote application

Post by soumyamukherjee »

Hi,
Thanks for the info.
I opened the Application URL on a browser and ran the "YourKitTools64.exe status" command again. This time it gave the below output.
The monitoring server is running.

Running .NET applications:

Name |PID |User |Profiler Status |Port
-----------------+------------+-------------------+--------------------+-------
w3wp.exe |10156 64-bit|DefaultAppPool |Agent loaded on star|10002
mgssecsvc.exe |1588 32-bit |SYSTEM |Ready for attach |
SCNotification.ex|10772 32-bit|soumya.d.mukherjee |Agent loaded on star|10003

Profiling of all processes that will start: enabled
Profiler startup options:

I also checked the log folder and it had created a w3wp.exe-{pid}. Below are its contents
16.02-41 0.002: Command line:
c:\windows\system32\inetsrv\w3wp.exe
-ap
DefaultAppPool
-v
v4.0
-l
webengine4.dll
-a
\\.\pipe\iisipm71c3dff6-7dd1-4548-bc68-a1d4486f39c4
-h
C:\inetpub\temp\apppools\DefaultAppPool\DefaultAppPool.config
-w

-m
0
-t
20
16.02-41 0.002: Executable: c:\windows\system32\inetsrv\w3wp.exe
16.02-41 0.002: Windows Server 2008 R2; version 6.1.7601; 64-bit process
16.02-41 0.002: hid: 16022DX18U33YY828Y7Z4X49366W9W35ZX9YX4Z6W3 64-bit machine
16.02-41 0.002: Today is 20161025
16.02-41 0.002: full_build_stamp: 2016.02.41 201608301347
16.02-41 0.003: Agent library path: C:\Yourkit_commandlinetool_inst\YourKit-2016.02-b41-tools\YourKit-2016.02-b41-tools\win64\ynpagent.dll
16.02-41 0.003: Reading startup options
16.02-41 0.003: Environment variable YNP_STARTUP_OPTIONS: not defined
16.02-41 0.003: Registry key HKLM\SOFTWARE\YNP\STARTUP_OPTIONS:
16.02-41 0.003: CLR_Agent_OnLoad: options=
16.02-41 0.003: session_id: 43621165229952 (1477371776,10156)
16.02-41 0.005: line_method: 1
16.02-41 0.047: Reusing existing dll file: C:\Windows\TEMP\BuiltInProbes201608301347.dll
16.02-41 0.048: .NET Framework version: v4.0.30319.36365
16.02-41 0.048: shmem: Global\YOURKIT SHARE5 G: OK, isFirst=0
16.02-41 0.048: shmem: Local\YOURKIT SHARE5 L: OK, isFirst=0
16.02-41 0.052: shmem: Global\YOURKIT SHARE2 G: OK, isFirst=0
16.02-41 0.052: shmem: Local\YOURKIT SHARE2 L: OK, isFirst=0
16.02-41 0.058: Profiler agent is listening on port 10002
16.02-41 0.059: setTriggers:

16.02-41 0.059: setTriggers: OK
16.02-41 0.144: Successfully registered probes: 11
Registered: .Cassandra
Registered: .CassandraLW
Registered: .Databases
Registered: .DatabasesLW
Registered: .Files
Registered: .FilesLW
Registered: .Processes
Registered: .Sockets
Registered: .SocketsLW
Registered: .WebPages
Registered: .WebPagesLW
16.02-41 0.144: Events from Auto probes cleared:

16.02-41 0.384: GCEvent(-): 1 -> 0 GarbageCollectionFinished
16.02-41 0.898: Using default YOURKIT_MONITORING_SERVER_PORT=10099
16.02-41 0.904: error: Counter creation failed: .NET CLR Memory|Gen 1 heap size||10156|28 Cannot identify counter instance
16.02-41 0.909: error: Counter creation failed: .NET CLR Memory|Gen 2 heap size||10156|28 Cannot identify counter instance
16.02-41 0.916: error: Counter creation failed: .NET CLR Memory|Large Object Heap size||10156|28 Cannot identify counter instance
16.02-41 0.921: error: Counter creation failed: .NET CLR Memory|# Gen 0 Collections||10156|28 Cannot identify counter instance
16.02-41 0.927: error: Counter creation failed: .NET CLR Memory|# Gen 1 Collections||10156|28 Cannot identify counter instance
16.02-41 0.933: error: Counter creation failed: .NET CLR Memory|# Gen 2 Collections||10156|28 Cannot identify counter instance
16.02-41 0.938: error: Counter creation failed: .NET CLR Memory|% Time in GC||10156|28 Cannot identify counter instance
16.02-41 0.945: error: Counter creation failed: .NET CLR Memory|# Total committed Bytes||10156|28 Cannot identify counter instance

I tried to connect again bt giving {remote_ip} / {remote_ip:port}, it still does not work.
What else am I missing?
soumyamukherjee
Posts: 7
Joined: Mon Oct 24, 2016 11:21 am

Re: Not able to connect to remote application

Post by soumyamukherjee »

FYI, I am using the 15 days free license right now.
Also I have installed the full Yourkit tool on my local desktop and copied the command line tool on the remote machine.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Not able to connect to remote application

Post by Anton Katilin »

Could you please send the full log file to [email protected]

Regarding the evaluation license. We will extend it if necessary.
Post Reply