I'm getting an error 500 when using a web api from BMC Client Management (BCM). 1- This is what I can see in the BCM logs: 2019/06/28 14:58:29 AgentActionDB I [23124] Invoke action SysTray_SetAndDisplayIcon on remote host '' for user '', (tunnel 'PROXY_1')
2019/06/28 14:58:29 AgentActionDB I [23124] Invoke local service POST '/api/1/cmdb/import' 2019/06/28 14:58:29 WebApi I [23124] Rejecting request to /api/1/cmdb/import from 192.168.9.9 2019/06/28 14:58:29 AgentActionDB I [23124] Service POST '/api/1/cmdb/import' returned 2 2019/06/28 14:58:29 Server D [23124] JSON Service: /api/1/cmdb/import The same from the Pentaho fro RemedyForce logs: 2019/06/27 18:38:40 - Submit Request For File Creation.0 - Adding HTTP body value [{ "lastImportTime" : 0, "view":"Atrium_CMDB_ComputerSystem"}]
2019/06/27 18:38:40 - Submit Request For File Creation.0 - Response time (milliseconds): [96] for [https://MyBCMMaster:1616/api/1/cmdb/import?language=English&offset=0&count=0&externalLogin=MyBCMAdmin] 2019/06/27 18:38:40 - Submit Request For File Creation.0 - The response code is 404 2019/06/27 18:38:40 - Json Input.0 - The field [result] contain [{"fault":{"code":-500,"string":"no service at \/api\/1\/cmdb\/import"}}] 2- Or this from the BCM logs: 2019/06/28 13:29:26 AgentActionDB I [6668] Action UserAccessCheckLogin returned 0 2019/06/28 13:29:26 HttpProtocolHandler D [6668] Invalid login/password supplied |
This error code can mean that there is an issue with the user you are using to trigger the web api. Case 1 from above: The user doesn't have enough rights in BCM - setup a super administrator or use an existing one in the BCM console and give him full rights on all objects in its security profile: - tab capabilities > check all
- tab Static > add all the main nodes - tab dynamic > add all the queries that start by "All" or the equivalent in your language for "All" and give it full access for every object - try again
Notes:- it is advised to set the admin rights a described above to the existing super administrators admin group in the console instead of setting the rights to the administrator as it will be easier to maintain later on - in french you will have to select "Tou" for "All" because some out of the box queries start by "Tous" and the other ones start by "Toutes" - you can also use the account "admin" (in this case no rights have to be set up, it has a full power) Case 2 from above: You haven't authenticated - follow the steps in Case 1 above if you havn't already - then if: A - You are using http(s)://_YOUR_MASTER_HOSTNAME_:_YOUR_AGENT_OR_WEB_API_PORT_/wsdoc to perform tests, you must login as a super admin, at the top of the page:
- to help you make sure the password has been taken into account, click on "device" in the section "Summary of API Documentation" to unfold the snippet
- set your admin in the field "User:" - set his password in the field "Password:" - while style active in the field, type Enter - the snippet "device" below should reload, if it does you'll know the admin is logged in B- You are using a third party tool
- edit your code so it can authenticate before running the command (you will most likely have to use a token for that) - try again
|