Forum / Devolutions Password Server - Support

Problem accessing "Connections" at website

  • Create an Issue
  • Cancel

Accessing "Connections" in the website causes "Internal Server Error , An error has occurred"

I have installed DVLS 4.5.0.0 and set up a new Database where this workes fine

But if i change database in DVLS under Server Settings to the database moved from old SQL server the error happens when trying to access "Connections" in website.

Using DVLS with RDM client and the old database all seems to be working fine.

Is there any log file that gives more information than "Internal Server Error , An error has occurred" ?

Clock3 yrs

Hi,
I will ask our support team to contact you about this.

Regards

David Hervieux

signaturesignature

Clock3 yrs

Hello,

Could you please check in the DVLS logs if there is something relevant about this issue?
Please post the details of the error if you find one.

Please consult this online help page on How to enable the Devolutions Server Logs.

Best regards,



Érica Poirier

signaturesignature

Clock3 yrs

Hi

Going to "View logs" all is empty , and hitting "Refresh" gives med error:

Unable to connect to your data source
Must declare the scalar variable "@RepositoryID"

and this in the details:


System.Data.SqlClient.SqlException (0x80131904): Must declare the scalar variable "@RespositoryID".
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.GetData(String sql, IDbDataParameter[] parameters)
at Devolutions.RemoteDesktopManager.Business.DataSources.SQLServerLogSubDataSource.GetServerLogs(Nullable`1 category, Nullable`1 messageType, Nullable`1 fromDate, Nullable`1 toDate, String userName, String text)
at Devolutions.RemoteDesktopManager.Managers.RDMSLocalManager.GetServerLogs(Nullable`1 category, Nullable`1 messageType, Nullable`1 fromDate, Nullable`1 toDate, String userName, String text)
at Devolutions.RemoteDesktopManager.Forms.FreEmbeddedServerLogs.LoadLogMessageRowGrid()
ClientConnectionId:680e468a-16e1-4a8f-93cd-b71bac88f5c9
Error Number:137,State:2,Class:15

Clock3 yrs

I managed to access the DATA Source logs via the webiste "server/dvls/administration/data-source-logs

And i found this that appears when the error appears

ArgumentOutOfRangeException - Length cannot be less than zero. Parameter name: length at System.String.Substring(Int32 startIndex, Int32 length) at Devolutions.Server.ConnectionNavigationManager.CreatePartialTree(SessionContext context, PartialConnection partialConnectionBase, ConnectionInfoEntity[] connectionInfoEntities, Boolean isPrivate) at Devolutions.Server.Controllers.APIControllers.v2.BackendApiController.GetPartialConnectionTree(String breadcrumb) at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()

Clock3 yrs

Hello,

The database seems to not be at the correct version. With DVLS version 4.5.0.0, the database must be at version 315.

image

Please make a backup of this database first and then from the DVLS Console, update the database by clicking on the Update Database button in the Database tab of the Server Settings.

image

Best regards,



Érica Poirier

signaturesignature

Clock3 yrs

Hello,

About the error ArgumentOutOfRangeException - Length cannot be less than zero, this issue has been fixed internally and will be available in the next version of DVLS.

Best regards,



Érica Poirier

signaturesignature

Clock3 yrs

Hello Erica

Databse upgrade has been done before. I did it again but still same problem.

Also i might say that im running RDM 12.5.8.0 since there was problem with importing more than one user to the database before that you fixed

RDM DB update.jpg
RDM DB Version.jpg
Clock3 yrs

Hello,


We have been able to reproduce your issue about the Server Logs error and a ticket has been submitted to our engineering department.

Are you interested to try a patch of DVLS about the ArgumentOutOfRangeException error?

Best regards,



Érica Poirier

signaturesignature

Clock3 yrs

The "Going to "View logs" all is empty , and hitting "Refresh" gives med error" issue has been resolved and will be available in the next RDM beta build.

Best regards,

Stefane Lavergne

signaturesignature

Clock3 yrs

Hi Erica

Yes I am interested to try the patch for DVLS to adress the ArgumentOutOfRangeException error

Clock3 yrs

Hello,

Could you please execute this SQL Statement on your SQL database?
How many rows does this statement return?

select * from dbo.Connections where ConnectionType = 25 and (GroupName not like '%' + Name or GroupName is null or GroupName = '')

Best regards,



Érica Poirier

signaturesignature

Clock3 yrs

Hi Erica

That SQL Statement returns 8 rows

Clock3 yrs

Hello,

