The version 2022b of the tzdata breaks code with "No time-zone data files registered"
Closed this issue · 7 comments
When using the 2022b tzdata and setting zonesFilter the generated zonedb.java.tzdb is empty without zone data causing the error "No time-zone data files registered". If zonesFilter is not set then the error becomes "Unknown time-zone ID: Europe/Lisbon".
This fixes it:
dbVersion := TzdbPlugin.Version("2022a"),
This seems odd, maybe the format of tzdb has changed?
Ok I can confirm 2022b format is different and will need changes to the parser
The same happens with 2022c which was released today.
FWIW Getting the same thing after doing a clean and pulling down the latest today.
According to the download it's 2022g. Though something doesn't make sense as according to the last-modified, these files haven't changed since 2022:
-rw-r--r-- 1 MHughe008 staff 212K Nov 29 11:59 NEWS
-rw-r--r-- 1 MHughe008 staff 158K Nov 29 11:51 northamerica
-rw-r--r-- 1 MHughe008 staff 19K Nov 29 11:51 zone.tab
-rw-r--r-- 1 MHughe008 staff 17K Nov 29 11:51 zone1970.tab
-rw-r--r-- 1 MHughe008 staff 166K Nov 28 21:19 europe
-rw-r--r-- 1 MHughe008 staff 70K Nov 28 15:21 backzone
-rw-r--r-- 1 MHughe008 staff 175K Nov 23 12:31 asia
-rw-r--r-- 1 MHughe008 staff 47K Nov 21 13:32 Makefile
-rw-r--r-- 1 MHughe008 staff 4.4K Nov 18 14:06 iso3166.tab
-rw-r--r-- 1 MHughe008 staff 89K Nov 12 13:44 southamerica
-rw-r--r-- 1 MHughe008 staff 11K Nov 6 16:43 backward
-rw-r--r-- 1 MHughe008 staff 61K Oct 29 23:56 africa
-rw-r--r-- 1 MHughe008 staff 61K Oct 29 00:02 theory.html
-rw-r--r-- 1 MHughe008 staff 96K Oct 27 12:51 australasia
-rw-r--r-- 1 MHughe008 staff 12K Oct 26 00:07 ziguard.awk
-rw-r--r-- 1 MHughe008 staff 1.6K Oct 24 02:07 checklinks.awk
-rw-r--r-- 1 MHughe008 staff 11K Oct 17 14:56 antarctica
-rw-r--r-- 1 MHughe008 staff 2.9K Oct 17 14:56 etcetera
-rw-r--r-- 1 MHughe008 staff 8.8K Aug 3 2022 zishrink.awk
-rw-r--r-- 1 MHughe008 staff 3.3K Jul 27 2022 leapseconds
-rw-r--r-- 1 MHughe008 staff 8.7K Jul 27 2022 leapseconds.awk
-rw-r--r-- 1 MHughe008 staff 10K Jul 25 2022 leap-seconds.list
-rw-r--r-- 1 MHughe008 staff 5.4K Mar 31 2022 calendars
-rw-r--r-- 1 MHughe008 staff 3.2K Dec 14 2021 CONTRIBUTING
-rw-r--r-- 1 MHughe008 staff 2.4K Dec 14 2021 README
-rw-r--r-- 1 MHughe008 staff 4.4K Sep 20 2021 checktab.awk
-rw-r--r-- 1 MHughe008 staff 773B Apr 20 2021 SECURITY
-rw-r--r-- 1 MHughe008 staff 404B Jun 17 2019 factory
-rw-r--r-- 1 MHughe008 staff 252B May 25 2017 LICENSE
so I'm not sure why this would start failing today. Does anyone have a strategy for checking this file into their build so this happens at a designated time rather than just at clean/publish?
The plugin tries to cache the tzdb files, maybe you're getting a cached version of the files?
@cquiroz I don't know. When I query through curl sometimes I get an https redirect, sometimes I don't. But I never get an SSL error from curl (not using -k). This is after a clean:
sbt:onyx-client> tzdbCodeGen
[info] tzdb data missing. downloading latest version to /Users/MHughe008/work/vise/onyx-prs/client/target/scala-3.2.2/resource_managed/main/tzdb...
[info] downloading from http://www.iana.org/time-zones/repository/tzdata-latest.tar.gz
[info] to file /Users/MHughe008/work/vise/onyx-prs/client/target/scala-3.2.2/resource_managed/main/tzdb.tar.gz
[error] stack trace is suppressed; run last tzdbCodeGen for the full output
[error] (tzdbCodeGen) javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[error] Total time: 0 s, completed Mar 23, 2023, 2:53:09 PM
sbt:onyx-client> last tzdbCodeGen
[info] tzdb data missing. downloading latest version to /Users/MHughe008/work/vise/onyx-prs/client/target/scala-3.2.2/resource_managed/main/tzdb...
[info] downloading from http://www.iana.org/time-zones/repository/tzdata-latest.tar.gz
[info] to file /Users/MHughe008/work/vise/onyx-prs/client/target/scala-3.2.2/resource_managed/main/tzdb.tar.gz
[error] javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[error] at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:130)
[error] at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:371)
[error] at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:314)
[error] at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:309)
[error] at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:654)
[error] at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:473)
[error] at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:369)
[error] at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:396)
[error] at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:480)
[error] at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:458)
[error] at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:201)
[error] at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
[error] at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1510)
[error] at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1425)
[error] at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
[error] at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
[error] at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:336)
[error] at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:300)
[error] at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:185)
[error] at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
[error] at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
[error] at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
[error] at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169)
[error] at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
[error] at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
[error] at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
[error] at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
[error] at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:221)
[error] at okhttp3.RealCall$AsyncCall.execute(RealCall.java:172)
[error] at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[error] at java.base/java.lang.Thread.run(Thread.java:1589)
[error] at apply @ io.github.sbt.tzdb.IOTasks$.download(IOTasks.scala:126)
[error] at flatMap @ io.github.sbt.tzdb.IOTasks$.$anonfun$downloadTZDB$11(IOTasks.scala:31)
[error] at apply @ io.github.sbt.tzdb.IOTasks$.$anonfun$downloadTZDB$9(IOTasks.scala:30)
[error] at flatMap @ io.github.sbt.tzdb.IOTasks$.$anonfun$downloadTZDB$9(IOTasks.scala:30)
[error] at apply @ io.github.sbt.tzdb.IOTasks$.$anonfun$downloadTZDB$6(IOTasks.scala:29)
[error] at flatMap @ io.github.sbt.tzdb.IOTasks$.$anonfun$downloadTZDB$6(IOTasks.scala:29)
[error] at apply @ io.github.sbt.tzdb.IOTasks$.$anonfun$downloadTZDB$3(IOTasks.scala:28)
[error] at flatMap @ io.github.sbt.tzdb.IOTasks$.$anonfun$downloadTZDB$3(IOTasks.scala:28)
[error] at apply @ io.github.sbt.tzdb.IOTasks$.downloadTZDB(IOTasks.scala:26)
[error] at flatMap @ io.github.sbt.tzdb.IOTasks$.downloadTZDB(IOTasks.scala:25)
[error] at flatMap @ io.github.sbt.tzdb.TzdbPlugin$.tzdbCodeGenImpl(SbtTzdb.scala:135)
[error] Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[error] at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:388)
[error] at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:271)
[error] at java.base/sun.security.validator.Validator.validate(Validator.java:256)
[error] at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)
[error] at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
[error] at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:638)
[error] at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:473)
[error] at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:369)
[error] at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:396)
[error] at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:480)
[error] at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:458)
[error] at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:201)
[error] at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
[error] at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1510)
[error] at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1425)
[error] at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
[error] at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
[error] at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:336)
[error] at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:300)
[error] at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:185)
[error] at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
[error] at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
[error] at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
[error] at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169)
[error] at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
[error] at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
[error] at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
[error] at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
[error] at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:221)
[error] at okhttp3.RealCall$AsyncCall.execute(RealCall.java:172)
[error] at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[error] at java.base/java.lang.Thread.run(Thread.java:1589)
[error] Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[error] at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
[error] at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
[error] at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
[error] at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:383)
[error] at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:271)
[error] at java.base/sun.security.validator.Validator.validate(Validator.java:256)
[error] at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)
[error] at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
[error] at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:638)
[error] at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:473)
[error] at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:369)
[error] at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:396)
[error] at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:480)
[error] at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:458)
[error] at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:201)
[error] at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
[error] at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1510)
[error] at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1425)
[error] at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
[error] at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
[error] at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:336)
[error] at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:300)
[error] at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:185)
[error] at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
[error] at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
[error] at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
[error] at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169)
[error] at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
[error] at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
[error] at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
[error] at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
[error] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
[error] at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:221)
[error] at okhttp3.RealCall$AsyncCall.execute(RealCall.java:172)
[error] at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[error] at java.base/java.lang.Thread.run(Thread.java:1589)
[error] (tzdbCodeGen) javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
There is a bug though which is even after failure, the plugin thinks it has written the file but it hasn't:
➜ onyx-prs git:(pr/msmith4897k/1328) ✗ ls /Users/MHughe008/work/vise/onyx-prs/client/target/scala-3.2.2/resource_managed/main/tzdb.tar.gz
ls: /Users/MHughe008/work/vise/onyx-prs/client/target/scala-3.2.2/resource_managed/main/tzdb.tar.gz: No such file or directory
So next time you run tzdbCodeGen, it thinks it successfully writes generated files but there is nothing there:
sbt:onyx-client> tzdbCodeGen
[debug] tzdb files already available
[info] Generating tzdb from db at /Users/MHughe008/work/vise/onyx-prs/client/target/scala-3.2.2/resource_managed/main/tzdb to /Users/MHughe008/work/vise/onyx-prs/client/target/scala-3.2.2/src_managed/main
[success] Total time: 0 s, completed Mar 23, 2023, 2:56:23 PM
which then leads to the dreaded "No time-zone data files registered" error at runtime.