Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC21: SetupWebclient breaks containers when run\my is a shared volume #518

Closed
michvllni opened this issue Dec 20, 2022 · 2 comments
Closed

Comments

@michvllni
Copy link
Contributor

We use several containers that run on the same volume.
Our volume points to C:\run\my inside the container.

SetupWebClient appears to replace the management module everytime a container is created:

Set-Content -Path $NAVWebClientManagementModule -Value $WebManagementModuleSource -Encoding UTF8

The issue is when launching multiple containers at once this breaks the container creation as the containers simultanously try to update the file:

Initializing...
Starting Container
Hostname is nsysdevbg
PublicDnsName is nsysdevbuchegegen.axians-infoma.de
Using Windows Authentication
Starting Internet Information Server
Modifying Service Tier Config File with Instance Specific Settings
Modifying Service Tier Config File with settings from environment variable
Setting SqlLongRunningThreshold to 10000
Setting AllowSessionWhileSyncAndDataUpgrade to true
Setting EnableTaskScheduler to true
Creating ClientServicesReconnectPeriod and setting it to 01:00:00
Setting SnapshotDebuggerEnabled to true
Setting SnapshotDebuggerServicesPort to 17083
Setting ServicesUseNTLMAuthentication to true
Setting ServicesDefaultCompany to Master BaWü
Setting PublicWebBaseUrl to https://nsysdevbuchegegen.axians-infoma.de/BC
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Set-Content : Stream was not readable.
At C:\Run\SetupWebClient.ps1:47 char:1
+ Set-Content -Path $NAVWebClientManagementModule -Value $WebManagement ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (C:\run\my\NAVWebClientManageme
   nt.psm1:String) [Set-Content], ArgumentException
    + FullyQualifiedErrorId : GetContentWriterArgumentError,Microsoft.PowerShe
   ll.Commands.SetContentCommand

WARNING: SetupWebClient failed, retrying...
Registering event sources
Creating DotNetCore Web Server Instance
Set-Content : Stream was not readable.
At C:\Run\SetupWebClient.ps1:47 char:1
+ Set-Content -Path $NAVWebClientManagementModule -Value $WebManagement ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (C:\run\my\NAVWebClientManageme
   nt.psm1:String) [Set-Content], ArgumentException
    + FullyQualifiedErrorId : GetContentWriterArgumentError,Microsoft.PowerShe
   ll.Commands.SetContentCommand

The process cannot access the file 'C:\run\my\NAVWebClientManagement.psm1' because it is being used by another process.
at <ScriptBlock>, C:\Run\SetupWebClient.ps1: line 49
at <ScriptBlock>, C:\Run\navstart.ps1: line 191
at <ScriptBlock>, C:\run\start.ps1: line 384
at <ScriptBlock>, C:\InfomaEntry.ps1: line 43
at <ScriptBlock>, <No file>: line 1
Starting EventLog Monitor
Monitoring EventSources from EventLog[Application]:
- MicrosoftDynamicsNAVClientClientService
- MicrosoftDynamicsNAVClientWebClient
- MicrosoftDynamicsNavServer$BC
- MSSQL$SQLEXPRESS

Is there any other way to fix this rather than using a separate volume for each container?

@freddydk
Copy link
Contributor

I think it is a bad idea to share c:\run\my as this is used for files related to this container.
You should share another volume with your files for the containers.

@michvllni
Copy link
Contributor Author

I somehow had to attach my scripts to the default scripts, and according to documentation I should put them into C:\run\my.

This is the reason why I was doing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants