Newly installed plugin doesn't seem to be loading the DB

This forums is to discuss issues and features of the Linux update Manager plugin for LabTech RMM
Post Reply
senatorsmiles
Posts: 2
Joined: Thu Feb 23, 2023 4:20 pm
1

Newly installed plugin doesn't seem to be loading the DB

Post by senatorsmiles »

Hello!

I followed the instructions located here to install the linux patching plugin in Automate.

https://www.plugins4automate.com/pages/ ... to-labtech

However, upon reloading DBA plugins, I never get check marks in "DB Loaded" or in "IIS Loaded".

The plugin config screens in automate just throw errors that say "Error loading Packages - Object reference not set to an instance of an object"

What have I missed, or how can I begin investigating the issue?

Thanks!
Attachments
Capture.JPG
Capture.JPG (48.48 KiB) Viewed 1813 times
Capture1.JPG
Capture1.JPG (28.54 KiB) Viewed 1813 times
Capture2.JPG
Capture2.JPG (15.74 KiB) Viewed 1815 times

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Newly installed plugin doesn't seem to be loading the DB

Post by Cubert »

You should do 2 things after any plugin install


Restart the DBagent and log out and back into the control center.


After doing thing are you still having issues?

senatorsmiles
Posts: 2
Joined: Thu Feb 23, 2023 4:20 pm
1

Re: Newly installed plugin doesn't seem to be loading the DB

Post by senatorsmiles »

Hey, I was able to resolve the DB loading issue. I found that when I initiated a DB restart from the automate client, the client would report that the db was successfully restarted, but it was not, in fact, restarting. I logged onto the connectwise automate server and manually restarted the DB - that worked fine. I also remediated the cause of the db restart issue.

We are now facing another issue though, whereby after updating a server the LUM maintenance script fails to run, and the reboot update status is not updated after a kernel update. Here are some of the logs from the failed scripts:

-----------

The Script(5997) failed in the Then section at step 81. The reason: SQL Execute failed processing query

Script: S5997 - Starting at Server Time: Wednesday, March 1, 2023 10:15:02 AM
Script step logging has been disabled. Please set @ScriptEngineEnableLogger@ = True in your script to enable function logging.
Script logging has been enabled.
L4 F172 SqlStatement (P1): 'SELECT count(*) as Install FROM extrafielddata WHERE ExtraFieldID IN (SELECT ID FROM extra...' T: 0.8859827
L5 F20 SetType(P1):1 Parameter(P2):0 VariableName(P3):NOINSTALLS T: 0.8859827
L6 F70 Value (P1): MANUALINSTALL Comparer (P2): 0 To (P3): Jump (P4): 1 T: 0.8859827
L8 F70 Value (P1): MYPACKAGE Comparer (P2): 2 To (P3): ALL Jump (P4): :UPGRADEALL T: 0.8859827
L9 F70 Value (P1): MYPACKAGE Comparer (P2): 0 To (P3): Jump (P4): :UPGRADEPKG T: 0.8859827
L10 F70 Value (P1): MYYUMPACKAGE Comparer (P2): 2 To (P3): ALL Jump (P4): :UPGRADEALLYUM T: 0.8859827
L61 F139 Note (P1): :UPGRADEALLYUM T: 0.8859827
L62 F109 Delimiter (P2): Variable (P3): MYUPDATE T: 0.8859827
L63 F29 Message (P1): '[ Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
...' T: 89.3445562
L64 F129 Jump (P1): :STARTYUMSCAN T: 89.3914358
L69 F139 Note (P1): :STARTYUMSCAN T: 89.3914358
L70 F139 Note (P1): 'After all updates and cache refreshes lets check our packages again and update the databas...' T: 89.3914358
L71 F109 Delimiter (P2): Variable (P3): Packages T: 89.3914358
L72 F70 Value (P1): Packages Comparer (P2): 8 To (P3): syntax error Jump (P4): :RERUNYUMSCAN T: 101.4423495
L73 F139 Note (P1): :ContinueYumScan T: 101.4423495
L74 F70 Value (P1): shellresult Comparer (P2): 2 To (P3): OK Jump (P4): :NOYUMUPDATES T: 101.4423495
L75 F70 Value (P1): shellresult Comparer (P2): 2 To (P3): Jump (P4): :NOYUMUPDATES T: 101.4434077
L76 F171 ValueOne (P1): 8 Operator (P2): 'Existing lock /var/run/yum.pid...' ValueTwo (P3): , Variable (P4): T: 101.4434077
L77 F171 ValueOne (P1): 0 Operator (P2): 'Existing lock /var/run/yum.pid...' ValueTwo (P3): 289 Variable (P4): 0 T: 101.4434077
L78 F171 ValueOne (P1): 9 Operator (P2): 'Existing lock /var/run/yum.pid...' ValueTwo (P3): ' Variable (P4): || T: 101.4434077
L79 F20 SetType(P1):1 Parameter(P2):'DELETE FROM plugin_p4l_lum_pac...' VariableName(P3):SQLCMD1 T: 101.4434077
L80 F29 Message (P1): 'Yum SQL [DELETE FROM plugin_p4l_lum_packages WHERE ComputerID = 425 ;INSERT IGNORE INTO pl...' T: 101.4434077
L81 F67 Sql (P1): 'DELETE FROM plugin_p4l_lum_packages WHERE ComputerID = 425 ;INSERT IGNORE INTO plugin_p4l_...' T: 101.4434077

