Highlighted
sohcahtoa822 Absent Member.
Absent Member.
5915 views

500 Internal Server Error when trying to use WebInspect's remote API

Whenever I try to start a scan using WebInspect, I get a 500 Internal Server Error response.  The data being sent is:

POST /webinspect/scanner HTTP/1.1

Host: webinspect Accept: */*

Content-Length: 174

Connection: close

Content-Type: application/x-www-form-urlencoded

settingsName=ScanTemplateAudit&overrides={"ScanName":"SSL Checks (192.168.1.100)","StartUrl":"https://192.168.1.100/","PolicyId":"10002","AllowedHosts":["192.168.1.100:443"]}

I looked in the Event Viewer on the webinspect host and I see these logging events:

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.Controllers ScannerController ExecuteAsync

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.Action ApiControllerActionSelector SelectAction

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.Controllers DefaultHttpControllerActivator Create HP.WebInspect.RemoteControl.Scanner.ScannerController

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.Controllers HttpControllerDescriptor CreateController HP.WebInspect.RemoteControl.Scanner.ScannerController

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.Action ApiControllerActionSelector SelectAction Selected action 'StartScan(CreateScan data)'

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.ModelBinding FormatterParameterBinding ExecuteBindingAsync Parameter 'data' bound to the value 'HP.WebInspect.RemoteControl.Scanner.CreateScan'

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.ModelBinding HttpActionBinding ExecuteBindingAsync Model state is valid. Values: data=HP.WebInspect.RemoteControl.Scanner.CreateScan

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.ModelBinding HttpActionBinding ExecuteBindingAsync

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.ModelBinding FormatterParameterBinding ExecuteBindingAsync Binding parameter 'data'

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.MessageHandlers CompressionDelegateHandler SendAsync

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.MessageHandlers li SendAsync

[9/18/2015 10:07:41 AM][Debug] Request: POST http://webinspect/webinspect/scanner

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.Request http://webinspect/webinspect/scanner

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.MessageHandlers CorsMessageHandler SendAsync

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.Controllers HttpControllerDescriptor CreateController

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.Controllers DefaultHttpControllerActivator Create

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.Controllers DefaultHttpControllerSelector SelectController Route='controller:scanner'

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.Controllers DefaultHttpControllerSelector SelectController Scanner

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.Action ApiControllerActionInvoker InvokeActionAsync Action='StartScan(data=HP.WebInspect.RemoteControl.Scanner.CreateScan)'

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.MessageHandlers CompressionDelegateHandler SendAsync

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.Request Content-type='application/json; charset=utf-8', content-length=unknown

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.MessageHandlers CorsMessageHandler SendAsync

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.MessageHandlers li SendAsync

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Net.Http.Formatting JsonMediaTypeFormatter WriteToStreamAsync Value='System.Web.Http.HttpError', type='HttpError', content-type='application/json; charset=utf-8'

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.Controllers ScannerController Dispose

[9/18/2015 10:07:41 AM][Debug] Response: 500 Internal Server Error

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Net.Http.Formatting JsonMediaTypeFormatter WriteToStreamAsync

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.Controllers ScannerController Dispose

[9/18/2015 10:07:41 AM][Debug] Error POST http://webinspect/webinspect/scanner System.Web.Http.Action ReflectedHttpActionDescriptor ExecuteAsync Product is not licensed.

[9/18/2015 10:07:41 AM][Debug] Error POST http://webinspect/webinspect/scanner System.Web.Http.Action ApiControllerActionInvoker InvokeActionAsync Product is not licensed.

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Web.Http.Action ReflectedHttpActionDescriptor ExecuteAsync Invoking action 'StartScan(data=HP.WebInspect.RemoteControl.Scanner.CreateScan)'

[9/18/2015 10:07:41 AM][Debug] Creating scan: 1750a226-fabc-4ed2-a036-3822e3bf0872

[9/18/2015 10:07:41 AM][Debug] Error POST http://webinspect/webinspect/scanner System.Web.Http.Controllers ScannerController ExecuteAsync Product is not licensed.

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Net.Http.Formatting JsonMediaTypeFormatter GetPerRequestFormatterInstance Will use same 'JsonMediaTypeFormatter' formatter

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Net.Http.Formatting DefaultContentNegotiator Negotiate Selected formatter='JsonMediaTypeFormatter', content-type='application/json; charset=utf-8'

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Net.Http.Formatting DefaultContentNegotiator Negotiate Type='HttpError', formatters=[JsonMediaTypeFormatterTracer, XmlMediaTypeFormatterTracer, FormUrlEncodedMediaTypeFormatterTracer, FormUrlEncodedMediaTypeFormatterTracer]

[9/18/2015 10:07:41 AM][Debug] Info POST http://webinspect/webinspect/scanner System.Net.Http.Formatting JsonMediaTypeFormatter GetPerRequestFormatterInstance Obtaining formatter of type 'JsonMediaTypeFormatter' for type='HttpError', mediaType='application/json; charset=utf-8'

Now, I noticed that a few of those events are saying "Product is not licensed", but that makes no sense.  My license is valid and I have no problems running scans with the normal GUI.  It is only when I try to use the remote API that I have any problems.

The ASCMonitor.exe process runs under the same user as the WebInspect.exe process.  The WIRCServer.exe process that gets started runs under the SYSTEM user, which I assumed was required for some of the permissions it needs.  I tried changing them to run as the same user as the WebInspect GUI, but that didn't change anything.

Why does the GUI work, but the remote API doesn't?

Labels (1)
0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

Re: 500 Internal Server Error when trying to use WebInspect's remote API

We partially covered this in the old, public WebInspect forums, but did not determine the correction needed.  I advised David to repost the issue here for a broader audience of specialists.   Please chime in if you have a solution!

++++++++++++++

Ref:  500 Internal Server Error when trying to use WebIn... - HP Enterprise Business Community

The ASCMonitor.exe process runs under the same user as the WebInspect.exe process.  The WIRCServer.exe process that gets started runs under the SYSTEM user, which I'm assuming is required for some of the permissions it needs.  Is this incorrect?

"CLEANER EXAMPLE 1:

curl -d "settingsName=Default&overrides={\"ScanName\":\"SS​L Checks (192.168.1.100)\",\"StartUrl\":
\"https://192.168.1.100​/\",\"PolicyId\":10002}" http://webinspectmachinename:8083/webinspect/scann​er"

This has the same result.  500 Internal Server Error, "Unlicensed" error in the event log.


-- Habeas Data
Micro Focus Fortify Customers-Only Forums – https://community.softwaregrp.com/t5/Fortify/ct-p/fortify
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: 500 Internal Server Error when trying to use WebInspect's remote API

Apparently this was a bug in WebInspect 10.40 and it had been corrected, yet reappeared in 10.50.  Fortify Support has a hot fix release of WebInspect 10.50, but you will need to contact them directly for it.

  • support.fortify.com

-- Habeas Data
Micro Focus Fortify Customers-Only Forums – https://community.softwaregrp.com/t5/Fortify/ct-p/fortify
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.