after upgrade to devolution server to 2023.3.4.0 en devolution gateway to 2023.3.0 i get a error on the devolution gateway

Implemented

after upgrade to devolution server to 2023.3.4.0 en devolution gateway to 2023.3.0 i get a error on the devolution gateway

avatar

after upgrade i get the following error when testing the devolution gatewat

TypeError: Cannot read properties of null (reading 'up')
at $.showGatewayHealthToast (https://*/7064.53a8dfee58711b82.js:1:17773)
at p._tapNext (https://*/7064.53a8dfee58711b82.js:1:16315)
at p._next (https://*/main.eda28d7a11761fef.js:1:1775654)
at p.next (https://*/main.eda28d7a11761fef.js:1:1747367)
at s._next (https://*/main.eda28d7a11761fef.js:1:1768874)
at s.next (https://*/main.eda28d7a11761fef.js:1:1747367)
at p._next (https://*/main.eda28d7a11761fef.js:1:1775740)
at p.next (https://*/main.eda28d7a11761fef.js:1:1747367)
at s._next (https://*/main.eda28d7a11761fef.js:1:1768874)
at s.next (https://*/main.eda28d7a11761fef.js:1:1747367)



Error:
SqlException - Violation of PRIMARY KEY constraint 'PK_DevolutionsGatewayHealth'. Cannot insert duplicate key in object 'dbo.DevolutionsGatewayHealth'. The duplicate key value is (14ca6b59-4593-4805-a64c-40ab02b76645). The statement has been terminated. at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method) at Microsoft.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String methodName) at Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Devolutions.Server.DatabaseManager.<>c__DisplayClass19_0.<ExecuteNonQuery>b__0(DbCommand dbCommand) at Devolutions.Server.DatabaseManager.ExecuteCommand(DbConnection dbConnection, DbTransaction dbTransaction, String sql, IEnumerable`1 parameters, CommandType commandType, Action`1 action) at Devolutions.Server.DatabaseManager.ExecuteNonQuery(DbConnection dbConnection, DbTransaction dbTransaction, String sql, IEnumerable`1 parameters, CommandType commandType) at Devolutions.Server.DatabaseManager.ExecuteNonQuery(String sql, IEnumerable`1 parameters, CommandType commandType) at Devolutions.Server.Business.DatabaseCommand.ExecuteNonQuery(DbTransaction transaction) at Devolutions.Server.Business.DatabaseCommand.ExecuteNonQuery() at Devolutions.Server.Managers.Gateway.SqlDataAdapter.UpsertGatewayHealth.Execute() at Devolutions.Server.Managers.Gateway.SqlGatewayDataAdapter.SaveHealthCheck(GatewayHealthCheck gateway, GatewayHealth health) at Devolutions.Server.Managers.Gateway.GatewayManager.CheckGatewayHealth(Gateway gateway) at Devolutions.Server.Managers.Gateway.DefaultGatewayManager.CheckGatewayHealth(Gateway gateway) at Devolutions.Server.Controllers.APIControllers.V2.GatewayApiController.GetGatewayHealth(Guid id) --- DevolutionsGateway


Source:
Core Microsoft SqlClient Data Provider

All Comments (8)

avatar

prolem looks be solved by removing the gateway and re adding it again

avatar

Hello,

I'm glad to hear that you found a solution to fix that, but it seems to be an issue. What do you mean by "when testing the devolution gatewat" ? Is it when you send a "ping" request from the UI interface ? We will try to find why you got this error.

Best regards,

François Dubois

avatar

yes, when i did the ping from de gateway manager page in devolution servere

avatar

Hello,

Thank you for your quick answer. We will see if we could find an issue with those information.

Best regards,

François Dubois

avatar

Hello,

We investigated the issue and understood it. For now, I would suggest you to run that SQL request on your database

IF OBJECT_ID('tempdb..#FilteredHealth') IS NOT NULL
BEGIN   
    DROP TABLE #FilteredHealth
END


SELECT GatewayHealth.* 
INTO #FilteredHealth
FROM dbo.DevolutionsGatewayHealth GatewayHealth
INNER JOIN (SELECT TOP 1 ID
            FROM dbo.DevolutionsGatewayHealth SingleLastGatewayHealth
            INNER JOIN (SELECT GatewayID, MAX(TimeChecked) lastTimeChecked
                        FROM dbo.DevolutionsGatewayHealth
                        GROUP BY GatewayID) lastGatewayHealth ON
                SingleLastGatewayHealth.GatewayID = lastGatewayHealth.GatewayID
                and SingleLastGatewayHealth.TimeChecked = lastGatewayHealth.lastTimeChecked) maxid ON
    maxid.ID = GatewayHealth.ID


TRUNCATE TABLE dbo.DevolutionsGatewayHealth


INSERT INTO dbo.DevolutionsGatewayHealth
SELECT * FROM #FilteredHealth


After that, all your ping requests should work correctly. This issue should never occured after that. But we will integrate a fix soon to avoid that with other installation in similar situation as you. Thank you for letting us know that issue.

Don't hesitate if you have any question.
Best regards,

François Dubois

avatar

Thank you, that fixed following issues on our end:

  • health check in DVLS admin console
  • health check from RDM

However, it did not fix the "Edit" button issue under Companions on our Gateways. But: after updating console to 3.6 also fixed the issue in the console.

avatar

Hi Srdan,

You can upgrade the console without upgrading the instance, if you simply test and see if fixes the edit button.

Let us know if it works afterwards.

Best regards,

avatar

this probleem was solleved by removing and readding the gateway.

i didn't had this problem by the upgrade to 2023.3.6.0