Closed fdb02983rhy closed 1 day ago
Celery fails to start when the LOG_FILE
setting is empty because it defaults to a directory path instead of a file path, leading to an "IsADirectoryError". To resolve this, ensure that the LOG_FILE
environment variable is set to a valid file path where logs can be written. This can be done by specifying a file path in your docker-compose.yaml
configuration under the LOG_FILE
environment variable [1].
To continue talking to Dosu, mention @dosu.
I'm confirming the same issue.
可以在环境变量中修改LOG_FILE,临时解决
+1, this issue looks still here in 0.11.1
+1
FYI: If you don't need log file persistence and just want the worker container to start correctly, you can set the LOG_FILE
variable in the .env
file as shown below and run docker compose up -d
.
# ------------------------------
# Server Configuration
# ------------------------------
# The log level for the application.
# Supported values are `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`
LOG_LEVEL=INFO
# Log file path
LOG_FILE=/app/logs/server.log
# Log file max size, the unit is MB
LOG_FILE_MAX_SIZE=20
# Log file max backup count
LOG_FILE_BACKUP_COUNT=5
# Log dateformat
LOG_DATEFORMAT=%Y-%m-%d %H:%M:%S
Self Checks
Dify version
0.11.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Keep the LOG_FILE environment variable empty then run docker compose
✔️ Expected Behavior
Celery can starts successfully even the LOG_FILE is not set or empty.
❌ Actual Behavior
Celery cannot starts successfully even the LOG_FILE is not set or empty.