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

Restarting container fails #42

Closed
Diego-T opened this issue Jun 18, 2017 · 16 comments
Closed

Restarting container fails #42

Diego-T opened this issue Jun 18, 2017 · 16 comments
Labels

Comments

@Diego-T
Copy link

Diego-T commented Jun 18, 2017

The container starts without a problem but stopping and starting it again produces the following:

PS D:\Dev\DockerTest> docker run -d microsoft/iis
4d18[...]
PS D:\Dev\DockerTest> docker stop 4d18
4d18
PS D:\Dev\DockerTest> docker start -a 4d18
ERROR ( message:New add object missing required attributes. Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'ALLUSERSPROFILE'
. )

APPCMD failed with error code 183

Failed to update IIS configuration

Is this scenario supported? Or should I always create a new container instead?

@jwgoedheer
Copy link

I have the same problem.
For what I've seen the ServiceMonitor adds environment variables to the applicationhost.config. It seems like it doesn't update the dictionary correctly and that on a restart, when the keys are already added the first time, the exception is thrown.
For now I'm using the previous version of ServiceMonitor.exe which doesn't update environment variables. In my setup I don't need them to be there.
Too bad there is no source or documentation of the ServiceMonitor yet.

@shirhatti shirhatti added the bug label Jun 21, 2017
@shirhatti
Copy link
Contributor

Acknowledging this is a regression on our part. We're working to fix this.

@sebagomez
Copy link

@jwgoedheer is there a url you can share to that old ServiceMonitor?

@shirhatti
Copy link
Contributor

shirhatti commented Jul 5, 2017

@jorgecotillo
Copy link

Any hint on how I can replace the existing file in my container? I mapped my container to a host folder but once I access the folder I see no files.

@shirhatti
Copy link
Contributor

Any hint on how I can replace the existing file in my container? I mapped my container to a host folder but once I access the folder I see no files.

@jorgecotillo I'm assuming you're trying to replace ServiceMonitor.exe? In my opinion, the simplest way to replace it is via an ADD directive in your Dockerfile.

@jorgecotillo
Copy link

@shirhatti gotcha, thanks!

@shirhatti
Copy link
Contributor

We have a new ServiceMonitor that should address this issue. Please feel free to give it a spin #43 and give us your feedback.

@shirhatti
Copy link
Contributor

shirhatti commented Jul 18, 2017

Fixed in windowsservercore-10.0.14393.1480 (d6580f6)

@amitsaha
Copy link

Just wanted chime in and say that the 2.0.1.6 release still showed the behavior. I switched to the old release as per above and haven't seen the issue yet.

@liberdis
Copy link

Can confirm issue persists with 2.0.1.6 (current) ServiceMonitor.exe against microsoft/aspnet:4.7.2-windowsservercore-ltsc2016 , The July-2017 1.1.0.1 version also caused the same symptom and I have had to roll back to 1.0.0.1 as suggested at the top of this thread.

@chetanc97
Copy link

Still no fun with microsoft/dotnet-framework:4.7.2-runtime-windowsservercore-ltsc2019 . bug exists

@chetanc97
Copy link

@shirhatti Even it did not work for the older ServiceMonitor . It stops the container

@GopalanHarish
Copy link

08/2020: Issue still exists.
I had convinced business for migration to Docker.
I was working on migrating monolithic application to Azure/Container but its too unstable and unreliable.
I see lot of blockers running containers in windows.
I am going to hold off until all these basic issues are resolved.

@dbaltor
Copy link

dbaltor commented May 12, 2021

FWIW, run into the same error with dotnet/framework/aspnet:3.5 image when trying to restart IIS. As already said, the workaround was to downgrade to an old ServiceMonitor version found here.

@dbaltor
Copy link

dbaltor commented Jul 28, 2021

You need to download the old version and include it in your container when building the image using something like
COPY ServiceMonitor.exe / on your Dockerfile.

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

No branches or pull requests

10 participants