[chef] Re: Re: Re: RE: sql server 2008 silent installation


Chronological Thread 
  • From: Aditya Karanjkar < >
  • To: Indra k < >
  • Cc: " " < >
  • Subject: [chef] Re: Re: Re: RE: sql server 2008 silent installation
  • Date: Thu, 3 Jul 2014 11:42:10 -0700

Hi,

May not be related but I hit the similar (access denied) issues when installing any windows package that might need to install a .msu update as a part of the installation process. And as in your case, it runs perfectly when chef-client is triggered from an administrative command within the node itself. It might be related to the following issue:
http://support.microsoft.com/kb/2773898

I have hit this with SCCM client, SCEP client etc. It's a Windows limitation and Chef cannot do anything about it.

My workaround was to create a scheduled task scheduled to run 'once' and fire it off immediately. I don't think you can use the windows_task resource provided by the windows cookbook as it doesn't accept 'once' as a valid schedule. I used the execute resource with 'schtasks' to do the same. Give it a shot and let me know if it works for you:

Example:
execute "Task to install SCEP Client" do
        command "schtasks /create /f /sc once /st #{(::Time.now+1).strftime('%H:%M')} /tn Install_SCEP_Client /tr \"C:\\Windows\\Temp\\Client\\scepinstall.exe #{node['scep_client']['installer_options']}\" /RU #{node['scep_client']['sch_user']} /RP #{node['scep_client']['sch_pass']}"
        action :run
end
execute "Run SCEP Client installer task" do
        command "schtasks /run /i /tn Install_SCEP_Client"
        action :run
end

Best Regards,
Aditya


On Thu, Jul 3, 2014 at 2:10 AM, Indra k < " target="_blank"> > wrote:
hi,
        i have tried out  by creating a separate account with admin rights also in without admin rights still it shows "access denied"


     Inner exception type: System.Security.Cryptography.CryptographicException
            Message: 
                        Access is denied.
                        
Thanks,
Indra


Thanks for response,

                     Actually my sql server 2008 r2 standard edition cookbook is working fine when i run chef-client from a target node .

                       When i run this as 
knife winrm name:"WIN-DQ00DBBP3I1" 'chef-client' -x administrator -P "password" -a ipaddress

it shows a following error which i sent.

I think also same the problem is in permission,like when i run chef-client in administrator user.so i create another account without have admin rights ,again when i run chef-client from a command prompt not even workstation it shows pemission denied errror to c:/chef/cache


From: Kapil Shardha < >
To: Indra k < " target="_blank"> >; " " target="_blank"> " < " target="_blank"> >
Sent: Friday, 27 June 2014 5:26 PM
Subject: [chef] RE: sql server 2008 silent installation

Hi Indra,
 
I am not sure if I understand your statement :
 
As it runs and installs successfully from target machine but when i run this from workstation , it shows error’.
 
What do you mean by running it from workstation? From the SQL summary file, it looks like a permission issue. Please provide some more information on the specific scenario where you experience this issue.
 
-Kapil
 
