rmaloleyii

nimbus.login() causes script to crash

Discussion created by rmaloleyii on Jan 17, 2011
Latest reply on Jan 20, 2011 by rmaloleyii

Hello,

 

I've spent the better part of 3 weeks diagnosing various issues with a large script that I wrote. The purpose of the script is to cycle through a list of servers and use dirscan to check the file integrity of the system files. I have a script that does exactly what I need, however it never completes. Using the NSA SDK tool I finally got the output which ended up being an "out of memory issue" -- so I've been working on a way to simplify the script. As such I've been redesigning the script and testing it as I go. 

 

Right now I have a very simple script that does the following:

 

1. Creates a LUA table with a list of servers from a MySQL database.

2. Begins a loop through the LUA table.

3. Checks for the existence of the server (from the LUA table) in the Nimbus Information Store database (table CM_COMPUTER_SYSTEM).

4. Prints out various information for each server so that I can watch what the script does.

 

Because the script is currently running from the NSA tool I am unable to access the dirscan and controller probes without authenticating to NimBUS. As such I have added the following code to the very beginning of my script (not in the FOR loop):

 

 

-- Log in to NimBUS nimbusLoginResult,nimbusLoginSID = nimbus.login("username","password") if not nimbusLoginResult then      print("################################################################################")      print("                                DEBUGGING                                       ")      print("--------------------------------------------------------------------------------")      print("NIMBUS LOGIN NOT SUCCESSFUL! THIS ERROR WILL BE REPORTED.")      print("--------------------------------------------------------------------------------")      print("################################################################################")      -- Email Richard...            -- Exit the script, no reason to keep going.      exit(1) else      print("################################################################################")      print("                                DEBUGGING                                       ")      print("--------------------------------------------------------------------------------")      print("NIMBUS LOGIN SUCCESSFUL!")      print("nimbusLoginResult: ",nimbusLoginResult)      print("SID: ",nimbusLoginSID)      print("--------------------------------------------------------------------------------")      print("################################################################################") end

 

 

When this code is active then my script will crash without any error. I've set the loglevel (-d 5) to 5 and I do not receive any information that specifies why it crashes... the script/NSA just exits without an error. I know that the username/password combination that I'm using is valid -- if I execute the above code in a separate script then it works flawlessly. No matter where I place this code in my script it will crash without an error message. Additionally, the script will loop through approximately 8 times and then it will crash. Based on the log it begins to work on the 9th loop when it crashes.

 

I don't believe that this code will be required when I run the script from the NAS (scheduled script) but I need to be able to run the script separately to ensure that it works.

 

Has anyone encountered a similar issue? 

 

NSA version 2.01

 

Thanks,

Richard

Outcomes