Timeout Errors using RDM PS module to connect to DVLS

Resolved

Timeout Errors using RDM PS module to connect to DVLS

avatar

Hi, Since updating to DVLS version 2022.3.13.0 and RDM PS version 2022.3.1.6 I have noticed that many of the scripts we are using are retuning "[Error] The operation has timed out." messages. Currently the scripts do work and we have not experienced any issues with the data we are getting abck but the message is filling up our logs.

We are using PS version 7.3.2 and I have tried to increase the timeout property on the datasource from 15 to 60, but the error continues to happen.

forum image

All Comments (13)

avatar

Hello,

Do you have specific cmdlets that produce these timeout errors?

Could it be vaults with a high number of entries?

Do you have any relevant error messages in the DVLS Logs?

Best regards,

Érica Poirier

avatar

I am seeing the errors on both large an small vaults so don't believe its the number of entries. Went a bit deeper into our scripts and it does appear to be mainly after running "Update-RDMUI" or jumping between data sources. I've removed Update-RDMUI and it seems to have quietened it down quite a bit but am unsure if this command still needs to be run to get accurate data back.

Both RDM connection logs and DVLS logs are showing no issues.

avatar

Hello,

Thank you for your feedback.

In fact the Update-RDMUI cmdlet is no longer required on every entry update. It could be useful if there is a important update made by another user or script while the current script is running or to do a full cache refresh.

About switching to another data source, does this occurs every time or once in a while? This is a long shot but maybe this article could help.

Best regards,

Érica Poirier

avatar

I was incorrect it appears to be a single vault causing it now, not a Datasource. It just happened to be the first vault the script connected to when it hits the datasource. When doing a full export of the vault to csv or xml I am seeing an invalid character error. Could this be causing the timeout on connection if it cant read that character?

This is a reasonably large vault (approx 4k entries) is there an easy way to find out which entry is causing this?

Error : System.InvalidOperationException: There was an error generating the XML document.
 ---> System.ArgumentException: '', hexadecimal value 0x18, is an invalid character.
   at System.Xml.XmlUtf8RawTextWriter.WriteElementTextBlock(Char* pSrc, Char* pSrcEnd)
   at System.Xml.XmlUtf8RawTextWriter.WriteString(String text)
   at System.Xml.XmlWellFormedWriter.WriteString(String text)
   at System.Xml.Serialization.XmlSerializationWriter.WriteElementString(String localName, String ns, String value, XmlQualifiedName xsiType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterConnection.Write465_Connection(String n, String ns, Connection o, Boolean isNullable, Boolean needType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterConnection.Write466_Connection(Object o)
   at InvokeStub_XmlSerializationWriterConnection.Write466_Connection(Object, Object, IntPtr*)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
   at Devolutions.RemoteDesktopManager.Managers.SerializationManager.SaveObjectToString(Object value)
   at Devolutions.RemoteDesktopManager.Managers.VariableManager.ApplyVariables(Boolean isUri, Boolean isAddhoc, Connection connection, Int32 nesting)
   at Devolutions.RemoteDesktopManager.Managers.ImportExportManager.<>c__DisplayClass16_0.<ExportConnectionToCsvFile>b__3(Connection c)
   at Devolutions.Utils.ExtensionUtils.ForEach[T](IEnumerable`1 list, Action`1 act)
   at Devolutions.RemoteDesktopManager.Managers.ImportExportManager.ExportConnectionToCsvFile(IEnumerable`1 connections, String fileName, String password)
   at RemoteDesktopManager.PowerShellModule.ExportRDMSessionCommand.ProcessRecord()
   at System.Management.Automation.CommandProcessor.ProcessRecord()

avatar

Hello,

That's a good news you have found that this problem is coming from a specific vault.

You could try to export the entries one by one in PowerShell with the Export-RDMSession cmdlet in a loop to find out which entry or entries that causing this error.

Best regards,

Érica Poirier

avatar

Extracting each entry separately shows no errors while attempting to extract them all at once is giving the XML error.

The script I used to extract all entries separately. (No errors)

$Sessions = Get-RDMSession
Foreach($session in $sessions){
        Export-RDMSession -Path ("D:\Configs\DVLS-PR\Test Extract\" + $Session.Name + ".zip")  -Sessions $Session -Password $Pass -CSV
}


Script I used to try do it all at once that gave the error. (this shows the error)

$Sessions = Get-RDMSession
Export-RDMSession -Path ("D:\Configs\DVLS-PR\Test Extract\test.zip")  -Sessions $Sessions -Password $Pass -CSV


avatar

Hello,

Thank you for your feedback.

It looks like maybe a problem with virtual folders. Could you please check in Help - Diagnostic - Data Source - Data Source Diagnostic?

forum image

Do you see any Virtual Folders or Duplicate Folders?

If any duplicate folders exist, then you can remove them using the Remove Duplicates button in the Duplicate Folders tab.

forum image

If you find any Virtual Folders, then you will have to edit these folders to save them in the database. In fact, Virtual Folders are exist in the path of given entries without existing in the database as an entry. If there are too many virtual folders, then you can use this PowerShell script to convert them and make sure you do a full database backup before running this script.

Best regards,

Érica Poirier

avatar

Both duplicate folders and Virtual folders are empty. Summary is showing green ticks for both.

forum image

forum image

forum image

avatar

Hello,

Thank you for the information.

I think it would be easier to troubleshoot this issue in a remote session. Please send an email to service@devolutions.net and we will send a link to book the session. And please add a link to this forum's thread in your message.

Best regards,

Érica Poirier

avatar

Hello,

The issue has been found and it was related to an entry with a problematic description.

Once this problem fixed, the export of the entries is working as expected.

Best regards,

Érica Poirier

avatar

Hi

I also get the [Error] The operation has time out when running Update-RDMUI

When I tray exporting the sessions from the value to of them fails when export.
In RDM I can’t se anything wrong with them, what can I do?

On of the sessions that fails I have in around 50 vaults, I have only tried scripting against
one vault after the upgrade.

I do not run Devolution server.
My setup:
Powershell modul: Devolution.Powershell 2023.1.0.4
Enterprise Edition 2023.1.17
Data source: Microsoft Azure SQL

avatar

Hi,

Do you have RDM running while executing your PS script?
If not, you can safely ignore the error!

Regard

Jonathan Lafontaine

avatar

Thanks