Search code examples
odoo

odoo docker run show " 'postInstallation': Failed to connect to postgresql:5432"


I tried to download last odoo image from docker hub,then run it and get msg :
postgre INFO Trying to connect to PostgreSQL server Error executing 'postInstallation': Failed to connect to postgresql:5432 after N tries

my logs :

root@test:~# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
bitnami/odoo        latest              8f069490b455        25 hours ago        1.27GB
hello-world         latest              bf756fb1ae65        9 months ago        13.3kB
root@test:~# docker run bitnami/odoo

Welcome to the Bitnami odoo container
Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-odoo
Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-odoo/issues

nami    INFO  Initializing odoo
odoo    INFO  Configuring Odoo database...
postgre INFO  Trying to connect to PostgreSQL server
Error executing 'postInstallation': Failed to connect to postgresql:5432 after 36 tries


update :

I tried to check port status , it looks like work for pgsql , but odoo still not work

root@test:~# cat /etc/services
postgresql  5432/tcp    postgres    # PostgreSQL Database

Solution

  • I think that error is very obvious; You need a "PostgreSQL server" alongside "odoo". refer to its docker hub page for more info.