Closed blackrez closed 1 year ago
Hello @blackrez interesting. We have a working lambda container running successfully. Could you check out the following links and see if you perhaps can spot a difference between your method and the working one?
@alijared might have some suggestions 👁️
Can you help cat /etc/localtime
. It seems the timezone in this file is not a valid one.
You can also try mv /etc/localtime /etc/localtime.bak
to see if it works.
For more information about this https://man7.org/linux/man-pages/man5/localtime.5.html. This is a binary file. I just tested with clickhouse local and it didn't work too. I will open a bug in clickhouse.
For more information about this https://man7.org/linux/man-pages/man5/localtime.5.html. This is a binary file. I just tested with clickhouse local and it didn't work too. I will open a bug in clickhouse.
Yes, but cat /etc/localtime
will also show many useful info, as the the content on my host shows like this:
(chdb311) auxten/chdb [main●] » cat /etc/localtime
TZif�����y��Y^�� �p�ӽ����|@�;>�Ӌ{��B���E"�L���<��fp���A|��R i�� ~��!I}�"g� #)_�$G� %|&'e &�^(G (�@~�p�CDTCSTTZif2
����~6C)�������������y������Y^������ �p�����ӽ������������|@�����;>�����Ӌ{������B�������E"�����L�������<������fp�����������A|��R i�� ~��!I}�"g� #)_�$G� %|&'e &�^(G (�@q�~�pLMTCDTCST
CST-8
Ok, by default I have this
bash-4.2# ls -alh /etc/localtime
lrwxrwxrwx 1 root root 23 Jul 3 14:06 /etc/localtime -> /usr/share/zoneinfo/UTC
bash-4.2# cat /etc/localtime
TZif2UTCTZif2�UTC
UTC0
hello, you can set TZ environment, on my case:
bash-4.2# TZ=US/Central python -m chdb 'select version()'
"23.6.1.1"
i checked TZ environment in public.ecr.aws/lambda/python:3.11
.
bash-4.2# echo $TZ
:/etc/localtime
the normal TZ environment value format should be {country}/{city}. e.g: TZ=US/Central
it seens TZ environment value problem, another solution is unset TZ environment. my case :
bash-4.2# unset TZ
bash-4.2# python -m chdb 'select version()'
"23.6.1.1"
@blackrez can we mark this as resolved with the suggestions, or are you still experiencing issues?
Hello, it is fixed.
Describe what's wrong
I'm trying to use chdb on AWS Lambda, I use Docker for testing and building the application. And when I import chdb, it crashed due to clickhouse can't access to /etc/localtime. The file exists, I tried to change the timezone, it failed too.
How to reproduce