These rows contents incorrect information in the GroupName column. When you click on the Connections menu to view the sessions, these groups cannot be displayed in the tree view and you get the ArgumentOutOfRangeException error.

So it is possible to fix these 8 rows to resolve the issue.

Are you available for a remote session?

If so, please write an email at support@devolutions.net and we will schedule an appointment. If you are available for the next 30 minutes, just mention it in the email and I will send you the link to do the remote session now.

Best regards,



Érica Poirier

signaturesignature

Clock3 yrs

Good morning Erica, we are having the same issue. Can you please provide the solution, so that we can implement to resolve?

Clock3 yrs

Hi

I managed to get this solved by editing the entries returned from SQL statement select * from dbo.Connections where ConnectionType = 25 and (GroupName not like '%' + Name or GroupName is null or GroupName = '')


I edited them in RDM client so that the name of the entry in "Tree browsing view" and the Name that is seen when editing the entry match exactly with lower and upper cases.

I also hade one entry that didn´t show up in the SQL statement but after finding that one, which had the same name but with difference in upper and lower cases I now can access "Connections" in the website.

Clock3 yrs

Great workaround. Thank you for sharing it.

Regards

David Hervieux

signaturesignature

Clock3 yrs

Hello Team,

Getting "Error: The encryption file is missing, please contact your administrator.". After configuring DVLS 4.5.0.0.
While trying to connect from the RDM client getting error : DVLS server is not responding

error.png
Clock3 yrs

Hello,

Is it possible that an encryption keys has been setup? Do you have a backup of that key? If yes, could you try to import it to the DVLS server.

Please follow this help topic about, export, import and how to regenerate the encryption keys.
https://helpserver.devolutions.net/index.html?management_advanced.htm

Best regards,



Jeff Dagenais

signaturesignature

Clock3 yrs

Hi,

I would like to investigate this problem with you. Before doing a regenerate of the encryption keys, could you confirm if you have more than one DVLS ?

Best regards,



David Grandolfo

signaturesignature

Clock3 yrs

Hi David,

Yes I have mote then one DVLS server instance running.
Attached is the screen shot.
Note: rest of 2 DVLS instance on 3.2.0.0 is running absolutely fine. Issue is with 4.5.0.0

David Grandolfo wrote:

Hi,

I would like to investigate this problem with you. Before doing a regenerate of the encryption keys, could you confirm if you have more than one DVLS ?

Best regards,

DVLS_Instances.png
Clock3 yrs

Hello Team,

After fixing the Encryption issue. I came across new issue with Domain Authentication.
When domain user attempt to connect to the DS (data source) with domain credentials login details created under User & Security Management looks weird, attached is the screen shot.

After this any domain user attempting to connect is getting logged in to previous users profile.
Let me know suitable time to share the details on Remote Desktop.

Authentication Details:
Authentication > Domain > Automatic User creation:Username format: NetBios

Aauthentication error.png
Clock3 yrs

Aammir wrote:

Hello Team,

After fixing the Encryption issue. I came across new issue with Domain Authentication.
When domain user attempt to connect to the DS (data source) with domain credentials login details created under User & Security Management looks weird, attached is the screen shot.

After this any domain user attempting to connect is getting logged in to previous users profile.
Let me know suitable time to share the details on Remote Desktop.

Authentication Details:
Authentication > Domain > Automatic User creation:Username format: NetBios

Problem reference: https://forum.devolutions.net/topic27919-dvls-web-authentication.aspx

Clock3 yrs

Hi Aammir,

Related to the last post you wrote, could you confirm if you use Alternate UPN Suffixes please ?

Best regards,



David Grandolfo

signaturesignature

Clock3 yrs

hi David,

i have tried with both UPN and NetBIOS.

Clock3 yrs

Hi Aammir,

I talked with one of my colleagues and she confirms me that you are presently using Alternate UPN Suffixes. You can confirm by looking this step with your Domain administrator.

With DVLS 4.0 and 4.5 we do not support yet Alternate UPN suffix, we will inform you as soon as our new release that will support UPN suffix will be released.

Best regards,



David Grandolfo

signaturesignature

Clock3 yrs

Hello David,

After confirmation from Production Infrastructure team, I found that 'Yes, we are using Alternate UPN suffix'. Now, this force me to stay on the DVLS version 3.2.0.0 which in no more supported (please correct me if i am wrong).


I am eagerly waiting to listen from you about the new release that supports alternate UPN suffix

Clock3 yrs

This is our top priority development.

Regards

David Hervieux

signaturesignature

Clock3 yrs