Project

General

Profile

Actions

Bug #5768

closed

Document how to configure your timezone in rudder webapp

Added by Matthieu CERDA about 10 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
3
Assignee:
-
Category:
Documentation
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Small
Priority:
0
Name check:
Fix check:
Regression:

Description

On some JRE's (seen with at least the standard Oracle one, installed using the Linux x86_64 RPM on SLES11 SP1), Java uses a default timezone which is America/Los Angeles if no TZ variable is defined.

It completely f*cks up the "Last seen" date shown on the node details pane (they are shown relative the the JRE timezone)

From webapp logs:

[2014-11-12 17:13:48] INFO  application - registered property: user.country="US" 
[2014-11-12 17:13:48] INFO  application - registered property: user.language="en" 
[2014-11-12 17:13:48] INFO  application - registered property: user.timezone="America/Los Angeles" 

I suspect that system OpenJDK packages on other system set the default TZ without anything to do.

We should make sure that the timezone Java uses is the same as the system one, and change it accordingly.

I am not yet sure if it should be done on the packaging side (init scripts) or directly Rudder webapp side...

FAR, any advice ?

WORKAROUND

Edit /etc/default/rudder-jetty and add:

JAVA_OPTIONS="-Duser.timezone=Europe/Paris"


Related issues 2 (0 open2 closed)

Related to Rudder - User story #4708: Display time of reports in the web interface in the server timezoneResolvedActions
Related to Rudder - Bug #5653: rudder-jetty init script may fail on successReleasedBenoît PECCATTE2014-10-17Actions
Actions #1

Updated by Matthieu CERDA about 10 years ago

Note, workaround is to edit /opt/rudder/etc/rudder-jetty.conf and add:

JAVA_OPTIONS="$JAVA_OPTIONS
-Duser.timezone=Europe/Paris
-Duser.country=FR
-Duser.language=fr" 

Actions #2

Updated by Jonathan CLARKE about 10 years ago

This may well be related to #4708.

Actions #3

Updated by François ARMAND about 10 years ago

Humpf. My advice is that such JVM should be burned :(

More seriously, what we might do is to add a check when rudder start to get the system TZ and set it explicitly. Or it could be a parameter for the init script, that if let empty will look at the current timezone and use it (TZ env variable, or /etc/timezone - I think, but not sure what is standard and more preciselly what are the convention (not agreing with standard) for each distro).

Actions #4

Updated by Matthieu CERDA about 10 years ago

I think this is just something I'd love to do, related to #5653: Adding thing kind of detection would create yet another patch on jetty's init script that would likely break other things because of its size (offsetting has its limits).

Maybe this is the right occasion to just use our own Jetty init script ?

Also, I suggest editing the jetty init script to implement several detection methods for this :)
  • TZ env var
  • /etc/timezone
  • /etc/localtime symlink
  • ...
Actions #5

Updated by Janos Mattyasovszky about 8 years ago

Well, timezones are critical part of any system, that displays/deals with times (which does not?)...

You could have the system TZ set to UTC (as IT which has many all-around-the-globe Servers usually does) and only the per-user TZ set to the current local time of the user using it, so having it configurable via /etc/sysconfig/rudder or /etc/default/rudder-jetty would be very good in terms of basic usability

*Update:

It actually is configurable by setting JAVA_OPTIONS inside /etc/default/rudder-jetty, since the first does only append his stuff to this. Good to know.

I'd suggest to create a documentation of this in the installation section!

Actions #6

Updated by François ARMAND over 7 years ago

  • Subject changed from Rudder should verify that the timezone given by java matches the system one to Bad "last seen" time when the timezone given by java does not matches the system one
  • Severity set to Minor - inconvenience | misleading | easy workaround
  • User visibility set to Getting started - demo | first install | level 1 Techniques
  • Priority set to 0
Actions #7

Updated by Jonathan CLARKE over 7 years ago

  • Status changed from Discussion to New
Actions #8

Updated by Jonathan CLARKE over 7 years ago

  • Assignee deleted (François ARMAND)
Actions #9

Updated by Benoît PECCATTE over 7 years ago

  • Effort required set to Small
  • Priority changed from 0 to 45
Actions #10

Updated by Benoît PECCATTE about 7 years ago

  • Priority changed from 45 to 55
Actions #11

Updated by François ARMAND about 4 years ago

  • Description updated (diff)
  • Priority changed from 55 to 0
Actions #12

Updated by François ARMAND almost 3 years ago

  • Subject changed from Bad "last seen" time when the timezone given by java does not matches the system one to Document how to configure your timezone in rudder webapp
  • Category changed from Web - Nodes & inventories to Documentation
  • Status changed from New to Resolved

It was added in documentation since then (and it's also documented in /etc/default/rudder-jetty)

Actions

Also available in: Atom PDF