Jump to content

Horizon Session Recording and PostgerSQL


Ofir Dalal

Recommended Posts

Hi everyone, I set up a Horizon Session Recording lab environment and transferred the database to PostgreSQL version 16.4.

Once I finished the process, the application started writing to the DB, but I got the following error.

image.thumb.png.08f786a631c0d59021de2a089021dc0e.png

When I checked the log file, this is the error I received during the save configuration:

   at Horizon.Recording.WebAPI.Controllers.SecureControllers.SetupController.Post(SetupConfiguration value) in C:\actions-runner\_work\HorizonRecording\HorizonRecording\Horizon.Recording.WebAPI\Controllers\SecureControllers\SetupController.cs:line 252|
2024-09-11 18:23:50.1645|ERROR|Horizon.Recording.WebAPI.Controllers.SecureControllers.SetupController|Failed to migrate machines to destination database: Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> System.InvalidCastException: Cannot write DateTime with Kind=Unspecified to PostgreSQL type 'timestamp with time zone', only UTC is supported. Note that it's not possible to mix DateTimes with different Kinds in an array/range. See the Npgsql.EnableLegacyTimestampBehavior AppContext switch to enable legacy behavior.
   at Npgsql.Internal.TypeHandlers.DateTimeHandlers.TimestampTzHandler.ValidateAndGetLength(DateTime value, NpgsqlParameter parameter)
   at Npgsql.Internal.TypeHandlers.DateTimeHandlers.TimestampTzHandler.ValidateObjectAndGetLength(Object value, NpgsqlLengthCache& lengthCache, NpgsqlParameter parameter)

It seems to be an application error.

I'm attaching info from the Postgres documents. - https://www.npgsql.org/doc/types/datetime.html

image.png.2a4f4201a2ae219762572781eac8aab7.png

The Omnissa documentation doesn’t have a compatibility matrix for supported database versions.

I can’t reach support. Can this information be passed on to the relevant parties?

 

 

 

 

 

Edited by Ofir Dalal
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • Employee

You cant reach support? Is that you cannot create an SR?

Ive seen a case similar to this recently where postgreSQL for windows was deployed on the Horizon Recording Server.

I suggested to deploy postgreSQL on a separate Linux VM as postgres uses UTC and it may have been conflicting with the Server NTP time/date.

I have yet to hear from the TSE about the status of this test.

Link to comment
Share on other sites

Thank you, Cliff.

I'll test PostgreSQL on a Linux system in a lab environment.

Regarding ticket creation, the system didn't allow opening a ticket with a customer account. Yesterday, there was a problem with the Issue Type field in the drop-down menu being empty, and it's a required field.

I'll check again with the customer to see if it's resolved.

Do you know if the Horizon Session Recording Server will also support PostgreSQL on Windows environments? Unfortunately, the customer wants PostgreSQL to run only on a Windows system.

Link to comment
Share on other sites

  • Ofir Dalal changed the title to Horizon Session Recording and PostgerSQL

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...