Skip to content
Donner's Daily Dose of Drama
Donner's Daily Dose of Drama
  • The Good
    • Blogging
    • Consumer Protection
    • Environment
    • Ethics
    • Geek’s Home
    • Lisa Lanett
    • Medfield
    • Music
    • Parenting and Technology
    • Travel
    • wow
  • The Bad
    • Business
    • Ebay
    • Investment
    • Job search
    • Personal Finance
    • Politics
  • The Ugly
    • Information Technology
      • Business Intelligence
      • Content Management
      • Free Software
      • I18N and L10N
      • Java
      • Open Source
      • Mobile Devices
      • Open Source Business Intelligence
      • OSBI
      • SDA
      • Security
      • Smartphone
      • Software Best Practices
      • Software Engineering
      • SQL Server
      • Streaming Media
      • Web
    • Austria
    • Fiction
    • Hardware
    • iPod
    • Miscellaneous
    • Uncategorized
    • Video
    • Weekend Warrior
Donner's Daily Dose of Drama

PWM and MySql connector timezone errors

Christian Donner, March 26, 2019June 27, 2019

We use Office 365 with directory synchronization from an on-prem AD server to the Azure directory. Users whose accounts are synchronized to the cloud cannot change their password in the cloud – only locally in the domain. This has been a problem for Mac users.
For self-service password reset of our Mac users in an Active Directory domain, I deployed the PWM Project on a Turnkey Debian VM. This has been working well, until I recently noticed these errors upon logging into the portal:

5051 ERROR_DB_UNAVAILABLE (unable to initialize database: exception initializing database service: 
5051 ERROR_DB_UNAVAILABLE (error connecting to database: java.sql.SQLException: The server time zone value 'EDT' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support., cause:com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value 'EDT' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.)))

It turns out that this is a bug in the MySQL JDBC driver. I installed version 8.0.13 (mysql-connector-java-8.0.13.jar). I found some suggestions in a Stackoverflow post, but how to fix it in this WAR file distribution package, without rebuilding it from source code?

Here is how. When the application is deployed on a Tomcat server,
you will find the file PwmConfiguration.xml in the folder /home/tomcat8/pwm-data. Open this file in your favorite editor and find the section that contains the text: setting key=”db.url”. Change it by adding the timezone parameters to the connection string:

<setting key="db.url" syntax="STRING" syntaxVersion="0" modifyTime="2018-12-03T04:05:42Z">^M
  <label>Database Connection String</label>^M
  <value><![CDATA[jdbc:mysql://localhost/pwm?&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC]]></value>^M
</setting>

This took care of the error, and after restarting Tomcat, I was able to log in and change my password again.

Related Posts:

  • OpenVPN
  • My USPS Certified Mail Experience Explained
  • The Voip.ms SMS Integration for Home Assistant
  • Computer Build 2025
  • TyreWiz not working after battery change

Miscellaneous

Post navigation

Previous post
Next post

Leave a Reply

Your email address will not be published. Required fields are marked *

Pages

  • About
  • Awards
    • TechnoLawyer
  • Contact Christian Donner
  • Project Portfolio
  • Publications
  • Speaking Engagements

Recent Comments

  • Christian Donner on Sealing a leaky cast-iron fireplace chimney damper
  • Eric on Sealing a leaky cast-iron fireplace chimney damper
  • Christian Donner on Contact Christian Donner
  • Max on Contact Christian Donner
  • Christian Donner on Contact Christian Donner

Tags

AHCI Amazon Android ASP.Net AT&T Droid Drupal email Error failure featured firmware Garmin Godaddy Google honda Internet Explorer 8 iPhone Lenovo Lisa Lanett Modules NAS Nexus One Paypal Performance Privacy QNAP raid RS-407 sauna Security spam SQL SR3600 Synology T-Mobile T430s transmission tylö Verizon Virus VMWare Windows 7 windows 8.1 Windows Mobile
  • About
  • Awards
    • TechnoLawyer
  • Contact Christian Donner
  • Project Portfolio
  • Publications
  • Speaking Engagements
©2025 Donner's Daily Dose of Drama | WordPress Theme by SuperbThemes