mkevenaar / chocolatey-packages

My chocolatey packages
https://mkevenaar.github.io/chocolatey-packages/
Apache License 2.0
42 stars 70 forks source link

MariaDB chocolatey install fails. URL doesn't exist or is unauthorized or forbidden. #12

Closed Stahlreck closed 5 years ago

Stahlreck commented 5 years ago

Hey @mkevenaar ,

You asked me on Disqus to create an issue if the problem persists. I hope I got it right with the debug logging. Tried to install MariaDB again with PowerShell and CMD both in Admin mode, but the installation just doesn't want to get through. It says the URL can't be reached even though when I copy it to the browser there is no problem downloading the MariaDB.exe

Anyway, here's everything from the console. Maybe you have some clue what might be causing this.

Chocolatey v0.10.11
Chocolatey is running on Windows v 10.0.17763.0
Command line: "C:\ProgramData\chocolatey\choco.exe" install mariadb --debug
Received arguments: install mariadb --debug
The source 'https://chocolatey.org/api/v2/' evaluated to a 'normal' source type

NOTE: Hiding sensitive configuration data! Please double and triple
 check to be sure no sensitive data is shown, especially if copying
 output to a gist for review.
Configuration: CommandName='install'|
CacheLocation='C:\Users\Samuel\AppData\Local\Temp\chocolatey'|
ContainsLegacyPackageInstalls='True'|
CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'|
Sources='https://chocolatey.org/api/v2/'|SourceType='normal'|
Debug='True'|Verbose='False'|Trace='False'|Force='False'|Noop='False'|
HelpRequested='False'|UnsuccessfulParsing='False'|RegularOutput='True'|
QuietOutput='False'|PromptForConfirmation='True'|AcceptLicense='False'|
AllowUnofficialBuild='False'|Input='mariadb'|AllVersions='False'|
SkipPackageInstallProvider='False'|PackageNames='mariadb'|
Prerelease='False'|ForceX86='False'|OverrideArguments='False'|
NotSilent='False'|ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
AllowMultipleVersions='False'|AllowDowngrade='False'|
ForceDependencies='False'|Information.PlatformType='Windows'|
Information.PlatformVersion='10.0.17763.0'|
Information.PlatformName='Windows Server 2016'|
Information.ChocolateyVersion='0.10.11.0'|
Information.ChocolateyProductVersion='0.10.11'|
Information.FullName='choco, Version=0.10.11.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|

Information.Is64BitOperatingSystem='True'|
Information.Is64BitProcess='True'|Information.IsInteractive='True'|
Information.UserName='xxxx'|
Information.UserDomainName='xxxx'|
Information.IsUserAdministrator='True'|
Information.IsUserSystemAccount='False'|
Information.IsUserRemoteDesktop='False'|
Information.IsUserRemote='True'|
Information.IsProcessElevated='True'|
Information.IsLicensedVersion='False'|Information.LicenseType='Foss'|
Features.AutoUninstaller='True'|Features.ChecksumFiles='True'|
Features.AllowEmptyChecksums='False'|
Features.AllowEmptyChecksumsSecure='True'|
Features.FailOnAutoUninstaller='False'|
Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'|
Features.VirusCheck='False'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|
Features.UseFipsCompliantChecksums='False'|
Features.ShowNonElevatedWarnings='True'|
Features.ShowDownloadProgress='True'|
Features.StopOnFirstPackageFailure='False'|
Features.UseRememberedArgumentsForUpgrades='False'|
Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'|
Features.RemovePackageInformationOnUninstall='False'|
Features.ScriptsCheckLastExitCode='False'|
ListCommand.LocalOnly='False'|
ListCommand.IdOnly='False'|ListCommand.IncludeRegistryPrograms='False'|
ListCommand.PageSize='25'|ListCommand.Exact='False'|
ListCommand.ByIdOnly='False'|ListCommand.ByTagOnly='False'|
ListCommand.IdStartsWith='False'|ListCommand.OrderByPopularity='False'|
ListCommand.ApprovedOnly='False'|
ListCommand.DownloadCacheAvailable='False'|
ListCommand.NotBroken='False'|
ListCommand.IncludeVersionOverrides='False'|
UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
UpgradeCommand.ExcludePrerelease='False'|
NewCommand.AutomaticPackage='False'|
NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'|
SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'|
SourceCommand.AllowSelfService='False'|
SourceCommand.VisibleToAdminsOnly='False'|
FeatureCommand.Command='unknown'|ConfigCommand.Command='unknown'|
PinCommand.Command='unknown'|OutdatedCommand.IgnorePinned='False'|
Proxy.BypassOnLocal='True'|
_ Chocolatey:ChocolateyInstallCommand - Normal Run Mode _
Installing the following packages:
mariadb
By installing you accept licenses for the packages.
Progress: Downloading mariadb 10.3.13... 100%
[NuGet] Added file 'chocolateyInstall.ps1' to folder 'mariadb.install\tools'.
[NuGet] Added file 'chocolateyUninstall.ps1' to folder 'mariadb.install\tools'.
[NuGet] Added file 'Uninstall-ChocolateyPath.psm1' to folder 'mariadb.install\tools'.
[NuGet] Added file 'mariadb.install.nuspec' to folder 'mariadb.install'.
[NuGet] Added file 'mariadb.install.nupkg' to folder 'mariadb.install'.