From: Indra k [mailto: " target="_blank"> ]
Sent: Friday, June 27, 2014 3:19 AM
To: " target="_blank">
Subject: [chef] sql server 2008 silent installation
 
Hi
 
          I have done silent installation  for sql server 2008 r2 using cookbook in open source chef .
 
          As it runs and installs successfully from target machine but when i run this from workstation , it shows error
[2014-06-27T00:06:38-07:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: batch[sql install] (sqlstd::default line 80) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '-2068774911'
172.16.1.114 ---- Begin output of "cmd.exe" /c "C:/Users/ADMINI~1/AppData/Local/Temp/chef-script20140627-2648-1hfdy0h.bat" ----
172.16.1.114 STDOUT: C:\>"C:\Program Files\SQL SERVER 2008 R2\setup.exe"/ConfigurationFile="C:\Program Files (x86)\configuration.ini"
172.16.1.114 The following error occurred:
172.16.1.114 There was an error generating the XML document.
172.16.1.114
172.16.1.114 Error result: -2068774911
172.16.1.114 Result facility code: 1201
172.16.1.114 Result error code: 1
172.16.1.114
172.16.1.114 Please review the summary.txt log for further details
172.16.1.114 Microsoft (R) SQL Server 2008 R2 Setup 10.50.1600.01
172.16.1.114 Copyright (c) Microsoft Corporation.  All rights reserved.
172.16.1.114 STDERR:
172.16.1.114 ---- End output of "cmd.exe" /c "C:/Users/ADMINI~1/AppData/Local/Temp/chef-script20140627-2648-1hfdy0h.bat" ----
172.16.1.114 Ran "cmd.exe" /c "C:/Users/ADMINI~1/AppData/Local/Temp/chef-script20140627-2648-1hfdy0h.bat" returned -2068774911
 
AND MY summary.txt file is :
 
 
Overall summary:
  Final result:                  Failed: see details below
  Exit code (Decimal):           -2068774911
  Exit facility code:            1201
  Exit error code:               1
  Exit message:                  There was an error generating the XML document.
  Start time:                    2014-06-27 12:23:25
  End time:                      2014-06-27 12:23:37
  Requested action:              RunRules
 
Machine Properties:
  Machine name:                  WIN-DQ00DBBP3I1
  Machine processor count:       1
  OS version:                    Windows Server 2008 R2
  OS service pack:               Service Pack 1
  OS region:                     United States
  OS language:                   English (United States)
  OS architecture:               x64
  Process architecture:          32 Bit
  OS clustered:                  No
 
Package properties:
  Description:                   SQL Server Database Services 2008 R2
  ProductName:                   SQL Server 2008 R2
  Type:                          RTM
  Version:                       10
  SPLevel:                       0
  Installation location:         C:\Program Files\SQL SERVER 2008 R2\x86\setup\
  Installation edition:          DATA_CENTER
 
User Input Settings:
  ACTION:                        RunRules
  CONFIGURATIONFILE:             C:\Program Files (x86)\configuration.ini
  ENU:                           True
  FARMACCOUNT:                   <empty>
  FARMADMINPORT:                 0
  FARMPASSWORD:                  *****
  FEATURES:                      
  HELP:                          False
  IACCEPTSQLSERVERLICENSETERMS:  True
  INDICATEPROGRESS:              False
  INSTANCENAME:                  MSSQLSERVER
  PASSPHRASE:                    *****
  QUIET:                         False
  QUIETSIMPLE:                   True
  RULES:                         GlobalRules
  UIMODE:                        Normal
  X86:                           True
 
  Configuration file:            C:\Program Files (x86)\Microsoft SQL Server\100\Setup Bootstrap\Log\20140627_122318\ConfigurationFile.ini
 
Detailed results:
 
Rules with failures:
 
Global rules:
 
There are no scenario-specific rules.
 
Rules report file:               The rule result report file is not available.
 
Exception summary:
The following is an exception stack listing the exceptions in outermost to innermost order
Inner exceptions are being indented
 
Exception type: Microsoft.SqlServer.Chainer.Infrastructure.ChainerInfrastructureException
    Message: 
        There was an error generating the XML document.
    Data: 
      DisableWatson = true
    Stack: 
        at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache)
        at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(Object objectToSerialize)
        at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.SaveInputSettingValueToObject(InputSettingInfo inputSettingInfo, List`1 values)
        at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.SaveParsedArgumentsIntoInputSettingStore(InputSettingSource source, Dictionary`2 parsedArguments, Boolean chainerSetting, Boolean ignoreSettingsForNotAllowedScnearios)
        at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.ProcessConfigFile(String configFileFullPath, Boolean chainerSetting, Boolean ignoreSettingsForNotAllowedScnearios)
        at Microsoft.SqlServer.Configuration.BootstrapExtension.ProcessConfigFileArguments.ExecuteAction(String actionId)
        at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
        at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)
    Inner exception type: System.InvalidOperationException
        Message: 
                There was an error generating the XML document.
        Stack: 
                at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
                at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o, XmlSerializerNamespaces namespaces)
                at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o)
                at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache)
        Inner exception type: System.Security.Cryptography.CryptographicException
            Message: 
                        Access is denied.
                        
            Stack: 
                        at System.Security.Cryptography.ProtectedData.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope)
                        at Microsoft.SqlServer.Common.SqlSecureString.WriteXml(XmlWriter writer)
                        at System.Xml.Serialization.XmlSerializationWriter.WriteSerializable(IXmlSerializable serializable, String name, String ns, Boolean isNullable, Boolean wrapped)
                        at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSqlEngineSetupPublic.Write6_SqlEngineSetupPublic(String n, String ns, SqlEngineSetupPublic o, Boolean isNullable, Boolean needType)
                        at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSqlEngineSetupPublic.Write7_SqlEngineSetupPublic(Object o)
 








Archive powered by MHonArc 2.6.16.

§