cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.11k stars 3.81k forks source link

Windows install steps do not appear to work for 20.2.0-alpha.2 #53327

Open rmloveland opened 4 years ago

rmloveland commented 4 years ago

Following the instructions to Install CockroachDB on Windows on a Windows laptop:

  1. Download the alpha.2 binary currently linked above
  2. Download zoneinfo.zip
  3. Set the ZONEINFO env var on Windows (I did this at the "user" level and later tried at the "system" level)
  4. CockroachDB does not see the zip file pointed to by ZONEINFO even though I have confirmed (via PowerShell commands below) that (a) the file exists, and (b) it is pointed to by the ZONEINFO variable

(The Powershell session pasted below also checks my specific Windows 10 version, since the laptop just updated recently. I have no idea if that matters here or not.)

 Get-ChildItem Env: | grep.exe 'ZONE'
ZONEINFO                       C:\Users\rml\Programs\cockroachdb-spatial-win32\zoneinfo\zoneinfo.zip
PS C:\Users\rml\Programs\cockroachdb-win32> Test-Path -Path C:\Users\rml\Programs\cockroachdb-spatial-win32\zoneinfo\zoneinfo.zip
True
PS C:\Users\rml\Programs\cockroachdb-win32> .\cockroach.exe demo
E200821 16:15:21.362662 1 cli/start.go:1116  timeutil.LoadLocation: timezone data cannot be found
ERROR: unable to load named timezones
HINT: See: https://go.crdb.dev/issue/36864
--
Check that the time zone database is installed on your system, or
set the ZONEINFO environment variable to a Go time zone .zip archive.
Failed running "demo"
PS C:\Users\rml\Programs\cockroachdb-win32> [System.Environment]::OSVersion.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      19041  0

See also:

Jira issue: CRDB-6305

otan commented 4 years ago

cc @knz -- should there be a docs FAQ page in resolving these issues?

(if testing geospatial, i think you can set COCKROACH_INCONSISTENT_TIME_ZONES=true as an environment variable temporarily).

knz commented 4 years ago

cc @knz -- should there be a docs FAQ page in resolving these issues?

This is a regression.

(if testing geospatial, i think you can set COCKROACH_INCONSISTENT_TIME_ZONES=true as an environment variable temporarily).

I think that's not applicable. windows remains unsupported for geospatial since there's no dll support?

otan commented 4 years ago

I think that's not applicable. windows remains unsupported for geospatial since there's no dll support?

the DLLs are there, haven't been able to test yet because I haven't had time to grab a windows VM.

knz commented 4 years ago

@otan @rmloveland sorry I can't be of help right now, but the way to troubleshoot this is to remove this condition from pkg/util/timeutil/zoneinfo.go:

        if err != nil && strings.Contains(err.Error(), "zoneinfo.zip") {
                err = errTZDataNotFound
        }

(otherwise the code masks the exact cause of the problem)

And then inspect the error reported on windows for more details. Only when we know exactly what's wrong, can we expect to fix it.

knz commented 4 years ago

Alternatively, try renaming your .zip file to somethingelse.zip (i.e. not "zoneinfo.zip"), then point the ZONEINFO env var to that

then try again

it should bypass the condition above

blathers-crl[bot] commented 4 years ago

Hi @rmloveland, please add a C-ategory label to your issue. Check out the label system docs.

While you're here, please consider adding an A- label to help keep our repository tidy.

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

gliptak commented 4 years ago

This still fails using v20.1.6

.\cockroach.exe version
Build Tag:    v20.1.6
Build Time:   2020/09/24 18:28:05
Distribution: CCL
Platform:     windows amd64 (x86_64-w64-mingw32)
Go Version:   go1.13.9
C Compiler:   gcc 6.3.0
Build SHA-1:  be8c0a720e98a147263424cc13fc9bfc75f46013
Build Type:   release

Workaround from above helped

set COCKROACH_INCONSISTENT_TIME_ZONES=true
knz commented 3 years ago

@otan I think your change fixed this issue right? If so feel free to close this.