cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Transaction Discovery crashes

matt.richardson
Explorer

I've just installed the AppDynamics agent to monitor Octopus Deploy (octopus.com), a .net app that runs as a service.

 

I configured it to watch the appropriate exe, but it appears I need to run the Transaction Discovery tool. When I do, i get the following error message:

 

The server encountered an internal error () that prevented it from fulfilling this request.

javax.servlet.ServletException: java.lang.RuntimeException: An unrecoverable server error occurred. Please see server log for details.

 

Any idea how I can proceed here? Not a great first impression to have it crash within 10 minutes of starting a trial.

7 REPLIES 7

Preet.Gaur
AppDynamics Team

Hi Matt,

 

Can you please share controller logs for review? we will have to see why the error apperaed. Please do below steps and upload to logs

 

1. Reproduce the issue 2-3 times.

 

2. Upload the controller logs

 

  • ssh to controller machine
  • cd ControllerDir/bin
  • ./controller.[sh|bat] zip-logs

In case, you don't have access to connect with controller machine, then please capture logs by clicking on '?' (at top right corner) -> Export Controller Logs

 

Thanks,

Preet

Also Matt, it seems Annie Pidgeon have opened a support case for the same

 

https://appdynamics.zendesk.com/agent/tickets/91212 - subject : Re: Failure setting up transaction discovery

 

It would be great if you could reply on the support case with above mentioned details. I will keep you in loop so you should receive an email related to issue. 

Hi Preet

 

I'm using the SaaS version, so I dont have access to the controller logs.

 

Clicking on the ? button - there is no "export controller logs" option there.

 

Regards,

Matt

I dont have access to the support ticket:

 

Permission Denied -- Help Center

You are trying to access AppDynamics Help Center but you don't have access. Please contact your administrator.
You will be redirected back to support page soon.

Preet.Gaur
AppDynamics Team

Hi Matt,

 

For saas controllers, you will not have access to controller logs. I did a quick validation on your saas controller https://548.saas.appdynamics.com/controller. It looksl you have installed machine agent and not app agent. Business Transaction Discovery is supported on Java + .NET agents only and not on machine agents. Please find supporting screenshot attached. 

 

Screen Shot 2017-03-29 at 12.59.23 PM.pngScreen Shot 2017-03-29 at 12.54.19 PM.png

 

More details on transaction discovery tool can be found on below link

 

https://docs.appdynamics.com/display/PRO42/Using+the+Transaction+Discovery+Tool

 

We hope it clarifes your doubt. 

 

Please keep us posted. 

 

Thanks,

Preet

 

Hi Preet

 

Thanks for investigating.

 

I did install the app agent - I followed the instructions on https://docs.appdynamics.com/display/PRO42/Instrument+Windows+Services+and+Standalone+Applications. It just looks like it took a while (multiple hours) for it to appear on the server side. No idea why.

 

So, not great it took so long to appear on the server side.

Not great that the discovery tool shows me the machine agent when it should only be showing me app agents.

 

But, its there now, just trying to work through the clunky UI to setup the transaction rules now.

 

Regards,

Matt

 

 

Raunak.Mohanty
AppDynamics Team (Retired)

Hi Matt,

 

  Sorry to hear that you faced issues while instrumenting .Net Standalone application. Genarally when you configure .Net standalone app for configuration at config.xml, you will need recycle Agent Coordinator Service ( @ services.msc) and then the app in question and the App Agent should register.

 

Consider that you have tier/node showing up at the Controller UI, you can use following mecahinsm to define Custom Match Rules as well.

 

The following guide explains how AppDynamics detects Business Transactions and what you can do if AppDynamics doesn't recognize your application's Business Transactions out of the box.

 

How does AppDynamics detect new Business Transactions?

 

AppDynamics detects new Business Transactions by recognizing a particular set of "entry" methods in the callstack of the executing application. When one of these methods is hit, a new Business Transaction starts and all methods executing downstream of this method are instrumented.

 

No Business Transactions were detected in my application, now what?

 

In cases where no recognized Business Transaction entry methods are hit, we can enable the agent node property named find-entry-points to find some. With find-entry-points enabled, AppDynamics will log a callstack to the BusinessTransaction.log each time a recognized outgoing call is made. For example, any HTTP/ASMX/WCF/Remoting service, DB, or MQ call. You can find the BusinessTransactions.log in the agent logs folder.

 

We can then review these callstacks to determine which method will make a suitable "entry" point to begin a Business Transaction.

 

Callstack example shows what code is running in the application

 

The following callstack is an example of what we might find in the BusinessTransactions.log after enabling find-entry-points. It should be read from the bottom up. That is, methods furthest down executed first. Look for callstacks following Thread Empty_Name >> which means they are not part of any existing BT.

 

... BusinessTransactions Logging request stack for Thread Empty_Name >>
AppDynamics.Agent.ManagedAPI.ps.kk
AppDynamics.Agent.Interceptors.ww.jv
AppDynamics.Agent.MethodExecutionEnv.MethodBegin
System.Data.SqlClient.ExecuteReader() <---AppDynamics recognized this as an exit and logged the callstack.
MyCompany.MyClass.DataAccess.FindCustomerData()MyCompany.MyClass.BusinessLogic.TransformCustomerData()
MyCompany.MyClass.UI.btnFindCustomerData_OnClick()System.Windows.Forms.Button.OnClick()
System.Windows.Form.ButtonBase.WindProc(...)
System.Windows.Forms.NativeWindow.Callback(...)

 

We can see that this is a Windows Forms application where a particular button was clicked to find customer data. Once that button was clicked, an outgoing database call was made which AppDynamics recognized. From this point, AppDynaimcs code was executed to log the callstack to the BusinessTransaction.log file.

 

Which application method would make a good Business Transaction entry point?

 

Remember, methods executed first are at the bottom of the callstack. Looking at methods that executed before the database call, we can see that MyCompany.MyClass.UI.btnFindCustomerData_OnClick() is custom developed code that would make a suitable starting point for this unique Business Transaction to begin. All methods which execute after this method are also tracked as part of this Business Transaction. If we use a method that executed before this one, for instance System.Windows.Forms.Button.OnClick(), every application button click would be tracked as part of the same business transaction, which is not ideal for troubleshooting. We want to make sure separate code paths are tracked as separate Business Transactions.

 

OK I've found a suitable Business Transaction entry point method, now what?

 

Once we've found a suitable BT entry point, we can configure a .NET Class/Method Custom Match Rule to let AppDynamics know that this method marks the start of a new Business Transaction. Once you've created the Custom Match Rule, you'll need to wait a minute or two for the rule to be brought down to the agent, then restart the application for the change to go into effect. Once in effect, you should see your Business Transaction show up in the controller.

 

 

Your inputs and feedback is always welcome so please have them coming

 

Thanks,
Raunak

 



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.