This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

NCM 7.7 Cirrus.Nodes AddNodeToNCM Error

Having trouble adding a Node to NCM with Python 3.8. I'm able to add a new node and add it to pollers via the API. I get an error when I add it to NCM using invoke on Cirrus.Nodes. AddNodeToNCM. I'm on OrionPlatform 2017.3.5 SP5, NPM 12.2 NCM 7.7

Based on the below post, it looks like I'm following the correct process.
https://thwack.solarwinds.com/t5/Orion-SDK-Discussions/Add-node-or-something-to-NCM-NPM/m-p/262271 
1) Create on Orion.Nodes (Works)
2) Create on Orion.Pollers (Works)
3) Invoke on Cirrus.Nodes. AddNodeToNCM (fails)

Below Code is from IDE Testing

C:\Windows>python
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> from orionsdk import SwisClient
>>>
>>> npm_server = 'solarwinds.local'
>>> username = 'username'
>>> password = 'password'
>>> swis = SwisClient(npm_server, username, password)
>>> requests.packages.urllib3.disable_warnings()
>>>
>>> nodeIp = '10.109.139.1'
>>> nodeLookup = swis.query('SELECT NodeID, DisplayName FROM Orion.Nodes where IPAddress=@IPAddress', IPAddress=nodeIp)
>>> nodeLookup
{'results': [{'NodeID': 13107, 'DisplayName': '1003333'}]}
>>> nodeId = nodeLookup['results'][0]['NodeID']
>>> nodeId
13107
>>>
>>> ip_check = swis.query('SELECT NodeID FROM Cirrus.Nodes WHERE AgentIP=@ip_address', ip_address=nodeIp)
>>> ip_check
{'results': []}
>>>
>>> nodeNcm = swis.invoke('Cirrus.Nodes', 'AddNodeToNCM', nodeId)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\user\AppData\Roaming\Python\Python38\site-packages\orionsdk\swisclient.py", line 29, in invoke
return self._req(
File "C:\Users\user\AppData\Roaming\Python\Python38\site-packages\orionsdk\swisclient.py", line 63, in _req
resp.raise_for_status()
File "C:\Users\user\AppData\Roaming\Python\Python38\site-packages\requests\models.py", line 941, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: There was no endpoint listening at net.pipe://localhost/orion/ncm/businesslayer that could
accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. for url:
solarwinds.local:17778/.../AddNodeToNC...
>>>

  • Hi

    I have the same problem. Have you solved this issue ?

    Thanks

  • I know this is rather old, but I ended up here looking for something else. It seems the NodeID that verb is looking for is a type GUID, and you are pulling the int32 version of it. Cirrus.Nodes has the GUID as NodeID and the Int32 as CoreNodeID. I can't tell for sure from your code but it looks like you need to pull the GUID NodeID from Cirrus.Nodes in your nodeid function instead and feed that to the nodeNcm function with the AddNodeToNCM verb in it.

    **Edit: Nope, NM, that's dumb. There is no GUID until it's been added to NCM. Checked the doco and it is looking for CoreNodeID and will return the GUID when it's complete. I see no reason your script shouldn't be working. The Traceback in your output looks like it might have been having trouble reaching the server for some reason.