Need a special offer?Find out if your project fits.
+

Data Server SSL Error

Answered
Scott Oliver asked on November 15, 2022

Hello,

We have Flexmonster Data Server setup on two seperate machines (both Mac ARM).

One machine is working very well and fine, the other displays the following error when trying to start the server:

2022-11-15 12:39:08.8418|FATAL|Flexmonster.DataServer.Program|The server mode SSL must use a certificate with the associated private key. 

at System.Net.Security.SslStreamCertificateContext.Create(X509Certificate2 , X509Certificate2Collection , Boolean , SslCertificateTrust )
at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware..ctor(ConnectionDelegate next, HttpsConnectionAdapterOptions options, ILoggerFactory loggerFactory)
at Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.<>c__DisplayClass12_0.<UseHttps>b__0(ConnectionDelegate next)
at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.Build()
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass30_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.AnyIPListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable`1 listenOptions, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken )
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost , CancellationToken )
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost , CancellationToken )
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost )
at Flexmonster.DataServer.ServerCLI.BuildAndRunHost(List`1 args)
at Flexmonster.DataServer.ServerCLI.<>c__DisplayClass8_0.<ConfigureServer>b__0()

It was previously working, and after attempting to configuring the HTTPS settings and a machine restart, the Flexmonster Data Server client stopped working. We didn't receive any errors or warnings at this stage, just a persistent message that the server couldn't be started.

Following this, we attempted to uninstall and reinstall the data server, but now receive the above error.

6 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster November 16, 2022

Hello, Scott,

Thank you for contacting us.

We could not reproduce the described issue on our side. Could you please provide us with some details:

  1. Which type of certificate do you use?
  2. Do you set the certificate using Flexmonster Data Server Admin Panel or the Flexmonster Data Server configuration file(flexmonster-config.json)? We would be grateful if you send us your Data Server configurations (a current flexmonster-config.json file).

It would greatly help us.

Looking forward to hearing from you.

Kind regards,
Nadia

Public
Scott Oliver November 17, 2022

Hello,

We tried un-installing and reinstalling again and we now receive this error (I am only posting the header):

2022-11-17 12:41:42.0727|FATAL|Flexmonster.DataServer.Program|Https configuration failed. Details: Could not find a part of the path '/Users/XXXX/Desktop/XXXX/Bundle.pfx'. 

The file that it is referring to no longer exists. Although we un-installed (deleting as many files that we could find including files found in Application Support and Preferences), it is still remembering this pox file.

Is there a way that we can entirely remove the data server, so that we can set this up from scratch?

Public
Scott Oliver November 17, 2022

Hello,

Further information for you, we setup a new user on the same machine, installed data server and it is working fine.

So the issues we are experienced are user account based (Monterey 12.6.1).

I am sure it goes without saying, this is by no means a solution for us, we need this to be working on our original user account.

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster November 17, 2022

Hello,

Thank you for providing us with the additional information.

We suppose that the current user may not have access to the /Users/XXXX/Desktop/XXXX/Bundle.pfx file.
The recommended way is to repeat all the steps you have made to install the Data Server for the new user.

Please let us know if you have more questions. Looking forward to hearing from you.

Kind regards,
Nadia

Public
Scott Oliver November 17, 2022

Hello Nadia,

As mentioned in my previous post, the PFX file was deleted and no longer exists. Re-creating that directory/file and ensuring the permissions are granted returns us back to the error in our original post.

As mentioned, the new user worked fine.

Nonetheless, we have since discovered the solution. As I speculated there is a hidden file which contains the data servers configuration. Regardless of un-installing and re-installing this hidden file remained.

For those who come across an issue like this in the future, for Mac OS 12.6.1 at least the config file is stored in:

/Users/XXXX/.local/share/FlexmonsterDataServer

Once we found the file, we were able to edit and remove the SSL configuration, restart and once again access the client.

I must say, we have previously praised you and your team for the support you offer. I am rather disappointed that it takes two developers five hours of hunting for a hidden configuration file to rectify a bad configuration. This file should really be documented.

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster November 18, 2022

Hello, Scott,

Thank you for letting us know that you found the solution.

We are sorry to hear that it took so long to find the configuration file.
Usually, there's no need to use the configuration file manually while using the Admin Panel. The file is located there to avoid the conflict between editing the configurations in the Admin Panel and editing the file.
However, we agree that this should be described in our documentation to understand better and handle exceptional situations. We have already passed this information to our documentation team.

Do not hesitate to contact us in case further questions arise.

Kind regards,
Nadia

Please login or Register to Submit Answer