Unable to login because of timezone error #44407
-
Apache Airflow version2.10.3 If "Other Airflow 2 version" selected, which one?No response What happened?I am new to Airflow. I have a custom docker that i built. The ui fails to load. The classic "Something bad has happened. For security reasons detailed information about the error is not" message shows up. in logs for webserver I see the following error
What you think should happen instead?I have changed How to reproducePython version: 3.12.7 Operating Systemsudo docker exec -it orch-0 bash [sudo] password for kadmin: Sorry, try again. [sudo] password for kadmin: root@4aa1bcaa1a07:/gu/data# cat /etc/os-release PRETTY_NAME="Ubuntu 24.10" NAME="Ubuntu" VERSION_ID="24.10" VERSION="24.10 (Oracular Oriole)" VERSION_CODENAME=oracular ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=oracular LOGO=ubuntu-logo Versions of Apache Airflow Providerspip freeze |grep apache-airflow-providersapache-airflow-providers-apache-kafka==1.6.1 DeploymentOther Deployment details$ docker version Anything else?The issue is reproducible every time. I tried changing to older release of airflow, but it persists Are you willing to submit PR?
Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
Beta Was this translation helpful? Give feedback.
-
Same issue here. ____ |( )_______ / /________ __ |
Beta Was this translation helpful? Give feedback.
-
The issue mentioned above happens with airflow version 2.10.3 and 2.10.2. The error message comes from the scheduler service. The image is a custom one as well. |
Beta Was this translation helpful? Give feedback.
-
Problem is in file: airflow/utils/timezone.py $ python
|
Beta Was this translation helpful? Give feedback.
-
It looks like in some cases your docker container might be build with double python-babel/babel#990 (comment) contains a workaround in babel for similar issue. Applying it to your dockerfiles should fix the issue for you.l |
Beta Was this translation helpful? Give feedback.
-
Thanks everyone. I got success in fixing and would like to share the complete fix. There were few things that I did in my Docker container.
This was the suggestion above, and made sure that the '/etc/localtime' is not mapped to '/usr/share/zoneinfo//UTC' (note the double //). This in itself did not solve the issue. [2] I found that even when the correct timezone was mentioned in airflow.conf, the settings were not being passed in tz library and it still ended with /UTC. So, I had to add this line as well.
|
Beta Was this translation helpful? Give feedback.
Thanks everyone. I got success in fixing and would like to share the complete fix.
There were few things that I did in my Docker container.
[1]
This was the suggestion above, and made sure that the '/etc/localtime' is not mapped to '/usr/share/zoneinfo//UTC' (note the double //). This in itself did not solve the issue.
[2] I found that even when the correct timezone was mentioned in airflow.conf, the settings were not being passed in tz library and it still ended with /UTC. So, I had to add this line as well.