libyang icon indicating copy to clipboard operation
libyang copied to clipboard

Invalid value "2017-02-20" and ly_ctx_new() failed when timezone is Europe/Dublin on Debian

Open jfbucas opened this issue 3 years ago • 2 comments

Using Frr project on Debian with deb package frr 8.3-0~deb10u1 which installs libyang2 2.0.7-1

When I start /usr/lib/frr/watchfrr, I get the error:

2022/07/26 14:07:57 WATCHFRR: libyang: Invalid value "2017-02-20" of "revision". (Line number 32.)
2022/07/26 14:07:57 WATCHFRR: [WH45S-QHX34][EC 100663345] yang_init: ly_ctx_new() failed

It seems to happens as libyang2 tries to read /etc/localtime

Changing the timezone to Europe/London or Europe/Belfast (or any other timezone) fixes this problem.

jfbucas avatar Jul 26 '22 15:07 jfbucas

libyang 2.0.7 is more than a year old when version 2 had just been shortly available publicly, so there were many problems. You will have to update it to fix this problem.

michalvasko avatar Jul 27 '22 06:07 michalvasko

Still same issue persists with build from 2.0.231. Only line changes to 38:

libyang: Invalid value "2017-02-20" of "revision". (Line number 38.)

tlsalmin avatar Aug 15 '22 08:08 tlsalmin

Okay, it should be fixed and this is then a duplicate of #1896.

michalvasko avatar Aug 17 '22 08:08 michalvasko