Comments (9)
Try to add -e DB_PORT_5432_TCP_ADDR=db
from docker.
Trying same thing with no success:
version: '2'
services:
db:
image: 'postgres:9.4'
restart: always
environment:
- POSTGRES_PASSWORD=odoo
- POSTGRES_USER=odoo
# volumes:
# - './pgdata:/var/lib/postgresql/data'
web:
image: 'odoo:9'
restart: always
ports:
- '8069:8069'
links:
- db:db
environment:
- DB_PORT_5432_TCP_ADDR=db
# volumes:
# - './config:/etc/odoo'
# - './addons:/mnt/extra-addons'
# - './data:/var/lib/odoo/filestore'
Error:
Show Error Code
Starting dockercomposeodoo_db_1
Recreating dockercomposeodoo_web_1
Attaching to dockercomposeodoo_db_1, dockercomposeodoo_web_1
db_1 | LOG: database system was shut down at 2016-08-08 12:32:22 UTC
db_1 | LOG: MultiXact member wraparound protections are now enabled
db_1 | LOG: autovacuum launcher started
db_1 | LOG: database system is ready to accept connections
web_1 | 2016-08-08 12:33:23,039 1 INFO ? openerp: OpenERP version 9.0c-20160726
web_1 | 2016-08-08 12:33:23,039 1 INFO ? openerp: addons paths: ['/var/lib/odoo/addons/9.0', u'/mnt/extra-addons', u'/usr/lib/python2.7/dist-packages/openerp/addons']
web_1 | 2016-08-08 12:33:23,039 1 INFO ? openerp: database: postgres@db:
web_1 | 2016-08-08 12:33:23,206 1 INFO ? openerp.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069
web_1 | 2016-08-08 12:33:33,555 1 INFO ? openerp.addons.bus.models.bus: Bus.loop listen imbus on db postgres
web_1 | 2016-08-08 12:33:33,573 1 INFO ? openerp.sql_db: Connection to the database failed
web_1 | 2016-08-08 12:33:33,573 1 ERROR ? openerp.addons.bus.models.bus: Bus.loop error, sleep and retry
web_1 | Traceback (most recent call last):
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/addons/bus/models/bus.py", line 168, in run
web_1 | self.loop()
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/addons/bus/models/bus.py", line 146, in loop
web_1 | with openerp.sql_db.db_connect('postgres').cursor() as cr:
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 630, in cursor
web_1 | return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 164, in __init__
web_1 | self._cnx = pool.borrow(dsn)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 513, in _locked
web_1 | return fun(self, *args, **kwargs)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 581, in borrow
web_1 | **connection_info)
web_1 | File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 164, in connect
web_1 | conn = _connect(dsn, connection_factory=connection_factory, async=async)
web_1 | OperationalError: fe_sendauth: no password supplied
web_1 |
web_1 | 2016-08-08 12:33:33,974 1 INFO ? openerp.addons.report.models.report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
web_1 | 2016-08-08 12:33:34,176 1 INFO ? openerp.http: HTTP Configuring static files
web_1 | 2016-08-08 12:33:34,179 1 INFO ? openerp.sql_db: Connection to the database failed
web_1 | 2016-08-08 12:33:34,180 1 INFO ? werkzeug: 172.25.0.1 - - [08/Aug/2016 12:33:34] "GET / HTTP/1.1" 500 -
web_1 | 2016-08-08 12:33:34,184 1 ERROR ? werkzeug: Error on request:
web_1 | Traceback (most recent call last):
web_1 | File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi
web_1 | execute(self.server.app)
web_1 | File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute
web_1 | application_iter = app(environ, start_response)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/service/server.py", line 246, in app
web_1 | return self.app(e, s)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 184, in application
web_1 | return application_unproxied(environ, start_response)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 170, in application_unproxied
web_1 | result = handler(environ, start_response)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1494, in __call__
web_1 | return self.dispatch(environ, start_response)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1468, in __call__
web_1 | return self.app(environ, start_wrapped)
web_1 | File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 588, in __call__
web_1 | return self.app(environ, start_response)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1623, in dispatch
web_1 | self.setup_db(httprequest)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1554, in setup_db
web_1 | httprequest.session.db = db_monodb(httprequest)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1701, in db_monodb
web_1 | dbs = db_list(True, httprequest)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1675, in db_list
web_1 | dbs = openerp.service.db.list_dbs(force)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/service/db.py", line 323, in list_dbs
web_1 | with closing(db.cursor()) as cr:
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 630, in cursor
web_1 | return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 164, in __init__
web_1 | self._cnx = pool.borrow(dsn)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 513, in _locked
web_1 | return fun(self, *args, **kwargs)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 581, in borrow
web_1 | **connection_info)
web_1 | File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 164, in connect
web_1 | conn = _connect(dsn, connection_factory=connection_factory, async=async)
web_1 | OperationalError: fe_sendauth: no password supplied
web_1 | 2016-08-08 12:34:23,603 1 INFO ? openerp.addons.bus.models.bus: Bus.loop listen imbus on db postgres
web_1 | 2016-08-08 12:34:23,605 1 INFO ? openerp.sql_db: Connection to the database failed
web_1 | 2016-08-08 12:34:23,605 1 ERROR ? openerp.addons.bus.models.bus: Bus.loop error, sleep and retry
web_1 | Traceback (most recent call last):
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/addons/bus/models/bus.py", line 168, in run
web_1 | self.loop()
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/addons/bus/models/bus.py", line 146, in loop
web_1 | with openerp.sql_db.db_connect('postgres').cursor() as cr:
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 630, in cursor
web_1 | return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 164, in __init__
web_1 | self._cnx = pool.borrow(dsn)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 513, in _locked
web_1 | return fun(self, *args, **kwargs)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 581, in borrow
web_1 | **connection_info)
web_1 | File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 164, in connect
web_1 | conn = _connect(dsn, connection_factory=connection_factory, async=async)
web_1 | OperationalError: fe_sendauth: no password supplied
web_1 |
web_1 | 2016-08-08 12:35:13,629 1 INFO ? openerp.addons.bus.models.bus: Bus.loop listen imbus on db postgres
web_1 | 2016-08-08 12:35:13,633 1 INFO ? openerp.sql_db: Connection to the database failed
web_1 | 2016-08-08 12:35:13,634 1 ERROR ? openerp.addons.bus.models.bus: Bus.loop error, sleep and retry
web_1 | Traceback (most recent call last):
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/addons/bus/models/bus.py", line 168, in run
web_1 | self.loop()
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/addons/bus/models/bus.py", line 146, in loop
web_1 | with openerp.sql_db.db_connect('postgres').cursor() as cr:
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 630, in cursor
web_1 | return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 164, in __init__
web_1 | self._cnx = pool.borrow(dsn)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 513, in _locked
web_1 | return fun(self, *args, **kwargs)
web_1 | File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 581, in borrow
web_1 | **connection_info)
web_1 | File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 164, in connect
web_1 | conn = _connect(dsn, connection_factory=connection_factory, async=async)
web_1 | OperationalError: fe_sendauth: no password supplied
web_1 |
@medined didi you find any solution for this?
from docker.
The error is no password supplied
Try to add all of the database specific variables.
I got Odoo 9 to work (except that it shows only an empty page) with (just ignore the variables)
docker run \
--name $(NAME) \
$$DNS_ARG \
-e ODOO_USER_ID=`id -u odoo` \
-e ODOO_GROUP_ID=`id -g odoo` \
-e DB_PORT_5432_TCP_ADDR="postgres_9_4.weave.local" \
-e DB_PORT_5432_TCP_PORT="5432" \
-e DB_ENV_POSTGRES_USER="odoo9" \
-e DB_ENV_POSTGRES_PASSWORD="xxx" \
-v "$(DATA_DIR):/var/lib/odoo" \
$(PORTS) \
-d \
$(IMAGE_NAME) \
openerp-server
from docker.
@BigZ94 I did not get a resolution to this. I just used a regular script to start odoo instead of docker-compose.
from docker.
This
is not an issue with Odoo, but rather an issue with docker-compose.
Links does make an alias, e.g. if you get your docker-compose running and then docker-compose exec odoo ping -c 1
you will be able to locate that container.
However, it does not expose any of the environment variables that a usual docker link does. e.g. docker-compose exec odoo env
.
The easy solution here is to either set environment variables that /entrypoint.sh is expecting on the odoo service section:
- DB_PORT_5432_TCP_ADDR=db
- DB_PORT_5432_TCP_PORT=5432
- DB_ENV_POSTGRES_USER=odoo
- DB_ENV_POSTGRES_PASSWORD=odoo
OR mount in a config file with with the db host as 'db', user 'odoo', password 'odoo'...
While I have tested the former, I tend to prefer the later as I can run the DB container once with a random password (to create the data data files) and then remove those environment variables from the compose file. (noting that random password in an odoo config file that probably needs modifications like add-on directories anyway).
The former is probably better for 'testing' or other extremely temporary setups.
from docker.
@jaredkipe Thanks for the explanation.
from docker.
@medined You're welcome!
from docker.
@medined Hi , I'm facing the same issue like you while trying to dockerize the Odoo13. Can you please tell me how you overcome this issue?
Error: Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
from docker.
@agiratech-murali I'm sorry but I haven't used odoo since 2017 and don't remember.
from docker.
Related Issues (20)
- docker map directory permission error HOT 2
- RuntimeError: can't start new thread HOT 4
- getting error 99 Cannot assign requested address in outgoing email server - Odoo 17.0 Community Edition HOT 2
- Database name configuration HOT 4
- Unable to obtain the real address of the external client HOT 3
- Oddo don't work on Unraid HOT 8
- recent docker pull from odoo:16 cause AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK' HOT 2
- Odoo 15 Unraid update never worked HOT 2
- Apply docker compose HOT 4
- Update the release version of Odoo 17. HOT 2
- odoo:15,how to upgrade to new version HOT 4
- [17.0] lxml.html.clean module is now a separate project lxml_html_clean HOT 2
- Update Odoo release in the dockerfile to include commit 7e9a873 HOT 4
- Location of HOT 2
- Need link to docs, or info for docker image & SSL HOT 9
- Two critical Security Issues HOT 1
- Database Manager does not work HOT 1
- [Feature Request] Could it be possible to add fail2ban to the docker image? HOT 5
- Odoo with high availability on AWS HOT 1
- Error exec /entrypoint.sh: no such file or directory when running Odoo 17 Docker image HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker.