Interpreting HTTP status codes and NSM error codes

If an NSM client user runs an invalid command that results in an error, an HTTP status code and NSM error code are returned. The HTTP status code includes information about whether a request is received by the NSM server. The NSM error codes give an indication on why NSM failed the request.

Format of error responses from URI requests

If a URI request causes an error, the HTTP status code and NSM error code returned are in this format:
Response code: 404
Response message: NSM-ERR-XX
where XX is the NSM error code. For example, if NSM cannot find the requested device ID, the NSM client user sees the following:
Response code: 404
Response message: NSM-ERR-1
where the NSM error code of 1 means that a device was not found.

Table 1 lists all of the NSM error codes and their meaning.

Format of error responses from the CLI

If the error occurs when the user is using the command-line tool, the HTTP status code and message returned are in this format:
An error occurred in request processing, a HTTP Status Code of [404] with a Message 
of [Not Found] was received. 
See the Intelliden.log for details. 

The user should then look at the Intelliden.log to find more information about the error that occurred, including the NSM error code. The default path for the Intelliden.log file is /opt/IBM/tivoli/netcool/ncm/logs.

The HTTP status code can be one of the following responses:
HttpStatus.NOT_FOUND 404
HttpStatus.FORBIDDEN 403
HttpStatus.UNAUTHORIZED 401
HttpStatus.BAD_REQUEST 400

For the example where the NSM service template ID is not found, the Intelliden.log may show:

2012/10/24,12:41:10.250,com.ibm.tivoli.itncm.logging.ItncmLogger,THR:246,ERROR, 
NotFoundException - NSM Error Code: 3 SERVICETEMPLATE_NOT_FOUND
com.ibm.tivoli.nsm.web.exceptions.NotFoundException: Unable to find Service Template with ID :[101]

Table 1 lists all of the NSM error codes and their meaning.

Table 1. NSM error codes and descriptions
NSM error code NSM error code meanings

1

The Device was not found. This error can occur when the deviceid is missing from the XML when submitting new services. This error can also occur when the NSM client user is using the NSM REST device URIs and they do not have permission to view the deviceid or the deviceid does not exist on the NCM system.

2

The Realm does not exist. This error can occur when a Realm ID is supplied to the realm NSM REST URI that does not exist on the NCM system.

3

The Service template was not found. This error can occur if no matching implementation was found in an existing NSM service template based on the VTMOS of the device supplied and the regular expression DeviceType rules specified within the Implementations. This error can also occur if the NSM service template id supplied does not exist on the NCM system.

This error can occur when the NSM service designer is using the command-line tool on NSM service templates. This error can also occur when the NSM client user is using the NSM REST NSM service template URIs or submitting new services.

4

The inject method to call was not specified. This error can occur where a NSM service template has been created with Inject Parameters that have arguments defined but with no JavaScript Method to call.

5

An Error occurred while executing the inject parameter. This error can occur during service execution while processing Inject parameters.

6

Inject parameter has been configured incorrectly. This error can occur where a NSM service template has been created with Inject Parameters that are missing either Code or arguments.

7

This error can occur at NSM startup when the Work Manager has not been initialized correctly.

8

An Error occurred while the JavaScript Engine is executing the JavaScript associated with the inject parameter.

9

An Error occurred when marshalling a NSM service template to XML while Importing during service execution.

10

An SQL parameter has been configured incorrectly in a NSM service template; it has no parameters.

11

An Error occurred with security (encryption) of a database password within a NSM service template.

12

The SQL query to execute was omitted in a SQL parameter defined within a NSM service template.

13

An SQL parameter has been configured incorrectly in a NSM service template; it has no SQL Query and no parameters defined.

14

The HTTP URL was omitted in the HTTP parameter defined within a NSM service template.

15

During service execution a parameter argument was not found.

16

During service execution a parameter argument was calculated but produced an empty value.

17

An error occurred on the NSM system when performing a GET for an HTTP parameter.

18

An error occurred on the destination server when performing a GET for an HTTP parameter.

19

A general HTTP error occurred when performing a GET for an HTTP parameter.

20

An error occurred due to bad SQL grammar in an SQL query of an SQL parameter within a NSM service template.

21

Failed to connect to database for an SQL parameter within a NSM service template.

22

It is not valid to have one parameter that requires an argument which is another parameter that requires the first parameter as an argument. This is an example of an infinite loop and, therefore, the parameters cannot be calculated.

23

An error occurred when evaluating a parameter within a NSM service template.

24

The service instance was not found on the NCM system.

Note: The service instance may have been deleted by the scheduler based on the timeToDelete attribute used in the NSM service template to create the service instance.

25

The work item was not found on the NCM system.

26

More than one device was found to match the device name provided.

27

An error occurred as the entity to be persisted already exists.

28

The supplied constant parameter (<constantParameter>), client parameter (<clientParameter>), or client parameter list (<clientParameterList>) has no value.

29

The operation type specified in the NSM service template is invalid.

30

The operation's (<operation>) parameter was not found in either the global or local parameters for this NSM service template.

31

A duplicate rule was found in the NSM service template.

32

A NSM service template was defined without a rule of type DeviceType (<rule type="DeviceType">).

33

An invalid device search direction was used when searching for devices using the NSM REST API device URIs.

34

An invalid device search action was used when searching for devices using the NSM REST API device URIs.

35

An error occurred during service execution when trying to create a service UOW on the NCM system.

36

An invalid date format was supplied to a command-line tool. Use date format YYYY-MM-DD.

37

An NSM internal error occurred. Monitor the Initelliden.log for more information.

38

The operation order attribute (for example, <operation order="1">) defined within a NSM service template cannot contain a negative value.

39

The supplied XML failed validation against the NSM XML schema definition.

40

The NSM REST API URI HTTP request was not valid.

41

The service instance cannot be deleted as the service status is not SUCCESS.

42

The service instance does not exist on the NCM System.

43

There was no service operation found in the NSM service template during service execution.

44

The NSM service template contains a timeToDelete attribute (for example, <serviceTemplate timeToDelete="5">), but the service instance failed to be scheduled for deletion.

45

The NSM service template cannot be deleted as it is referenced as an applied NSM service template in an existing service instance.

46

The received values for a client parameter list's order attribute (for example, <value order="1">) has not be populated correctly.

47

The received values for a client parameter list (<clientParameterList>) has a mismatch in the number of values received for its constituent parameters.

48

Duplicate parameter names have been found in the NSM service template.

49

Neither a timeToDelete attribute (for example, <serviceTemplate name="FirewallCreateZones" timeToDelete="5">) or service operation of type DELETE (for example, <serviceOperation name="deleteOperation" type="DELETE">) was found. One service delete mechanism has to be supplied.

50

A timeToDelete attribute (for example, <serviceTemplate timeToDelete="5">) and a service operation of type DELETE (for example, <serviceOperation name="deleteOperation" type="DELETE">) was found in a NSM service template. One service delete mechanism has to be supplied.

51

The service reference ID supplied in an NSM REST URI request (for example, POST http://www.example.com:16310/nsm/service/{"Doc56789}) already exists on the system.

52

An invalid NSM service template rule was found.

53

An SQL parameter is referenced in a service execution, but a required database connection has not been found.

54

An invalid ruleProperty (for example, <ruleProperty name="VENOR" value="Cisco"/> ) has been found in the NSM service template.

55

No manual updates to auto generated NSM service templates are allowed.

56 General Validation error. The accompanying message provides more detailed information.
57 A value for an optional element has been provided, but that value was empty.
58 Invalid Service operation type was found.
59 Invalid operation rollback type was found
60 The service template was incorrectly configured for service deletion. The accompanying message provides more detailed information.
61 A service template id is required.
62 A service template name is required.
63 A device id is required for the service template.
64 A request was made to remove a service entry using the CLI but the requested service was not in a valid state for removal.