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

Windows server core: Errors on installing IIS (due to unsupported features) #387

Open
ghost opened this issue Aug 11, 2017 · 15 comments
Open
Labels
Priority: Medium Will bring visible benefit to the project

Comments

@ghost
Copy link

ghost commented Aug 11, 2017

Cookbook version

4.1.0 (but this error will occur with all version)

Chef-client version

12.19.36

Platform Details

Windows Server 2016 Core

Scenario:

Installing IIS using the iis cookbook fails on server core machine during installation of the IIS-ASPNET, IIS-ManagementConsole and IIS-ManagementService features (not supported features in windows core https://docs.microsoft.com/en-us/iis/manage/working-with-server-core/iis-70-on-server-core)

Steps to Reproduce:

The mod_aspnet and mod_management recipes fail when the iis cookbook is run on a Windows 2016 Server Core machine

Expected Result:

The mod_aspnet and mod_management recipes are skipped and IIS is installed.

Actual Result:

Recipe: iis::mod_management
D      [WinRM] Waiting for output...
D      [WinRM] Processing output
         * windows_feature[IIS-ManagementConsole] action install

           ================================================================================
           Error executing action  install  on resource 'windows_feature[IIS-ManagementConsole]'
           ================================================================================

           Mixlib::ShellOut::ShellCommandFailed
           ------------------------------------
           Expected process to exit with [0, 42, 127, 3010], but received '50'
           ---- Begin output of C:\Windows\system32\dism.exe /online /enable-feature /featurename:IIS-ManagementConsole /norestart   ----
           STDOUT: Deployment Image Servicing and Management tool

           Version: 10.0.14393.0



           Image Version: 10.0.14393.0



           Enabling feature(s)


       [                           0.1%                           ]


       [                           1.1%                           ]


       [=                          2.1%                           ]


       [=                          3.1%                           ]


       [==                         4.1%                           ]


       [==                         5.1%                           ]


       [===                        6.1%                           ]


       [====                       7.1%                           ]


       [====                       8.1%                           ]


       [=====                      9.1%                           ]


       [=====                      10.0%                          ]


       [======                     11.0%                          ]


       [======                     12.0%                          ]


       [=======                    13.0%                          ]


       [========                   14.0%                          ]


       [========                   15.0%                          ]


       [=========                  16.0%                          ]


       [=========                  17.0%                          ]


       [==========                 18.0%                          ]


       [===========                19.0%                          ]


       [===========                20.0%                          ]


       [============               21.0%                          ]


       [============               22.0%                          ]


       [=============              23.0%                          ]


       [=============              24.0%                          ]


       [==============             25.0%                          ]


       [===============            26.0%                          ]


       [===============            27.0%                          ]


       [================           28.0%                          ]


       [================           29.0%                          ]


       [=================          30.0%                          ]


       [=================          31.0%                          ]


       [==================         32.0%                          ]


       [===================        33.0%                          ]


       [==========================100.0%==========================]



           Error: 50



           The operation is complete but IIS-ManagementConsole feature was not enabled.





           The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
           STDERR:
           ---- End output of C:\Windows\system32\dism.exe /online /enable-feature /featurename:IIS-ManagementConsole /norestart   ----
           Ran C:\Windows\system32\dism.exe /online /enable-feature /featurename:IIS-ManagementConsole /norestart   returned 50

           Resource Declaration:
           ---------------------
           # In C:/Users/ADMINI~1/AppData/Local/Temp/kitchen/cache/cookbooks/iis/recipes/mod_management.rb

            30:   windows_feature feature do
            31:     action :install
            32:   end
            33: end

           Compiled Resource:
           ------------------
           # Declared in C:/Users/ADMINI~1/AppData/Local/Temp/kitchen/cache/cookbooks/iis/recipes/mod_management.rb:30:in  block in from_file'

           windows_feature("IIS-ManagementConsole") do
             provider LWRP provider windows_feature_dism from cookbook windows
             action [:install]
             retries 0
             retry_delay 2
             default_guard_interpreter :default
             declared_type :windows_feature
             cookbook_name "iis"
             recipe_name "mod_management"
             feature_name "IIS-ManagementConsole"
           end

           Platform:
           ---------
           x64-mingw32


       Running handlers:
       [2017-08-11T13:58:43-07:00] ERROR: Running exception handlers
       Running handlers complete
       [2017-08-11T13:58:43-07:00] ERROR: Exception handlers complete
       Chef Client failed. 2 resources updated in 54 seconds
       [2017-08-11T13:58:43-07:00] FATAL: Stacktrace dumped to C:/Users/ADMINI~1/AppData/Local/Temp/kitchen/cache/chef-stacktrace.out
       [2017-08-11T13:58:43-07:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
       [2017-08-11T13:58:43-07:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: windows_feature[IIS-ManagementConsole] (iis::mod_management line 30) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0, 42, 127, 3010], but received '50'
       ---- Begin output of C:\Windows\system32\dism.exe /online /enable-feature /featurename:IIS-ManagementConsole /norestart   ----
       STDOUT: Deployment Image Servicing and Management tool
       Version: 10.0.14393.0

       Image Version: 10.0.14393.0

       Enabling feature(s)

       [                           0.1%                           ]

       [                           1.1%                           ]

       [=                          2.1%                           ]

       [=                          3.1%                           ]

       [==                         4.1%                           ]

       [==                         5.1%                           ]

       [===                        6.1%                           ]

       [====                       7.1%                           ]

       [====                       8.1%                           ]

       [=====                      9.1%                           ]

       [=====                      10.0%                          ]

       [======                     11.0%                          ]

       [======                     12.0%                          ]

       [=======                    13.0%                          ]

       [========                   14.0%                          ]

       [========                   15.0%                          ]

       [=========                  16.0%                          ]

       [=========                  17.0%                          ]

       [==========                 18.0%                          ]

       [===========                19.0%                          ]

       [===========                20.0%                          ]

       [============               21.0%                          ]

       [============               22.0%                          ]

       [=============              23.0%                          ]

       [=============              24.0%                          ]

       [==============             25.0%                          ]

       [===============            26.0%                          ]

       [===============            27.0%                          ]

       [================           28.0%                          ]

       [================           29.0%                          ]

       [=================          30.0%                          ]

       [=================          31.0%                          ]

       [==================         32.0%                          ]

       [===================        33.0%                          ]

       [==========================100.0%==========================]

       Error: 50

       The operation is complete but IIS-ManagementConsole feature was not enabled.


       The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
       STDERR:
       ---- End output of C:\Windows\system32\dism.exe /online /enable-feature /featurename:IIS-ManagementConsole /norestart   ----
       Ran C:\Windows\system32\dism.exe /online /enable-feature /featurename:IIS-ManagementConsole /norestart   returned 50`
`D      [WinRM] cleaning up command_id: 4892C5A4-F929-42EB-8EDF-529094AF016C on shell_id 11485FE4-8D88-4C73-A2A3-11BE7302B1F0
$$$$$$ chef-client.bat : C:/opscode/chef/embedded/lib/ruby/2.1.0/x64-mingw32/dl.so: warning: already initialized constant DL::RUBY_FREE
    + CategoryInfo          : NotSpecified: (C:/opscode/chef...t DL::RUBY_FREE:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
C:/opscode/chef/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-3.2.0/lib/net/ssh/authentication/pageant.rb:16: warning: previous definition of RUBY_FREE was here
$$$$$$ DL is deprecated, please use Fiddle
D      Cleaning up local sandbox in /tmp/pub-win-core-sandbox-20170811-3188-zfbcyu
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Converge failed on instance <pub-win-core>.  Please see .kitchen/logs/pub-win-core.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running  kitchen diagnose --all  for configuration
@ghost ghost changed the title Windows server core: Errors on installing some unsupported IIS features Windows server core: Errors on installing IIS (due to unsupported features) Aug 11, 2017
@EasyAsABC123
Copy link
Contributor

This is because there is no ui on server correct.

@ghost
Copy link
Author

ghost commented Aug 11, 2017

@EasyAsABC123 that is correct for the IIS-ManagementConsole, however IIS-ASPNET will fail as well as it is not supported by Core.

@EasyAsABC123
Copy link
Contributor

right, i have a fix for the IIS-ManagementConsole i believe...ASPNET i am still looking into, you aren't running a Nano Server right?

@EasyAsABC123
Copy link
Contributor

because this says you can install IIS-ASPNET on the server

@EasyAsABC123
Copy link
Contributor

Should be resolved in #388 if you want to test it

@ghost
Copy link
Author

ghost commented Aug 14, 2017

@EasyAsABC123 thanks for the quick response, however the change will not work. I tried manually installing the IIS-ASPNET, IIS-ManagementService features and it failed confirming that it is not supported in Windows Core. screenshot below

image

@EasyAsABC123
Copy link
Contributor

k, yeah Core isn't supported in the current version this is just a quick attempt to get it working for you.

I'm in Europe on Holiday for another 7 days but i might do some work on this on the planes or trains i'll be riding. The issue being I don't have a Windows Core server to test with on me and the internet in europe thus far has been much much below sub-par.

So consider this in-progress but delayed.

@EasyAsABC123
Copy link
Contributor

@prajaktk if you could run https://technet.microsoft.com/en-us/library/jj574158(v=ws.11).aspx#Anchor_0 the Get Features command and then post it here or link it to me.

@joshoohaah
Copy link

FYI. this will still happen on 2012 and 2016 if the image has some Windows updates (2966827 or
2966828) installed on it. This hotfix (https://support.microsoft.com/en-us/help/3005628/update-for-the--net-framework-3-5-on-windows-8--windows-8-1--windows-s ) solves that problem and allows Netfx3 to install so these other components can install. I wonder if there is value in adding this check to the cookbook?

@EasyAsABC123
Copy link
Contributor

You mean on core versions?

@joshoohaah
Copy link

standard as well

@EasyAsABC123
Copy link
Contributor

So if I uninstall this hotrod I should experience this issue in the kitchen tests?

@EasyAsABC123 EasyAsABC123 removed their assignment Oct 14, 2017
@EasyAsABC123
Copy link
Contributor

@prajaktk @joshoohaah k so just to make sure i can recap, we need to check that a hotfix is installed, also need to test this on core server.

@Dave3of5
Copy link

Is this fixed I'm running into this same issue ?

@EasyAsABC123
Copy link
Contributor

@Dave3of5 no it isn't, it is still an open issue. I don't have a copy of windows core, the information i need is

@prajaktk if you could run https://technet.microsoft.com/en-us/library/jj574158(v=ws.11).aspx#Anchor_0 the Get Features command and then post it here or link it to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium Will bring visible benefit to the project
Projects
None yet
Development

No branches or pull requests

5 participants