Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6723 Lượt xem

Hello,

I'm a newbie using Docker. I'd completed installing Postgres DB and Odoo via Docker's containers. And it working well!. When shutdown all and restarts Docker. I restart Postgres then restart Odoo. I got the Error information like that:

Database connection failure: connection to server at "172.17.0.3", port 5432 failed: Connection refused

Is the server running on that host and accepting TCP/IP connections?


What's wrong with docker?

Please help.

Thank you!


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

You should find out the container name of your postgres container. Did you install Odoo and Postgres with docker-compose? Then you should find the container name you should use in this file:

services:

postgres:
image: postgres:13
odoo:
image: odoo:latest
environment:
HOST: postgres
USER: username
PASSWORD: password

In this case your host name should be 'postgres' instead of '172.17.0.3'. Alternatively you could use 'docker ps' in your console and find out the name (i.e., last column) there. I hope this helps.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 23
4878
1
thg 9 20
5961
0
thg 1 23
2623
1
thg 7 22
2481
0
thg 5 22
1979