I thought it was odd, as well. Below is a snippet of code that I'm using, followed by the output (with IP address changed). You can see that, somehow, it's printing information about the connection.
debug-nsa.lua
-------------------
print("login attempt")
local login = nimbus.login("user","password")
if login == false then
print("error - login failed, exiting.")
return
else
print("connected to nimbus")
end
output debug-nsa.lua
----------------------------
PS C:\Program Files (x86)\Nimsoft\sdk\nsa\nsa.exe> .\nsa.exe .\debug-cdm.lua
login attempt
Aug 20 08:28:53:428 nsa: nimLogin request login failed 10.0.1.1/48000 (error)
error - login failed, exiting.
Original Message:
Sent: 08-20-2019 12:17 AM
From: Garin Walsh
Subject: Using NIS db provider with NSA
The Lua implementation, as I understand it, will try to find the information about the Nimbus environment without guidance. Simplistically speaking, it communicates with the robot running on the same server you are running nsa on. That should be sufficient to communicate with the UIM message bus authentication. I have been told that it is not possible to duplicate the process IM uses to log into a specific target hub.
So, I'll ask the question - how do you know the nimbus.login is using an IP address on another subnet? I don't recall there being any useful feedback from that function call beyond a return code.
Have you made sure that the server you are trying to run nsa on has a valid running robot on it?
Original Message:
Sent: 08-19-2019 07:37 PM
From: Emery Clark
Subject: Using NIS db provider with NSA
Thanks for that tip.
unfortunately I can't execute a nimbus.login(user, pass) because our HUB IP and DOMAIN must be specified. the login is defaulting to an IP address on another subnet.
When I login to UIM, I specify a HUB IP and DOMAIN. without this information I cannot login.
The same needs to be done from my script. How can I specify the HUB IP and DOMAIN to use for the nimbus.login(user,pass) function?
Original Message:
Sent: 08-19-2019 01:39 PM
From: Garin Walsh
Subject: Using NIS db provider with NSA
If you're using the nsa you need to explicitly execute the nimbus.login () call. nas does this for you automatically.
I usually include at the beginning of my scripts something like:
local gethubs = nimbus.request("hub","gethubs")
if gethubs == nil then
nimbus.login("username","passsword")
end
-Garin
Original Message:
Sent: 08-19-2019 11:58 AM
From: Emery Clark
Subject: Using NIS db provider with NSA
Hi,
I'm getting connection timeout errors when executing lua scripts from within the NAS probe, so I have resorted to using the NSA.exe binary to run my lua scripts.
However, I'm having trouble re-using the connection string in my lua script, and can't open a connection to my database.
My question is, am I able to use the NIS provider with the NSA binary, and if so, are there any pre-requisites?
For example:
local cs = "provider=nis;database=nis;driver=none"