Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-8769

puppetlabs-chocolatey : SSL Errors are not reported in Puppet output



    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: chocolatey
    • Labels:
    • Environment:

      Windows 2012 and 2016

    • Template:
      MODULES Bug Template
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment


      Basic Info
      Module Version: 3.1.1
      Puppet Version: 6.3.0
      OS Name/Version: Windows Server 2012 and Windows Server 2016

      Describe your issue in as much detail as possible...

      Desired Behavior: 

      When installing Chocolatey on an initial run and there is an SSL error between client and server, the SSL error should be reported back in the Puppet logs. 

      Actual Behavior:

      Notice: /Stage[main]/Chocolatey::Install/Exec[install_chocolatey_official]/returns: Unable to apply redirection fix. Error: You cannot call a method on a null-valued expression.
      Notice: /Stage[main]/Chocolatey::Install/Exec[install_chocolatey_official]/returns: Downloading https://chocolatey.domain.tld/chocolatey.nupkg to C:\Users\ADMINI~1\AppData\Local\Temp\2\chocolatey\chocInstall\chocolatey.zip
      Notice: /Stage[main]/Chocolatey::Install/Exec[install_chocolatey_official]/returns: executed successfully (corrective)
      Error: /Stage[main]/rolesprofiles::Profile::Windows::antivirus/Package[antivirus]: Provider chocolatey is not functional on this host


      When i copy the script: https://raw.githubusercontent.com/puppetlabs/puppetlabs-chocolatey/master/templates/InstallChocolatey.ps1.erb

      And fill out the variables myself and run it in a PowerShell terminal on the host i see the following error:

      Unable to apply redirection fix. Error: You cannot call a method on a null-valued expression.
      Downloading https://chocolatey.domain.tld/chocolatey.nupkg to C:\Users\ADMINI~1\AppData\Local\Temp\2\chocolatey\chocInstall\chocolatey.zip
      Exception calling "DownloadFile" with "2" argument(s): "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."
      At line:93 char:3
      +   $downloader.DownloadFile($url, $file)
      +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
          + FullyQualifiedErrorId : WebException


      We do have `chocolatey::log_output: true` set, so the log data from the exec{} resource in https://github.com/puppetlabs/puppetlabs-chocolatey/blob/master/manifests/install.pp should be printing the exception.


      Without this error reporting, it is extremely difficult to debug why the Chocolatey package isn't installing and you only realize that it's failed when the next resource that uses Chocolatey (like package) executes and fails.




            Unassigned Unassigned
            nmaludy Nick Maludy
            0 Vote for this issue
            2 Start watching this issue



                Zendesk Support