Jump to content
Seth

StorageCraft Plugin

Recommended Posts

So...feels like I'm never not working on this, but - we have the StorageCraft Plugin for CWA, and I just gotta ask:

Where is the plugin getting the information from, and how frequently does it gather the information?

We have several 'false positives', and I don't know where to begin 'updating' the information the plugin is working with.  For Instance - we have a client that is showing Replication Failures since 8/14/2019, per their BDR's ImageManager information.  Well, when I hop on that device, there are 0 Replication issues/errors/notifications/etc.  It shows the last replicated file has a date of 10/28/2019 (this morning, after shipping yesterday's Consolidated Daily off the replication destination.)

Share this post


Link to post
Share on other sites

UPDATE

Ok - so, there's a sqlite DB saved to "C:\ProgramData\LabTech\IMDB.db" on the devices where ImageManager is installed.  For the above-referenced client, I used DB Browser for SQLite, and discovered that there hasn't been a 'success' entry in the 'plugin_sc_im_replication_success' table since the above-mentioned date.

Still doesn't explain where the disconnect is, but at least why the plugin is showing the wrong data.

In that same folder is a 'Backup.IM.txt' file - logs.  Joy.  In this file, I've discovered the following error message:

Quote

Error in GetAllReplicationStatus while fetching replication jobs status from API: The remote server returned an error: (500) Internal Server Error

No clue what the RemoteServer is, so I've been Googling - but I can't find anything other than a SC Support question asked by someone else a week ago - and has no replies.  Will update further when/if I get any more information (in case other people have this problem)

Share this post


Link to post
Share on other sites

Hi Seth, Wes from StorageCraft here, I manage the Automate Plugin development.  The issue is most likely a problem with ImageManager.  In the C:\Program Files (x86)\StorageCraft\ImageManager\Logs\Rest.log you will probably see message like this one:

GetReplicationTargetRecentStatus: Specified cast is not valid.

StackTrace:   at System.Data.OleDb.ColumnBinding.ValueGuid()

   at System.Data.OleDb.OleDbDataReader.GetGuid(Int32 ordinal)

   at StorageCraft.ImageManager.Target.ConstructReplicationRecord(IDataRecord record)

   at StorageCraft.ImageManager.Target.<GetRecentRecordsByVolume>b__0(IDataRecord record)

   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()

   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)

   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

   at StorageCraft.ImageManager.Target.GetRecentRecordsByVolume()

   at StorageCraft.ImageManager.RestService.GetReplicationTargetRecentStatus(String fid, String tid)

 

This issue is fixed with a patch version of IM, 7.5.28 available here: http://downloads.storagecraft.com/SP_Files/ImageManager_Setup_7.5.28.exe

I recommend backing up IM’s configuration data before installing, the C:\Program Files (x86)\StorageCraft\ImageManager\ImageManager.mdb file and the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\StorageCraft ImageManager registry key.

This Automate script will backup the config data to C:\Program Files (x86)\StorageCraft\ImageManager\Configuration Backups : https://storagecrafttech-my.sharepoint.com/:u:/g/personal/wesley_gill_storagecraft_com/EXcGwhOAFVNFgdopigeCYawBvhbZ1h6ZW8VYfpbBnL0X9g?e=z8G44S

 

And this one will backup the config data and update IM to 7.5.28:  https://storagecrafttech-my.sharepoint.com/:u:/g/personal/wesley_gill_storagecraft_com/EdlyhounfYpLiLlp7XbeARABPhsUH4VXtwe-dt4CTimYcA?e=Nt3BfZ

 

These scripts will ship with an updated version of the plugins 2.10 coming out in a week or two. 

 

Please let me know if this fixes your issue!

 

Wes Gill

 

 

Share this post


Link to post
Share on other sites

Wes, I ran the last one - to backup the config and install the 7.5.28 version of IM.

After it ran, I logged on to the device, and it's still got 7.5.12 installed, but all of the settings have been stripped out of it?

Share this post


Link to post
Share on other sites

Hi Seth, thank you for reporting this.  I see an issue with the script that likely caused this problem and was able to reproduce a similar failure.  When the install .exe is downloaded, it was saving it to a local file that did not include the version number.  If there was already a file there, Automate may not overwrite it and it appears that if it cannot, it just reports success.  I modified the script to include the version in the local file name and it successfully updated to 7.5.28.  Here is a link to the new script:  https://storagecrafttech-my.sharepoint.com/:u:/g/personal/wesley_gill_storagecraft_com/EXEsD71kZJdNscr-VspqvM8Bf-pZyiMrCFWoQlJnEpcKHw?e=hw8Rzc

To get your settings back, look in C:\Program Files (x86)\StorageCraft\ImageManager\Configuration Backups and you will see two files created when you ran the script earlier.  They will look like this:  

