microsoft / IIS.ServiceMonitor

An entrypoint process for running IIS in Windows containers
MIT License
127 stars 39 forks source link

ServiceMonitor exits while executing appcmd configuration #4

Closed jamesmeneghello closed 6 years ago

jamesmeneghello commented 7 years ago

Docker image: microsoft/aspnet:4.6.2

Dockerfile:

FROM microsoft/aspnet:4.6.2
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

RUN Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord

COPY publish/localhost/ C:/inetpub/wwwroot/site
COPY web.config C:/inetpub/wwwroot/site/web.config
COPY web.config.root C:/inetpub/wwwroot/web.config

RUN New-WebApplication -Site 'Default Web Site' -Name 'site' -PhysicalPath 'C:\inetpub\wwwroot\site'

Running as part of docker-compose brings back the following:

web_1        | ERROR ( message:Cannot find requested collection element. )
web_1        | ERROR ( message:Malformed collection indexer; format is [@position,name='value',name2='value2',...].  The
 @position specifier is optional, and be '@start', '@end', or '@N' where N is a numeric index into the collection. )
web_1        |
web_1        |  Service 'w3svc' has been stopped
web_1        |
web_1        | APPCMD failed with error code 4312
web_1        |
web_1        | APPCMD failed with error code 13
web_1        |
web_1        | Failed to update IIS configuration
site_web_1 exited with code 2147500037

The error indicates it's coming from an appcmd set config call, which we're not making - so presumably it's part of ServiceMonitor. For whatever reason, if the container is run manually using docker, it seems to work fine.

shirhatti commented 7 years ago

@mcy94w ?

shirhatti commented 7 years ago

ping @mcy94w

andremarques023 commented 7 years ago

Same issue here. Any update on this?

bariscaglar commented 6 years ago

This is probably a dupe of an issue in IIS-Docker. @mcy94w will take a look.

mcy94w commented 6 years ago

The same issue is being discussed in this thread https://github.com/Microsoft/iis-docker/issues/47