콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
6 답글
22407 화면

No matter what directory I'll set in odoo.conf, I'm receiving the same error again and again.


ERROR: couldn't create the logfile directory. Logging to the standard output.


I was trying to set:

logfile = /etc/odoo

logifle = /tmp

logfile = /var/log/odoo


Docker Compose examples from official https://hub.docker.com/_/odoo

아바타
취소

Do you have permission to write to those folders?

Are you using docker volume or mapping to a directory on the host?

작성자

In logs case I don't use volumes. /var/log/odoo is created during docker build - according to official dockerfile definition.

I have posted an answer based on your clarification. Please take a look.

베스트 답변

Hi Tomek:

If you use the default setting for the Odoo container without specifying the -v command line parameter at the time of creating the container, the log file location is manager by Docker. You can find the exact location of the log file by using the following Linux command.

docker inspect your_container_name | grep LogPath

If you want to manage the log file yourself, you need to create the container to use a directory on the host machine by using the -v command line parameter (-v YOUR_HOST_LOGDIR:/var/lib/odoo). Once you do that the log file will be created in that directory.


아바타
취소
작성자

Hi Paresh,

Thank You fo your response.

I was trying to put logs into volumes too. It always looks the same:

web_1 | ERROR: couldn't create the logfile directory. Logging to the standard output.

I'm using official dockerfile with my small changes:

https://github.com/odoo/docker/blob/b4c45baf1f0579c654129ac9efe99a929569dab6/13.0/Dockerfile

And docker compose:

version: '2'

services:

web:

image: odoo:12.0

depends_on:

- db

ports:

- "8069:8069"

volumes:

- odoo-web-data:/var/lib/odoo

- ./config:/etc/odoo

- ./addons:/mnt/extra-addons

db:

image: postgres:10

environment:

- POSTGRES_DB=postgres

- POSTGRES_PASSWORD=odoo

- POSTGRES_USER=odoo

- PGDATA=/var/lib/postgresql/data/pgdata

volumes:

- odoo-db-data:/var/lib/postgresql/data/pgdata

volumes:

odoo-web-data:

odoo-db-data:

I was trying to direct logs in many locations: inside volumes (including every volume), outside volume. Always the same error, and no logs store.

작성자 베스트 답변

cd /var/log

-rw-r--r-- 1 root root   3264 Jun 29 07:20 faillog
-rw-r--r-- 1 root root   1931 Jun 29 07:17 fontconfig.log
-rw-rw-r-- 1 root utmp  29784 Jun 29 07:20 lastlog
drwxr-xr-x 1 odoo odoo   4096 Jun 29 07:20 odoo
-rw-rw-r-- 1 root utmp      0 Jun  7 00:00 wtmp

Maybe it shouldn't be user odoo but docker (1000) ?

How can I be sure that odoo take really path to logfile from odoo.conf ?


아바타
취소
관련 게시물 답글 화면 활동
1
6월 25
10692
1
11월 22
3920
1
11월 20
5956
1
8월 25
1413
2
12월 24
6587