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

sql: time zone name not recognized when running CockroachDB on windows #32415

Open
pungggi opened this issue Nov 16, 2018 · 15 comments

Comments

@pungggi
Copy link

commented Nov 16, 2018

Cannot connect to DB under Windows:
grafik

Other users have similar problem with founding timezone see> #31297 (comment)

Environment:

  • CockroachDB version [2.1]
  • Server OS: Windows 10 (for development)
  • Client app [DBeaver 5.2.4]
@pungggi

This comment has been minimized.

Copy link
Author

commented Nov 16, 2018

I now changed the settings on my machines to UTC, this works.. So the question is how can I properly change the timezone in crdb on windows?

@knz

This comment has been minimized.

Copy link
Member

commented Nov 17, 2018

@BramGruneir could you take a look at this and determine 1) if you can repro the issue 2) what do you think the cause is

(you don't need to actually solve the issue at this point - we just need a clear picture of what is going on)

@knz

This comment has been minimized.

Copy link
Member

commented Nov 21, 2018

@pungggi until we investigate this, could you consider running CockroachDB inside a Linux container/VM, and connect to it over the network from the Windows DBeaver?

@knz knz moved this from Triage to Backlog in (DEPRECATED) SQL Front-end, Lang & Semantics Nov 21, 2018

@pungggi

This comment has been minimized.

Copy link
Author

commented Nov 21, 2018

@knz I can actually run cockroach no problems there, just the connection to dbeaver is not working because I cannot change the timezone. But i will change the timezone of the machine to be aligned with the driver (UTC) and then reset again.

@thirtysixmm

This comment has been minimized.

Copy link

commented Dec 9, 2018

I am facing the same issue here when connecting from the Java program.

ERROR: invalid value for parameter "TimeZone": "Asia/Kolkata"
Detail: timezone data cannot be found

What is the correct TimeZone value?

@knz

This comment has been minimized.

Copy link
Member

commented Feb 4, 2019

The state of this is that the Go runtime system on Windows does not maintain the same timezone database as on other systems.

As a result the "name" timezones do not work on Windows.

To fix this would require a non-trivial investment in the way the CockroachDB binary is built on windows.

To work around:

  • run CockroachDB on a unix system, eg via a VM or container
  • use a numeric timezone, eg +07:00

@knz knz changed the title Connection to DBeaver on Windows / No timezone sql: time zone name not recognized when running CockroachDB on windows Feb 4, 2019

@bdarnell

This comment has been minimized.

Copy link
Member

commented Feb 13, 2019

This is an annoying trap in the go standard library: if the go toolchain is installed, it will use timezone data from that toolchain even on windows. This is why our testing on windows didn't uncover this, because we haven't done much testing on machines that didn't have go installed.

The place-name time zones are important (numeric time zones are not a substitute because they don't specify which DST rules to use), so I think we're going to have to embed a copy of the zoneinfo database into CRDB to address this.

@JAC2703

This comment has been minimized.

Copy link

commented Feb 25, 2019

I'm getting the same issue on v 2.1.5 running the server on Ununtu Linux, and the Java client (42.2.5) on a Windows box.

@bdarnell

This comment has been minimized.

Copy link
Member

commented Feb 25, 2019

@JAC2703 Do you have the tzdata package installed on the linux box? Which time zone are you trying to use?

@JAC2703

This comment has been minimized.

Copy link

commented Feb 25, 2019

@bdarnell tzdata was missing on one of the nodes which was likely what I was connecting to. Installing it fixed the issue. Can we update the pre-req's on the installation page to require this also? Thanks for the pointer.

apt install -y tzdata
@bdarnell

This comment has been minimized.

Copy link
Member

commented Feb 25, 2019

Yeah, we should document that. I thought tzdata was installed by default on ubuntu. Were you using a particular variant that was missing it?

@JAC2703

This comment has been minimized.

Copy link

commented Feb 25, 2019

I'm using a VPS variant (scaleway.com) that's likely stripped it out. If it's happened once though, I'm sure someone else will hit the same issue. It does, however, show up on the 18.04 manifest for server: http://releases.ubuntu.com/bionic/ubuntu-18.04.2-live-server-amd64.manifest

@jseldess jseldess added this to the 19.1 milestone Apr 4, 2019

@jseldess jseldess added the docs-done label Apr 4, 2019

jseldess added a commit to cockroachdb/docs that referenced this issue Apr 4, 2019
Document time zone limitation on Windows
Also update time zone dependency data more generally.

Addresses cockroachdb/cockroach#32415.
jseldess added a commit to cockroachdb/docs that referenced this issue Apr 4, 2019
Document time zone limitation on Windows
Also update time zone dependency data more generally.

Addresses cockroachdb/cockroach#32415.
jseldess added a commit to cockroachdb/docs that referenced this issue Apr 4, 2019
Document time zone limitation on Windows
Also update time zone dependency data more generally.

Addresses cockroachdb/cockroach#32415.
@knz

This comment has been minimized.

Copy link
Member

commented Apr 16, 2019

The discussion should continue on #36864.

@knz knz modified the milestones: 19.1, 19.2 Apr 16, 2019

@jordanlewis jordanlewis added this to Triage in SQL Execution Team Apr 23, 2019

@jordanlewis jordanlewis moved this from Triage to Lower priority backlog in SQL Execution Team May 6, 2019

@GuyFran

This comment has been minimized.

Copy link

commented May 24, 2019

Is there an update on this issue ? As much as possible I would like to run my cockroach cluster in Windows directly.

@knz

This comment has been minimized.

Copy link
Member

commented May 24, 2019

Time zone issues are only maybe 5% or less of the work needed to make CockroachDB production-ready on Windows.
FYI there is currently zero testing happening on Windows and we suspect that the performance profile will be rather different due to the way windows handles its filesystem buffer cache and memory allocation.
So yes we plan to improve the situation with time zones, but that will unfortunately not answer your need. If you want to run CockroachDB on windows today, your best bet will be a linux emulation via docker, vmware or similar. Or maybe windows 10 with linux services.

@kenliu kenliu added the O-community label Jul 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.