mariadb.install v10.3.13 [Approved]
mariadb.install package files install completed. Performing other installation steps.
Contents of 'C:\ProgramData\chocolatey\lib\mariadb.install\tools\chocolateyInstall.ps1':
$ErrorActionPreference = 'Stop';

$toolsDir       = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url32          = 'https://downloads.mariadb.org/f/mariadb-10.3.13/win32-packages/mariadb-10.3.13-win32.msi'
$checksum32     = 'af23820183a379b45f6d9b9a2ba2b3dd8822fddf97b2ea8ee88936fc2ef466df'
$checksumType32 = 'sha256'
$url64          = 'https://downloads.mariadb.org/f/mariadb-10.3.13/winx64-packages/mariadb-10.3.13-winx64.msi'
$checksum64     = '6b750c22f385057c91687fa33d139c7df95270164e1ff588980422c128fc122d'
$checksumType64 = 'sha256'

$packageArgs = @{
  packageName    = $env:ChocolateyPackageName
  unzipLocation  = $toolsDir
  fileType       = 'msi'
  url           = $url32
  checksum      = $checksum32
  checksumType  = $checksumType32
  url64bit      = $url64
  checksum64    = $checksum64
  checksumType64= $checksumType64
  softwareName   = 'MariaDB *'
  silentArgs     = "SERVICENAME=MySQL /qn /norestart /l*v `"$($env:TEMP)\$($packageName).$($env:chocolateyPackageVersion).MsiInstall.log`""
  validExitCodes = @(0,3010)
}

Write-Verbose "Downloading and installing program..."
Install-ChocolateyPackage @packageArgs

Write-Verbose "Querying registry for install location..."
$packageSearch = "MariaDB *"
$regKey = Get-ItemProperty -Path @('HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*',
                                   'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*',
                                   'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*') `
                           -ErrorAction:SilentlyContinue `
          | Where-Object {$_.DisplayName -like $packageSearch}

Write-Verbose "Adding MariaDB bin directory to path environment variable..."
$binPath = Join-Path $regKey.InstallLocation[0] "bin"
if ($binPath) {
  Install-ChocolateyPath $binPath 'Machine'

  Write-Verbose "Starting service..."
  Start-Process -FilePath "NET" `
                -ArgumentList 'START MySQL' `
                -Wait `
                -NoNewWindow
}

The package mariadb.install wants to run 'chocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[N]o/[P]rint): y

