microsoftgraph / microsoft-graph-comms-samples

Microsoft Graph Communications Samples
MIT License
211 stars 236 forks source link

mediaInitilization Failure, while deploying the recording bot in windows node pool using docker #718

Open pavankalyan066 opened 8 months ago

pavankalyan066 commented 8 months ago

Issue When we are trying to deploy the recording bot using docker in window 2022 node pool, with dotnet version 4.8 we are facing the below error.

Code Snippet

Initialise function in the Botservice

builder.SetMediaPlatformSettings(_settings.MediaPlatformSettings);

Expected behavior It works fine in windows 2019 with dotnet version 4.8, but in this it fails to apply the media settings to the system.

Graph SDK (please complete the following information):

Logs

Code: mediaInitializationFailure
Message: Media platform failed to initialize
,    at Microsoft.Graph.Communications.Calls.Media.MediaCommunicationsClientBuilderExtensions.SetMediaPlatformSettings(ICommunicationsClientBuilder statefulClientBuilder, MediaPlatformSettings mediaSettings)
   at RecordingBot.Services.Bot.BotService.Initialize() in C:\src\RecordingBot.Services\Bot\BotService.cs:line 127
   at RecordingBot.Services.ServiceSetup.AppHost.StartServer() in C:\src\RecordingBot.Services\ServiceSetup\AppHost.cs:line 135

Additional context I have tried to create docker images with various versions of dotnet and windows kernel, it did not result in positive outcome.

InDieTasten commented 8 months ago

If you want to run the SDK in Windows Server 2022, I would recommend taking a look at the soon to be available public sample for AKS, which is confirmed to already be running on Windows Server 2022. You can find the Dockerfile here:

https://github.com/LM-Development/aks-sample/blob/main/Samples/PublicSamples/RecordingBot/build/Dockerfile

Maybe you will find something your Dockerfile is missing or doing wrong. Perhaps vc_redist. Hard to know without seeing your Dockerfile

pavankalyan066 commented 8 months ago

If you want to run the SDK in Windows Server 2022, I would recommend taking a look at the soon to be available public sample for AKS, which is confirmed to already be running on Windows Server 2022. You can find the Dockerfile here:

https://github.com/LM-Development/aks-sample/blob/main/Samples/PublicSamples/RecordingBot/build/Dockerfile

Maybe you will find something your Dockerfile is missing or doing wrong. Perhaps vc_redist. Hard to know without seeing your Dockerfile

Even after using the same docker file mentioned in the above samples, the error still exists, The docker file is similar to the above samples.

InDieTasten commented 8 months ago

I take it that you are able to build the dockerfile and run it, but during runtime your application crashes possibly due to wrong configuration?

Make sure you are supplying all the necessary configurations. If you don't provide info about your code, dockerfile and the way you are running it, it's gonna be really difficult to help you.

pavankalyan066 commented 8 months ago

Here is the code repository for your reference.

All necessary configurations are supplied and we are able to build the docker without any issue but while bringing up the image in windows 2022 kernel, recording bot fails with the above error.

1fabi0 commented 7 months ago

All necessary configuration are supplied

are you shure they are supplied, might it be possible that the certificate is not provided or a wrong certificate is provided? might there be a configuration issue with the ports?

ssulzer commented 7 months ago

@pavankalyan066 What version of the Microsoft.Skype.Bots.Media library are you using? Please try the current version if you are using something older. https://www.nuget.org/packages/Microsoft.Skype.Bots.Media/1.27.0.2-alpha

Also, what Windows container image are you using? (Windows Server Core is not supported for a media bot.)