---------------

The Script(5997) failed in the Else section at step 57. The reason: Script String Manipulation Failed

Script: S5997 - Starting at Server Time: Wednesday, March 1, 2023 10:24:01 AM
Script step logging has been disabled. Please set @ScriptEngineEnableLogger@ = True in your script to enable function logging.
Script logging has been enabled.
L4 F109 Delimiter (P2): Variable (P3): IAMDEB T: 1.0750934
L5 F70 Value (P1): IAMDEB Comparer (P2): 8 To (P3): Upgrade Jump (P4): :RUNAPTGETSCAN T: 5.1069475
L6 F109 Delimiter (P2): Variable (P3): IAMRH T: 5.1069475
L7 F70 Value (P1): IAMRH Comparer (P2): 8 To (P3): List of Commands Jump (P4): :RUNYUMSCAN T: 11.1304524
L50 F139 Note (P1): :RUNYUMSCAN T: 11.1304524
L51 F109 Delimiter (P2): Variable (P3): Packages T: 11.1304524
L52 F70 Value (P1): Packages Comparer (P2): 8 To (P3): syntax error Jump (P4): :RERUNYUMSCAN T: 23.1848636
L53 F139 Note (P1): :ContinueYumScan T: 23.1848636
L54 F70 Value (P1): Packages Comparer (P2): 2 To (P3): OK Jump (P4): :NOYUMUPDATES T: 23.1848636
L55 F70 Value (P1): Packages Comparer (P2): 2 To (P3): Jump (P4): :NOYUMUPDATES T: 23.1848636
L56 F171 ValueOne (P1): 8 Operator (P2): 'https://cdn.redhat.com/content...' ValueTwo (P3): , Variable (P4): T: 23.1848636
L57 F171 ValueOne (P1): 0 Operator (P2): 'https://cdn.redhat.com/content...' ValueTwo (P3): -1 Variable (P4): 0 T: 23.1848636

----------------

Curious to know your thoughts about the failed scripts above. I can provide addt'l examples if needed, but they all mostly look like the second failure listed above.

We also have agents installed on 4 linux servers (2x redhat, 1x centos 7.5, 1x centos 8) - the centos8 box is not identified as a linux machine by the plugin. Is there a way I can remediate that?

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Newly installed plugin doesn't seem to be loading the DB

Post by Cubert »

L78 F171 ValueOne (P1): 9 Operator (P2): 'Existing lock /var/run/yum.pid...' ValueTwo (P3): ' Variable (P4): || T:
Looks like your getting some junk back so when it try's to save junk it fails.

If you can run the script in debug mode on an agent and allow it to fail. I could look at the values of all the created variables created during script run to see what was being returned.

Could be an lock on a file or some path issue. (or any number of issues)

As for the missing Linux. It may be mismarked in the database or offline.

When you select to scan for agents the plugin makes the following query

Code: Select all

Select ComputerID FROM computers WHERE LastContact > date_add(now(),interval -5 minute) and OS LIKE '%linux%'
In this query we test for last check in time in last 5 minutes and has linux in the OS field of the computers table.

If the query does pickup the missing agent then the next issue is that script failed to execute on agent so we never got told of its existence. To test this, select the scan button and at same time watch for a script to be scheduled on agent in question.

Follow script logs and commands to see what's going on during requests

Post Reply

Return to “Linux Update Manager”