Calling built-in PowerShell host with ['[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\mariadb.install\tools\chocolateyInstall.ps1' -installArguments '' -packageParameters ''']
Host version is 5.1.17763.1, PowerShell Version is '5.1.17763.316' and CLR Version is '4.0.30319.42000'.
Loading community extensions
Importing 'C:\ProgramData\chocolatey\extensions\chocolatey-core\chocolatey-core.psm1'
Importing 'C:\ProgramData\chocolatey\extensions\chocolatey-windowsupdate\chocolatey-windowsupdate.psm1'
Running 'ChocolateyScriptRunner' for mariadb.install v10.3.13 with packageScript 'C:\ProgramData\chocolatey\lib\mariadb.install\tools\chocolateyInstall.ps1', packageFolder:'C:\ProgramData\chocolatey\lib\mariadb.install', installArguments: '', packageParameters: '',
Running 'C:\ProgramData\chocolatey\lib\mariadb.install\tools\chocolateyInstall.ps1'
Running Install-ChocolateyPackage -url 'https://downloads.mariadb.org/f/mariadb-10.3.13/win32-packages/mariadb-10.3.13-win32.msi' -url64bit 'https://downloads.mariadb.org/f/mariadb-10.3.13/winx64-packages/mariadb-10.3.13-winx64.msi' -checksum 'af23820183a379b45f6d9b9a2ba2b3dd8822fddf97b2ea8ee88936fc2ef466df' -checksum64 '6b750c22f385057c91687fa33d139c7df95270164e1ff588980422c128fc122d' -silentArgs 'SERVICENAME=MySQL /qn /norestart /l*v "C:\Users\Samuel\AppData\Local\Temp\chocolatey\mariadb.install.10.3.13.MsiInstall.log"' -packageName 'mariadb.install' -checksumType 'sha256' -fileType 'msi' -validExitCodes '0 3010' -checksumType64 'sha256'
Running Get-ChocolateyWebFile -packageName 'mariadb.install' -fileFullPath 'C:\Users\Samuel\AppData\Local\Temp\chocolatey\mariadb.install\10.3.13\mariadb.installInstall.msi' -url 'https://downloads.mariadb.org/f/mariadb-10.3.13/win32-packages/mariadb-10.3.13-win32.msi' -url64bit 'https://downloads.mariadb.org/f/mariadb-10.3.13/winx64-packages/mariadb-10.3.13-winx64.msi' -checksum 'af23820183a379b45f6d9b9a2ba2b3dd8822fddf97b2ea8ee88936fc2ef466df' -checksumType 'sha256' -checksum64 '6b750c22f385057c91687fa33d139c7df95270164e1ff588980422c128fc122d' -checksumType64 'sha256' -options 'System.Collections.Hashtable' -getOriginalFileName 'True'
Running Get-ProcessorBits -compare '64'
CPU is 64 bit
Setting url to 'https://downloads.mariadb.org/f/mariadb-10.3.13/winx64-packages/mariadb-10.3.13-winx64.msi' and bitPackage to 64
Running Get-WebFileName -url 'https://downloads.mariadb.org/f/mariadb-10.3.13/winx64-packages/mariadb-10.3.13-winx64.msi' -defaultName 'mariadb.installInstall.msi'
Url request/response failed - file name will be 'mariadb.installInstall.msi':  Exception calling "GetResponse" with "0" argument(s): "The request was aborted: Could not create SSL/TLS secure channel."
Running Get-WebHeaders -url 'https://downloads.mariadb.org/f/mariadb-10.3.13/winx64-packages/mariadb-10.3.13-winx64.msi' -ErrorAction 'Stop'
Setting the UserAgent to 'chocolatey command line'
Request Headers:
  'Accept':'*/*'
  'User-Agent':'chocolatey command line'
Attempt to get headers for https://downloads.mariadb.org/f/mariadb-10.3.13/winx64-packages/mariadb-10.3.13-winx64.msi failed.
  The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://downloads.mariadb.org/f/mariadb-10.3.13/winx64-packages/mariadb-10.3.13-winx64.msi'. Exception calling "GetResponse" with "0" argument(s): "The request was aborted: Could not create SSL/TLS secure channel."
Downloading mariadb.install 64 bit
  from 'https://downloads.mariadb.org/f/mariadb-10.3.13/winx64-packages/mariadb-10.3.13-winx64.msi'
Running Get-WebFile -url 'https://downloads.mariadb.org/f/mariadb-10.3.13/winx64-packages/mariadb-10.3.13-winx64.msi' -fileName 'C:\Users\Samuel\AppData\Local\Temp\chocolatey\mariadb.install\10.3.13\mariadb.installInstall.msi' -options 'System.Collections.Hashtable'
Setting request timeout to  30000
Setting read/write timeout to  2700000
Setting the UserAgent to 'chocolatey command line'
ERROR: The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://downloads.mariadb.org/f/mariadb-10.3.13/winx64-packages/mariadb-10.3.13-winx64.msi'. Exception calling "GetResponse" with "0" argument(s): "The request was aborted: Could not create SSL/TLS secure channel."
 at Get-WebFile, C:\ProgramData\chocolatey\helpers\functions\Get-WebFile.ps1: line 331
at Get-ChocolateyWebFile, C:\ProgramData\chocolatey\helpers\functions\Get-ChocolateyWebFile.ps1: line 345
at Install-ChocolateyPackage, C:\ProgramData\chocolatey\helpers\functions\Install-ChocolateyPackage.ps1: line 324
at <ScriptBlock>, C:\ProgramData\chocolatey\lib\mariadb.install\tools\chocolateyInstall.ps1: line 27
at <ScriptBlock>, C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1: line 48
at <ScriptBlock>, <No file>: line 1
Built-in PowerShell host called with ['[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\mariadb.install\tools\chocolateyInstall.ps1' -installArguments '' -packageParameters '''] exited with '404'.
Calling command ['"C:\WINDOWS\System32\shutdown.exe" /a']
Command ['"C:\WINDOWS\System32\shutdown.exe" /a'] exited with '1116'
Capturing package files in 'C:\ProgramData\chocolatey\lib\mariadb.install'
The install of mariadb.install was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\mariadb.install\tools\chocolateyInstall.ps1'.
 See log for details.
[NuGet] Added file 'mariadb.nuspec' to folder 'mariadb'.
[NuGet] Added file 'mariadb.nupkg' to folder 'mariadb'.

mariadb v10.3.13 [Approved]
mariadb package files install completed. Performing other installation steps.
Capturing package files in 'C:\ProgramData\chocolatey\lib\mariadb'
There was no original file at 'C:\ProgramData\chocolatey\.chocolatey\mariadb.10.3.13\.files'
 The install of mariadb was successful.
  Software installed to 'C:\tools\mariadb'

Chocolatey installed 1/2 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - mariadb.install (exited 404) - Error while running 'C:\ProgramData\chocolatey\lib\mariadb.install\tools\chocolateyInstall.ps1'.
 See log for details.
Exiting with 404
mkevenaar commented 5 years ago

Hi @Stahlreck Thanks for opening this. This is part of the improvement of #7

I am going to embed the MariaDB software, as it is allowed and that should resolve the 404 that you are having.

This will take a couple of days before this is approved.

Stahlreck commented 5 years ago

Sure take your time. Tanks for the effort :)