Quote from: johnnyva on March 14, 2023, 06:21:08 AMHey jp,
I was thinking that maybe node was null, but then I think that would give a different error.
What comes back if you print classof(node)? I'm expecting it to be Node, but maybe its actually coming back as something else and not returning a node like the docs say.
What server version are you running?
Okay so after doing a classof(node) call its coming back with "Error 14 in line 8: Function or operation argument is not an object".
With this now known, I've run typeof(node) and its saying its a String.
Printing this string actually prints "Node@0x7f92ac7b6170".
Based on the documentation here: https://www.netxms.org/documentation/nxsl-latest/#_objects it states
Code Select
FindNodeByIPAddress(ipaddress, currentNode) => Node
Return
Instance of Node object or null if not found or not accessible
So it seems its trying to return a node object but is instead doing an internal call to a toString() method before returning it.
I'm just going based on my knowledge of Java since that "Node@0x7f92ac7b6170" matches what I'm assuming exactly.
Edit:
I'm running the follow:
Server version: 4.3.2 (build 4.3-374-g4f45f9ba5c)
Java version: 11.0.10
JVM: OpenJDK 64-Bit Server VM 11.0.10+9
I've seen rare issues occur when running later versions of OpenJDK but documentation says the latest minimal version is 11 so I should be alright.
edit 2:
I've tested each of the find functions and they are all returning the same string representation.
To clarify, trusted node checks are disabled (by default) so the 2nd parameter is optional based on documentation.