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

6.5 Appmon REST startrecording - what am I doing wrong?

don_bonin
Advisor

Any help on this would be greatly appreciated!

- Continuous session recording is OFF

- 6.5 APMON client is on the local machine and working normally - other GET rest requests respond normally.

Here is an example of my POST request (server name has been masked):

POST http://localhost:8030/rest/management/profiles/PERF-CPM/startrecording?server=servername&sessionname... HTTP/1.1

User-Agent: Fiddler

Host: localhost:8030

Content-Length: 0

Content-Type: application/xml

--------------------------------- response below------------

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 </title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /rest/management/profiles/PERF-CPM/startrecording. Reason:
<pre> Request failed.</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>

8 REPLIES 8

peter_karlhuber
Dynatrace Pro
Dynatrace Pro

Hi Don, there should be a log entry in the Server.0.0.log regarding this error, please post it here. Thanks, br, Peter

Or in the FRontendserver.0.0.log

don_bonin
Advisor

this is what I see in the logs:

2017-05-03 11:16:59 WARNING [HttpChannel] /rest/management/profiles/PERF-CPM/startrecording?server=<server>&sessionname=CPM_Web&appendtimestamp=true: org.eclipse.jetty.util.log.JavaUtilLog warn:71
javax.servlet.ServletException: javax.servlet.ServletException: java.lang.IllegalStateException: The @FormParam is utilized when the content type of the request entity is not application/x-www-form-urlencoded

Hi Don, please try setting the Content-Type of the request (in fiddler) to "application/x-www-form-urlencoded", maybe one of our components is now stricter than it used to be. Technically, your request is a form and a size 0 xml is illegal so I would try that.

andreas_grabner
Dynatrace Leader
Dynatrace Leader

Hi Don

Instead of using the Dynatrace AppMon Client REST INterface on port 8030 - have you looked into using the Server Side REST APIs? Here is the doc page: https://community.dynatrace.com/community/pages/vi...

Andi

I tried the server side REST and didn't get any further. For the client side REST I could do some things like GET http://localhost:8030/rest/management/profiles and GET http://localhost:8030/rest/management/version with no issues, but the POST requests to start recording failed every time. I tried everything I came across, like base64 encoding the Authorization: Basic header field for https, making sure the user had REST access to the system profile...

I'm trying this manually because the Silkperformer plugin stopped working with the 6.5 release and I wanted to verify if it was the plug or if something was broken in the client side REST api.

I was told that there were no changes in the server side REST interfaces in the 6.5 release...

I'm at a loss to figure this one out! 🙂

don_bonin
Advisor

The missing header, which is no where in the DOCs for the rest interface, was the problem. After adding Content-Type: application/x-www-form-urlencoded I was able to use the client side REST to start/stop session recording. Thanks Peter K.!

Thanks for confirming that this was the issue. I forwarded this to the doc team