20191105155607-ImageManager.mdb

20191105155607-ImageManager.reg

To restore the settings do the following.

1) Stop ImageManager Service

2) Replace C:\Program Files (x86)\StorageCraft\ImageManager\ImageManager.mdb with the backup copy.  This restores image managers database.  

3) Double click the .reg script from the Configuration Backups directory to import ImageManager's settings into the registry.  

4) Start Image Manager

Sorry for the inconvenience and thanks again for reporting this issue,

Wes Gill

Share this post


Link to post
Share on other sites

Oh, no problem, re-managing the folder and setting up the replication jobs were no sweat :)

New script works to get 7.5.28 installed - and the settings were retained, so I didn't need to restore that time.

I re-sent all Inventory, and ran the Update Configs command on the device.  It's still showing 2 servers with failed replication jobs, even though Image Manager on the device is not showing any replication issues.

The Backup.IM.txt file does not show the API error above, but one of the volumes is still showing a last replication date of 5/21/2019, despite having replicated last night.

Not sure if any of that information is of use?  But, I certainly appreciate you taking the time to help me out!

Share this post


Link to post
Share on other sites

Thank you Seth for the info.  The issue with it showing to old replication date is likely a problem on the server side of the automate plugin.  This is fixed as well in the upcoming 2.10 release but if you could please run the query

select * from plugin_sc_im_replication_success where windowsVolumeGuid LIKE '00000000-0000-0000%';

and if you have any results, run

delete from plugin_sc_im_replication_success where windowsVolumeGuid LIKE '00000000-0000-0000%';

The problem will go away.  The bug that was in IM 7.5.12 would send "null" volumes guids and this would cause problems with the query on the server end.

Another way to fix it would be to run the "Reset" command in the StorageCraft plugin settings menu of that computer.  This command clears out the plugin server side database records for the computer you run it on and clears the remote agent's plugin cache database.  

You had also asked before about where the plugin gets its data.  For IM, the plugin uses the rest API of IM.  For example, to get the detailed replication job status, you can open a browser on the agent machine and load

http://localhost:18180/ImageManager/folder/ to get the managed folders list

http://localhost:18180/ImageManager/folder/a4d1a56e-05a7-4452-8d06-5d1e7b042ecb/replication/ to get list of replication jobs of the folder

http://localhost:18180/ImageManager/folder/a4d1a56e-05a7-4452-8d06-5d1e7b042ecb/replication/b9b85c0c-fd02-47ae-8110-843f5c21c865/recent/ to get a list of the most recently replicated files per volume.  This was the part introduced by IM 7.5.12.  In IM 7.5.6 the API response for replication info did not have the last replicated file on a per volume basis.  A big problem for making an integration showing replication status since C volume could be fine and D volume very stale.  Having automate show that everything is OK in this situation is not acceptable of course so IM had to get an update.  

Replace the ids with your own of course and I recommend https://jsonformatter.org/json-pretty-print to format the output into something human readable.  

Wes

Share this post


Link to post
Share on other sites
On 10/28/2019 at 3:25 PM, Seth said:

 how frequently does it gather the information?

Open a PC and in the plugin, click the big gray gear icon towards the top.  The "ShadowProtect SPX" tab has the frequency of reporting for each item.  There is a minimum, I want to say 60 seconds.

Share this post


Link to post
Share on other sites

Ok - it looks like, after getting 7.5.28 installed on a few more devices, a lot of these errors in the StorageCraft plugin are clearing up.

Still have quite a few in need of actual fixing, and then...get to do this whole process again with ShadowProtect.

Should be a lot of fun, but at least the plugin appears to be reporting correctly :)  Well, for ImageManager, anyway.  Won't know about SPX until after I fix all these.

Thanks again for all the help and information! Is there an official release date for the updated plugin?

Share this post


Link to post
Share on other sites

I was today years old when I learned there's a REST API inside each ImageManager install. Sweet!

Now, why ShadowControl is claiming our 7.5.6 installs are "current" when clearly there've been a couple of significant releases in the meantime is anyone's guess...

Share this post


Link to post
Share on other sites
16 hours ago, KKerezman said:

I was today years old when I learned there's a REST API inside each ImageManager install. Sweet!

Now, why ShadowControl is claiming our 7.5.6 installs are "current" when clearly there've been a couple of significant releases in the meantime is anyone's guess...

If I'm not mistaken - the main Downloads page for StorageCraft still has 7.5.6 installer for ImageManager, as well.

Share this post


Link to post
Share on other sites

Hi Kkerezman, 7.5.6 is still the official current rev.  7.5.28 sounds like a big jump but it is just the addition of the detailed replication status API used only by the connectwise plugin.  There is a significant release coming soon, 7.6.0 that will be the official current rev.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...