libyang
libyang copied to clipboard
Invalid value "2017-02-20" and ly_ctx_new() failed when timezone is Europe/Dublin on Debian
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.
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.
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.)
Okay, it should be fixed and this is then a duplicate of #1896.