YannickB / odoo-hosting

Other
64 stars 50 forks source link

Error when build the base #45

Closed collex100 closed 7 years ago

collex100 commented 8 years ago

I got this error: Traceback (most recent call last): File "/opt/odoo/odoo/openerp/http.py", line 537, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo/odoo/openerp/http.py", line 574, in dispatch result = self._call_function(_self.params) File "/opt/odoo/odoo/openerp/http.py", line 310, in _call_function return checked_call(self.db, args, _kwargs) File "/opt/odoo/odoo/openerp/service/model.py", line 113, in wrapper return f(dbname, _args, _kwargs) File "/opt/odoo/odoo/openerp/http.py", line 307, in checked_call return self.endpoint(_a, _kw) File "/opt/odoo/odoo/openerp/http.py", line 803, in call return self.method(_args, _kw) File "/opt/odoo/odoo/openerp/http.py", line 403, in response_wrap response = f(_args, _kw) File "/opt/odoo/odoo/addons/web/controllers/main.py", line 944, in call_kw return self._call_kw(model, method, args, kwargs) File "/opt/odoo/odoo/addons/web/controllers/main.py", line 936, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, _kwargs) File "/opt/odoo/odoo/openerp/api.py", line 241, in wrapper return old_api(self, _args, _kwargs) File "/opt/odoo/odoo/openerp/api.py", line 336, in old_api result = method(recs, _args, _kwargs) File "/opt/odoo/odoo/addons/clouder/clouder_base.py", line 378, in create return super(ClouderBase, self).create(vals) File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper return new_api(self, _args, _kwargs) File "/opt/odoo/odoo/addons/clouder/clouder_model.py", line 310, in create res.deploy() File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper return new_api(self, _args, _kwargs) File "/opt/odoo/odoo/addons/clouder/clouder_base.py", line 595, in deploy res = self.deploy_create_database() File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper return new_api(self, _args, _kwargs) File "/opt/odoo/odoo/addons/clouder_template_odoo/clouder_template_odoo.py", line 217, in deploy_create_database user_password=self.admin_password) File "/usr/local/lib/python2.7/dist-packages/erppeek.py", line 639, in create_database user_password) File "/usr/local/lib/python2.7/dist-packages/erppeek.py", line 383, in wrapper = lambda s, _args: s._dispatch(name, args) File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in request verbose=self.verbose File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib/python2.7/xmlrpclib.py", line 1297, in single_request return self.parse_response(response) File "/usr/lib/python2.7/xmlrpclib.py", line 1473, in parse_response return u.close() File "/usr/lib/python2.7/xmlrpclib.py", line 793, in close raise Fault(self._stack[0]) Fault: <Fault could not connect to server: Connection refused Is the server running on host "postgres" (172.17.0.252) and accepting TCP/IP connections on port 5432? : 'Traceback (most recent call last):\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/service/wsgi_server.py", line 75, in xmlrpc_return\n result = openerp.http.dispatch_rpc(service, method, params)\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/http.py", line 115, in dispatch_rpc\n result = dispatch(method, params)\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/service/db.py", line 73, in dispatch\n return fn(_params)\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/service/db.py", line 90, in exp_create_database\n _create_empty_database(db_name)\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/service/db.py", line 77, in _create_empty_database\n with closing(db.cursor()) as cr:\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/sql_db.py", line 575, in cursor\n return Cursor(self.pool, self.dbname, self.dsn, serialized=serialized)\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/sql_db.py", line 181, in init\n self._cnx = pool.borrow(dsn)\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/sql_db.py", line 464, in _locked\n return fun(self, _args, _kwargs)\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/sql_db.py", line 526, in borrow\n result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)\n File "/usr/lib/python2.7/dist-packages/psycopg2/init.py", line 164, in connect\n conn = _connect(dsn, connection_factory=connection_factory, async=async)\nOperationalError: could not connect to server: Connection refused\n\tIs the server running on host "postgres" (172.17.0.252) and accepting\n\tTCP/IP connections on port 5432?\n\n'>

ErrafayM commented 8 years ago

it's probably because of your postgresql is not started in your postgres container , had same error this morning , get inside your container and start it manually

if you dont know how to do it , let me help you more ^^ .

go into your docker server :

docker exec -it [containerpostgresql] su postgresql

/etc/init.d/postgresql start

collex100 commented 8 years ago

When I go into my docker server(my server consol?) and: docker exec -it [containerpostgresql] su postgresql i got Error response from daemon: no such id: [containerpostgresql]

ErrafayM commented 8 years ago

I mean put the name of your postgresql container in the id , exemple : www-postgresql

collex100 commented 8 years ago

i got root@vmi46165:~# docker exec -it [www-panda1-postgres] su postgresql Error response from daemon: no such id: [www-panda1-postgres]

collex100 commented 8 years ago

i got root@vmi46165:~# docker exec -it www-panda1-postgres su postgresql No passwd entry for user 'postgresql'

ErrafayM commented 8 years ago

Oh man , my fault ... su postgres not postgresql , so sorry

collex100 commented 8 years ago

root@vmi46165:~# docker exec -it www-panda1-postgres su postgres postgres@6bf79ad6a83a:/$ /etc/init.d/postgresql start Starting PostgreSQL 9.4 database server: main.

but i got same error: Fault: <Fault could not connect to server: No route to host Is the server running on host "postgres" (172.17.1.4) and accepting TCP/IP connections on port 5432?

collex100 commented 8 years ago

in odoo-server.log:

2015-08-06 11:40:11,270 13549 INFO pandaplus openerp.addons.clouder.clouder_model: command : psql -c "update pg_database set datallowconn = 'false' where datname = 'odoo_www_panda1_pandaplus_biz'; SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'odoo_www_panda1_pandaplus_biz';" 2015-08-06 11:40:11,371 13549 INFO pandaplus openerp.addons.clouder.clouder_model: stdout : 2015-08-06 11:40:11,374 13549 INFO pandaplus openerp.addons.clouder.clouder_model: stderr : psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

2015-08-06 11:40:11,376 13549 INFO pandaplus openerp.addons.clouder.clouder_model: command : dropdb odoo_www_panda1_pandaplus_biz 2015-08-06 11:40:11,507 13549 INFO pandaplus openerp.addons.clouder.clouder_model: stdout : 2015-08-06 11:40:11,510 13549 INFO pandaplus openerp.addons.clouder.clouder_model: stderr : dropdb: could not connect to database template1: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

2015-08-06 11:40:11,630 13549 INFO pandaplus openerp.addons.clouder.clouder_model: connect: ssh odoo@www-panda1-odoo_panda1.pandaplus.biz 2015-08-06 11:40:11,663 13549 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.7p1) 2015-08-06 11:40:11,867 13549 INFO ? paramiko.transport: Authentication (publickey) successful! 2015-08-06 11:40:11,879 13549 INFO pandaplus openerp.addons.clouder.clouder_model: command : rm -rf /opt/odoo/production_panda1/filestore/odoo_www_panda1_pandaplus_biz 2015-08-06 11:40:11,911 13549 INFO pandaplus openerp.addons.clouder.clouder_model: stdout : 2015-08-06 11:40:11,914 13549 INFO pandaplus openerp.addons.clouder.clouder_model: stderr : 2015-08-06 11:40:12,041 13549 ERROR pandaplus openerp.http: Exception during JSON request handling.

ErrafayM commented 8 years ago

When you logged in your postgres container have you tested if postgresql works ?

collex100 commented 8 years ago

postgres@6bf79ad6a83a:/$ /etc/init.d/postgresql status 9.4/main (port 5432): online postgres@6bf79ad6a83a:/$

ErrafayM commented 8 years ago

and when you do psql ?

ErrafayM commented 8 years ago

And can you show me the log of your img_postgres & container ?

collex100 commented 8 years ago

img_postgres

connect: ssh panda1.pandaplus.biz command : mkdir -p /tmp/img_postgres_img_postgres:9.4.20150806.113631 stdout : stderr : command : echo "FROM localhost:14000/img_base:1.0.20150805.143907 MAINTAINER mymail@gmail.com

RUN apt-get update

RUN DEBIAN_FRONTEND=noninteractive apt-get -y -q install postgresql

RUN echo \"\" >> /etc/supervisor/conf.d/supervisord.conf RUN echo \"[program:postgres]\" >> /etc/supervisor/conf.d/supervisord.conf RUN echo \"command=su postgres -c '/usr/lib/postgresql/9.4/bin/postgres -D /var/lib/postgresql/9.4/main -c config_file=/etc/postgresql/9.4/main/postgresql.conf'\" >> /etc/supervisor/conf.d/supervisord.conf

USER postgres

RUN mkdir /var/lib/postgresql/.ssh RUN ln -s /opt/keys/authorized_keys /var/lib/postgresql/.ssh/authorized_keys

USER root

VOLUME /etc/postgresql VOLUME /var/log/postgresql VOLUME /var/lib/postgresql EXPOSE 22 5432 " >> /tmp/img_postgres_img_postgres:9.4.20150806.113631/Dockerfile stdout : stderr : command : sudo docker build -t img_postgres:9.4.20150806.113631 /tmp/img_postgres_img_postgres:9.4.20150806.113631 stdout : Sending build context to Docker daemon 2.56 kB

Sending build context to Docker daemon Step 0 : FROM localhost:14000/img_base:1.0.20150805.143907 ---> bff19ff3ce3c Step 1 : MAINTAINER mymail@gmail.com ---> Using cache ---> d6b74cf582f7 Step 2 : RUN apt-get update ---> Using cache ---> 1f78da7ad50b Step 3 : RUN DEBIAN_FRONTEND=noninteractive apt-get -y -q install postgresql ---> Using cache ---> c7f70d1f9c75 Step 4 : RUN echo "" >> /etc/supervisor/conf.d/supervisord.conf ---> Using cache ---> 856134a7c8f0 Step 5 : RUN echo "[program:postgres]" >> /etc/supervisor/conf.d/supervisord.conf ---> Using cache ---> a942439c8ebf Step 6 : RUN echo "command=su postgres -c '/usr/lib/postgresql/9.4/bin/postgres -D /var/lib/postgresql/9.4/main -c config_file=/etc/postgresql/9.4/main/postgresql.conf'" >> /etc/supervisor/conf.d/supervisord.conf ---> Using cache ---> 9ffe3d1481d4 Step 7 : USER postgres ---> Using cache ---> c9bf4a5ee1db Step 8 : RUN mkdir /var/lib/postgresql/.ssh ---> Using cache ---> 7d92e15ae629 Step 9 : RUN ln -s /opt/keys/authorized_keys /var/lib/postgresql/.ssh/authorized_keys ---> Using cache ---> ea0ac45604e7 Step 10 : USER root ---> Using cache ---> a302743aa49c Step 11 : VOLUME /etc/postgresql ---> Using cache ---> f13c4c778b55 Step 12 : VOLUME /var/log/postgresql ---> Using cache ---> e210d2d38ba8 Step 13 : VOLUME /var/lib/postgresql ---> Using cache ---> b11553221faa Step 14 : EXPOSE 22 5432 ---> Using cache ---> 6bfe11581b80 Successfully built 6bfe11581b80

stderr : command : sudo docker tag img_postgres:9.4.20150806.113631 localhost:14000/img_postgres:9.4.20150806.113631 stdout : stderr : command : sudo docker push localhost:14000/img_postgres:9.4.20150806.113631 stdout : The push refers to a repository [localhost:14000/img_postgres](len: 1) Sending image list Pushing repository localhost:14000/img_postgres (1 tags) Image 902b87aaaec9 already pushed, skipping Image 9a61b6b1315e already pushed, skipping Image 3a5d00aa683b already pushed, skipping Image e530490a98ad already pushed, skipping Image bd5032f37aa9 already pushed, skipping Image a53bb6296388 already pushed, skipping Image 13824e051731 already pushed, skipping Image 8362d4211d8e already pushed, skipping Image de503cbcc6f2 already pushed, skipping Image 48f40607fa89 already pushed, skipping Image 1ee8a0d5461a already pushed, skipping Image 1aaea0f557ce already pushed, skipping Image 4c6ee0590733 already pushed, skipping Image 021dc08a3b9f already pushed, skipping Image 797aa31f9373 already pushed, skipping Image b0d9abc846d5 already pushed, skipping Image 7c2a14bf6e91 already pushed, skipping Image 4e5dd98f5be9 already pushed, skipping Image d225b7259e77 already pushed, skipping Image 8360af2ce28c already pushed, skipping Image a89092ec7dfd already pushed, skipping Image f7f48757344c already pushed, skipping Image d6b6a031348d already pushed, skipping Image 2fdf25166760 already pushed, skipping Image bff19ff3ce3c already pushed, skipping Image c22c0fa44e27 already pushed, skipping Image c7f70d1f9c75 already pushed, skipping Image 1f78da7ad50b already pushed, skipping Image 856134a7c8f0 already pushed, skipping Image 9ffe3d1481d4 already pushed, skipping Image c9bf4a5ee1db already pushed, skipping Image d6b74cf582f7 already pushed, skipping Image 7d92e15ae629 already pushed, skipping Image a942439c8ebf already pushed, skipping Image f13c4c778b55 already pushed, skipping Image e210d2d38ba8 already pushed, skipping Image ea0ac45604e7 already pushed, skipping Image 6bfe11581b80 already pushed, skipping Image a302743aa49c already pushed, skipping Image b11553221faa already pushed, skipping Pushing tag for rev [6bfe11581b80] on {http://localhost:14000/v1/repositories/img_postgres/tags/9.4.20150806.113631}

stderr : command : sudo docker rmi img_postgres:9.4.20150806.113631 stdout : Untagged: img_postgres:9.4.20150806.113631

stderr : command : sudo docker rmi localhost:14000/img_postgres:9.4.20150806.113631 stdout : Untagged: localhost:14000/img_postgres:9.4.20150806.113631

stderr : command : rm -rf /tmp/img_postgres_img_postgres:9.4.20150806.113631 stdout : stderr :

container aving 2015-08-06-113659_www-panda1-postgres_panda1.pandaplus.biz Comment: Before upgrade from 9.4.20150806.022823 to 9.4.20150806.113631 connect: ssh www-panda1-postgres_panda1.pandaplus.biz command : rm -rf /tmp/2015-08-05_www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : command : mkdir /tmp/2015-08-05_www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : command : cp -R --parents /etc/postgresql /tmp/2015-08-05_www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : command : cp -R --parents /var/log/postgresql /tmp/2015-08-05_www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : command : cp -R --parents /var/lib/postgresql /tmp/2015-08-05_www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : command : echo "2015-08-06" > /tmp/2015-08-05_www-panda1-postgres_panda1.pandaplus.biz/backup-date stdout : stderr : command : chmod -R 777 /tmp/2015-08-05_www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : connect: ssh backup@www-panda1-backup_panda1.pandaplus.biz command : rm -rf /opt/backup/list/www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : command : mkdir -p /opt/backup/list/www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : command : echo "2015-08-05_www-panda1-postgres_panda1.pandaplus.biz" > /opt/backup/list/www-panda1-postgres_panda1.pandaplus.biz/repo stdout : stderr : send : /opt/odoo/.ssh/config to /home/backup/.ssh/config send : /opt/odoo/.ssh/keys/www-panda1-postgres_panda1.pandaplus.biz.pub to /home/backup/.ssh/keys/www-panda1-postgres_panda1.pandaplus.biz.pub send : /opt/odoo/.ssh/keys/www-panda1-postgres_panda1.pandaplus.biz to /home/backup/.ssh/keys/www-panda1-postgres_panda1.pandaplus.biz command : chmod -R 700 /home/backup/.ssh stdout : stderr : command : rm -rf /tmp/2015-08-05_www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : command : mkdir /tmp/2015-08-05_www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : command : rsync -e 'ssh -o StrictHostKeyChecking=no' -ra www-panda1-postgres_panda1.pandaplus.biz:/tmp/2015-08-05_www-panda1-postgres_panda1.pandaplus.biz/ /tmp/2015-08-05_www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : command : export BUP_DIR=/opt/backup/bup; bup index /tmp/2015-08-05_www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : command : export BUP_DIR=/opt/backup/bup; bup save -n 2015-08-05_www-panda1-postgres_panda1.pandaplus.biz -d 1438861019 --strip /tmp/2015-08-05_www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : command : rm -rf /tmp/2015-08-05_www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : command : rm /home/backup/.ssh/keys/ stdout : stderr : connect: ssh www-panda1-postgres_panda1.pandaplus.biz command : rm -rf /tmp/2015-08-05_www-panda1-postgres_panda1.pandaplus.biz* stdout : stderr : connect: ssh shinken@www-panda1-shinken_panda1.pandaplus.biz command : rm /usr/local/shinken/etc/services/www-panda1-postgres_panda1.pandaplus.biz.cfg stdout : stderr : command : /usr/local/shinken/bin/init.d/shinken reload stdout : Reloading arbiter Doing config check . .

stderr : command : /opt/odoo/odoo/addons/clouder/res/sed.sh www-panda1-postgres_panda1.pandaplus.biz /opt/odoo/.ssh/config command : rm -rf /opt/odoo/.ssh/keys/www-panda1-postgres_panda1.pandaplus.biz command : rm -rf /opt/odoo/.ssh/keys/www-panda1-postgres_panda1.pandaplus.biz.pub connect: ssh panda1.pandaplus.biz command : rm -rf /opt/keys/www-panda1-postgres_panda1.pandaplus.biz/authorized_keys stdout : stderr : connect: ssh panda1.pandaplus.biz connect: ssh panda1.pandaplus.biz command : docker stop www-panda1-postgres stdout : www-panda1-postgres

stderr : command : sudo docker rm www-panda1-postgres stdout : www-panda1-postgres

stderr : command : rm -rf /opt/keys/www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : command : /opt/odoo/odoo/addons/clouder/res/sed.sh www-panda1-postgres_panda1.pandaplus.biz /opt/odoo/.ssh/config command : rm -rf /opt/odoo/.ssh/keys/www-panda1-postgres_panda1.pandaplus.biz command : rm -rf /opt/odoo/.ssh/keys/www-panda1-postgres_panda1.pandaplus.biz.pub connect: ssh panda1.pandaplus.biz command : rm -rf /opt/keys/www-panda1-postgres_panda1.pandaplus.biz/authorized_keys stdout : stderr : connect: ssh panda1.pandaplus.biz connect: ssh panda1.pandaplus.biz command : docker stop www-panda1-postgres stdout : stderr : Error response from daemon: no such id: www-panda1-postgres Error: failed to stop containers: [www-panda1-postgres]

command : sudo docker rm www-panda1-postgres stdout : stderr : Error response from daemon: no such id: www-panda1-postgres Error: failed to remove containers: [www-panda1-postgres]

command : rm -rf /opt/keys/www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : connect: ssh panda1.pandaplus.biz command : /opt/odoo/odoo/addons/clouder/res/sed.sh www-panda1-postgres_panda1.pandaplus.biz /opt/odoo/.ssh/config command : rm -rf /opt/odoo/.ssh/keys/www-panda1-postgres_panda1.pandaplus.biz command : rm -rf /opt/odoo/.ssh/keys/www-panda1-postgres_panda1.pandaplus.biz.pub connect: ssh panda1.pandaplus.biz command : rm -rf /opt/keys/www-panda1-postgres_panda1.pandaplus.biz/authorized_keys stdout : stderr : command : ssh-keygen -t rsa -C mymail@gmail.com -f /opt/odoo/.ssh/keys/www-panda1-postgres_panda1.pandaplus.biz -N stdout : Generating public/private rsa key pair.

stdout : Your identification has been saved in /opt/odoo/.ssh/keys/www-panda1-postgres_panda1.pandaplus.biz.

stdout : Your public key has been saved in /opt/odoo/.ssh/keys/www-panda1-postgres_panda1.pandaplus.biz.pub.

stdout : The key fingerprint is:

stdout : 56:8f:b1:a3:b0:62:50:90:67:7b:5d:82:67:04:cd:18 mymail@gmail.com

stdout : The key's randomart image is:

stdout : +--[ RSA 2048]----+

stdout : | .. EO. |

stdout : | ..o o * . |

stdout : | o.. + oo |

stdout : | .. . .. = |

stdout : | . .. S + . |

stdout : | . + . . |

stdout : | o . . |

stdout : | . . |

stdout : | |

stdout : +-----------------+

connect: ssh panda1.pandaplus.biz command : mkdir -p /opt/keys/www-panda1-postgres_panda1.pandaplus.biz stdout : stderr : send : /opt/odoo/.ssh/keys/www-panda1-postgres_panda1.pandaplus.biz.pub to /opt/keys/www-panda1-postgres_panda1.pandaplus.biz/authorized_keys command : sudo docker run -d --restart=always -p 14016:22 -p 14017:5432 -v /opt/keys/www-panda1-postgres_panda1.pandaplus.biz:/opt/keys --name www-panda1-postgres localhost:14000/img_postgres:9.4.20150806.113631 stdout : 6bf79ad6a83a866b61e84acbdfa321122559b75c38c7fcf586e3836c2f8a0b64

stderr : Unable to find image 'localhost:14000/img_postgres:9.4.20150806.113631' locally Pulling repository localhost:14000/img_postgres 6bfe11581b80: Pulling image (9.4.20150806.113631) from localhost:14000/img_postgres 6bfe11581b80: Pulling image (9.4.20150806.113631) from localhost:14000/img_postgres, endpoint: http://localhost:14000/v1/ 6bfe11581b80: Pulling dependent layers 902b87aaaec9: Download complete 9a61b6b1315e: Download complete 3a5d00aa683b: Download complete e530490a98ad: Download complete bd5032f37aa9: Download complete a53bb6296388: Download complete 13824e051731: Download complete 48f40607fa89: Download complete de503cbcc6f2: Download complete 021dc08a3b9f: Download complete 8362d4211d8e: Download complete 1ee8a0d5461a: Download complete 4e5dd98f5be9: Download complete 1aaea0f557ce: Download complete 4c6ee0590733: Download complete 7c2a14bf6e91: Download complete d225b7259e77: Download complete 797aa31f9373: Download complete b0d9abc846d5: Download complete a89092ec7dfd: Download complete 8360af2ce28c: Download complete d6b6a031348d: Download complete 2fdf25166760: Download complete f7f48757344c: Download complete c22c0fa44e27: Download complete bff19ff3ce3c: Download complete d6b74cf582f7: Download complete 1f78da7ad50b: Download complete c7f70d1f9c75: Download complete 856134a7c8f0: Download complete a942439c8ebf: Download complete 9ffe3d1481d4: Download complete c9bf4a5ee1db: Download complete 7d92e15ae629: Download complete ea0ac45604e7: Download complete a302743aa49c: Download complete f13c4c778b55: Download complete e210d2d38ba8: Download complete b11553221faa: Download complete 6bfe11581b80: Download complete 6bfe11581b80: Download complete Status: Image is up to date for localhost:14000/img_postgres:9.4.20150806.113631

connect: ssh www-panda1-postgres_panda1.pandaplus.biz command : echo "host all all 172.17.0.0/16 md5" >> /etc/postgresql/9.4/main/pg_hba.conf stdout : stderr : command : echo "listen_addresses='*'" >> /etc/postgresql/9.4/main/postgresql.conf stdout : stderr : connect: ssh panda1.pandaplus.biz command : docker stop www-panda1-postgres stdout : www-panda1-postgres

stderr : connect: ssh panda1.pandaplus.biz command : docker start www-panda1-postgres stdout : www-panda1-postgres

stderr : This base container not be saved or the backup isnt configured in conf, skipping save container connect: ssh shinken@www-panda1-shinken_panda1.pandaplus.biz command : rm /usr/local/shinken/etc/services/www-panda1-postgres_panda1.pandaplus.biz.cfg stdout : stderr : rm: cannot remove /usr/local/shinken/etc/services/www-panda1-postgres_panda1.pandaplus.biz.cfg: No such file or directory

command : /usr/local/shinken/bin/init.d/shinken reload stdout : Reloading arbiter Doing config check . .

stderr : connect: ssh shinken@www-panda1-shinken_panda1.pandaplus.biz send : /opt/odoo/odoo/addons/clouder_template_shinken/res/container-shinken.config to /usr/local/shinken/etc/services/www-panda1-postgres_panda1.pandaplus.biz.cfg command : sed -i "s/METHOD/bup/g" /usr/local/shinken/etc/services/www-panda1-postgres_panda1.pandaplus.biz.cfg stdout : stderr : command : sed -i "s/TYPE/container/g" /usr/local/shinken/etc/services/www-panda1-postgres_panda1.pandaplus.biz.cfg stdout : stderr : command : sed -i "s/CONTAINER/www-panda1-backup_panda1.pandaplus.biz/g" /usr/local/shinken/etc/services/www-panda1-postgres_panda1.pandaplus.biz.cfg stdout : stderr : command : sed -i "s/UNIQUE_NAME/www-panda1-postgres_panda1.pandaplus.biz/g" /usr/local/shinken/etc/services/www-panda1-postgres_panda1.pandaplus.biz.cfg stdout : stderr : command : sed -i "s/HOST/panda1.pandaplus.biz/g" /usr/local/shinken/etc/services/www-panda1-postgres_panda1.pandaplus.biz.cfg stdout : stderr : command : sed -i "s/PORT/14016/g" /usr/local/shinken/etc/services/www-panda1-postgres_panda1.pandaplus.biz.cfg stdout : stderr : command : /usr/local/shinken/bin/init.d/shinken reload stdout : Reloading arbiter Doing config check . .

stderr : command : rm -rf /home/shinken/.ssh/keys/www-panda1-backup_panda1.pandaplus.biz* stdout : stderr : send : /opt/odoo/.ssh/keys/www-panda1-backup_panda1.pandaplus.biz.pub to /home/shinken/.ssh/keys/www-panda1-backup_panda1.pandaplus.biz.pub send : /opt/odoo/.ssh/keys/www-panda1-backup_panda1.pandaplus.biz to /home/shinken/.ssh/keys/www-panda1-backup_panda1.pandaplus.biz command : chmod -R 700 /home/shinken/.ssh stdout : stderr : command : sed -i '/Host www-panda1-backup_panda1.pandaplus.biz/,/END www-panda1-backup_panda1.pandaplus.biz/d' /home/shinken/.ssh/config stdout : stderr : command : echo "Host www-panda1-backup_panda1.pandaplus.biz" >> /home/shinken/.ssh/config stdout : stderr : command : echo " Hostname panda1.pandaplus.biz" >> /home/shinken/.ssh/config stdout : stderr : command : echo " Port 14005" >> /home/shinken/.ssh/config stdout : stderr : command : echo " User backup" >> /home/shinken/.ssh/config stdout : stderr : command : echo " IdentityFile ~/.ssh/keys/www-panda1-backup_panda1.pandaplus.biz" >> /home/shinken/.ssh/config stdout : stderr : command : echo "#END www-panda1-backup_panda1.pandaplus.biz" >> ~/.ssh/config stdout : stderr :

ErrafayM commented 8 years ago

Hmmm weird i dont see any problem in both images & container . i'll try to create a base now .

collex100 commented 8 years ago

correctly is there a connection to the internal ip

postgres@6bf79ad6a83a:/$ ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 532: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default link/ether 02:42:ac:11:01:09 brd ff:ff:ff:ff:ff:ff inet 172.17.1.9/16 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::42:acff:fe11:109/64 scope link valid_lft forever preferred_lft forever

here ip is 172.17.1.9/16

but i got error: Fault: <Fault could not connect to server: No route to host Is the server running on host "postgres" (172.17.1.4) and accepting TCP/IP connections on port 5432?

here ip is 172.17.1.4 ?

collex100 commented 8 years ago

postgres@6bf79ad6a83a:/$ psql psql (9.4.3) Type "help" for help.

ErrafayM commented 8 years ago

No problem for me i have succeded creating a base.

ErrafayM commented 8 years ago

Reinstall your service and check its log , and try again with your base

collex100 commented 8 years ago

I did reinstall service, and tried again with my base

I got:

Fault: <Fault could not translate host name "postgres" to address: Name or service not known : 'Traceback (most recent call last):\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/service/wsgi_server.py", line 75, in xmlrpc_return\n result = openerp.http.dispatch_rpc(service, method, params)\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/http.py", line 115, in dispatch_rpc\n result = dispatch(method, params)\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/service/db.py", line 73, in dispatch\n return fn(params)\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/service/db.py", line 90, in exp_create_database\n _create_empty_database(db_name)\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/service/db.py", line 77, in _create_empty_database\n with closing(db.cursor()) as cr:\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/sql_db.py", line 575, in cursor\n return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/sql_db.py", line 181, in init\n self._cnx = pool.borrow(dsn)\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/sql_db.py", line 464, in _locked\n return fun(self, args, **kwargs)\n File "/opt/versions/odoo-odoo/8.0.20150805.174255/parts/odoo/openerp/sql_db.py", line 526, in borrow\n result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)\n File "/usr/lib/python2.7/dist-packages/psycopg2/init.py", line 164, in connect\n conn = _connect(dsn, connection_factory=connection_factory, async=async)\nOperationalError: could not translate host name "postgres" to address: Name or service not known\n\n'>

collex100 commented 8 years ago

can I not properly prepare the server to install? $ apt-get install sudo

cd /etc/apt/sources.list deb http://http.debian.net/debian wheezy-backports main

$ sudo apt-get update $ sudo apt-get install -t wheezy-backports linux-image-amd64

$ reboot

$ apt-get install openssh-server

$ sudo apt-get install curl $ curl -sSL https://get.docker.com/ | sh

collex100 commented 8 years ago

Maybe that is not so fill? screenshot_2

There is a suspicion that something is not connected to postgres

ErrafayM commented 8 years ago

check #26 had same problem , and solved it .

collex100 commented 8 years ago

root@vmi46165:~# docker version Client version: 1.7.1 Client API version: 1.19 Go version (client): go1.4.2 Git commit (client): 786b29d OS/Arch (client): linux/amd64 Server version: 1.7.1 Server API version: 1.19 Go version (server): go1.4.2 Git commit (server): 786b29d OS/Arch (server): linux/amd64

collex100 commented 8 years ago

Not entirely clear solution. But still I want to try to manually enter the data that you recommend.

i did a reinstall to the odoo container, but nothing happened

Just I can not understand which I need to enter the ip? And where can I find the file pg_nba?

ErrafayM commented 8 years ago

First just reinstall your clouder container and check it's log , pg_hba is not a problem anymore it was fixed by a PR on the same issue .

collex100 commented 8 years ago

log clouder container: Saving 2015-08-06-163941_www-panda1-clouder_panda1.pandaplus.biz Comment: Before reinstall connect: ssh www-panda1-clouder_panda1.pandaplus.biz command : rm -rf /tmp/2015-08-06_www-panda1-clouder_panda1.pandaplus.biz stdout : stderr : command : mkdir /tmp/2015-08-06_www-panda1-clouder_panda1.pandaplus.biz stdout : stderr : command : cp -R --parents /opt/odoo /tmp/2015-08-06_www-panda1-clouder_panda1.pandaplus.biz stdout : stderr : command : cp -R --parents /home/odoo /tmp/2015-08-06_www-panda1-clouder_panda1.pandaplus.biz stdout : stderr : command : echo "2015-08-06" > /tmp/2015-08-06_www-panda1-clouder_panda1.pandaplus.biz/backup-date stdout : stderr : command : chmod -R 777 /tmp/2015-08-06_www-panda1-clouder_panda1.pandaplus.biz stdout : stderr : connect: ssh backup@www-panda1-backup_panda1.pandaplus.biz command : rm -rf /opt/backup/list/www-panda1-clouder_panda1.pandaplus.biz stdout : stderr : command : mkdir -p /opt/backup/list/www-panda1-clouder_panda1.pandaplus.biz stdout : stderr : command : echo "2015-08-06_www-panda1-clouder_panda1.pandaplus.biz" > /opt/backup/list/www-panda1-clouder_panda1.pandaplus.biz/repo stdout : stderr : send : /opt/odoo/.ssh/config to /home/backup/.ssh/config send : /opt/odoo/.ssh/keys/www-panda1-clouder_panda1.pandaplus.biz.pub to /home/backup/.ssh/keys/www-panda1-clouder_panda1.pandaplus.biz.pub send : /opt/odoo/.ssh/keys/www-panda1-clouder_panda1.pandaplus.biz to /home/backup/.ssh/keys/www-panda1-clouder_panda1.pandaplus.biz command : chmod -R 700 /home/backup/.ssh stdout : stderr : command : rm -rf /tmp/2015-08-06_www-panda1-clouder_panda1.pandaplus.biz stdout : stderr : command : mkdir /tmp/2015-08-06_www-panda1-clouder_panda1.pandaplus.biz stdout : stderr : command : rsync -e 'ssh -o StrictHostKeyChecking=no' -ra www-panda1-clouder_panda1.pandaplus.biz:/tmp/2015-08-06_www-panda1-clouder_panda1.pandaplus.biz/ /tmp/2015-08-06_www-panda1-clouder_panda1.pandaplus.biz stdout : stderr : command : export BUP_DIR=/opt/backup/bup; bup index /tmp/2015-08-06_www-panda1-clouder_panda1.pandaplus.biz stdout : stderr : command : export BUP_DIR=/opt/backup/bup; bup save -n 2015-08-06_www-panda1-clouder_panda1.pandaplus.biz -d 1438879181 --strip /tmp/2015-08-06_www-panda1-clouder_panda1.pandaplus.biz stdout : stderr : command : rm -rf /tmp/2015-08-06_www-panda1-clouder_panda1.pandaplus.biz stdout : stderr : command : rm /home/backup/.ssh/keys/ stdout : stderr : connect: ssh www-panda1-clouder_panda1.pandaplus.biz command : rm -rf /tmp/2015-08-06_www-panda1-clouder_panda1.pandaplus.biz* stdout : stderr :

And then I get the same error when creating the base

ErrafayM commented 8 years ago

Ok , go inside your clouder container and check your hosts

cat /etc/hosts

collex100 commented 8 years ago

how go inside clouder container(command?)

ErrafayM commented 8 years ago

docker exec -it www-panda1-clouder su

collex100 commented 8 years ago

root@vmi46165:~# docker exec -it www-panda1-clouder su root@8eab69f770ac:/# cat /etc/hosts 172.17.1.26 8eab69f770ac 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 172.17.0.244 postfix e2938c2bde42 www-panda1-postfix 172.17.1.15 postgres c4bbbe14ebf8 www-panda1-postgres

ErrafayM commented 8 years ago

let's try to fix it manually . get inside your postgres container docker exec -it www-panda1-postgres su postgres after that vi /etc/postgresql/9.4/main/postgresql.conf

click on "a" to insert , find the listen_addresses line and change it like below . dont forget to remove the # from the begining of the line

listen_addresses = '*' # what IP address(es) to listen on;

Ctrl + C to stop the insertion then :wq to save

EDIT : dont forget to restart your postgresql after the edit , /etc/init.d/postgresql restart

collex100 commented 8 years ago

how save file?

ErrafayM commented 8 years ago

Ctrl + C then type :wq

collex100 commented 8 years ago

I did

ErrafayM commented 8 years ago

After you restarted postgresql try to create again your base .

collex100 commented 8 years ago

I restarted postgresql I created a new service for the application odoo (container has been for me).Then I created the base for the application odoo. base is created. how check work?

collex100 commented 8 years ago

log base odoo app:

connect: ssh postgres@www-panda1-postgres_panda1.pandaplus.biz command : psql -c "update pg_database set datallowconn = 'false' where datname = 'odoo_www_panda1_pandaplus_biz'; SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'odoo_www_panda1_pandaplus_biz';" stdout : pg_terminate_backend .........................

command : ln -s /etc/nginx/sites-available/odoo-www-panda1-pandaplus-biz /etc/nginx/sites-enabled/odoo-www-panda1-pandaplus-biz stdout : stderr : command : /etc/init.d/nginx reload stdout : Reloading nginx configuration: nginx.

stderr :

ErrafayM commented 8 years ago

Name of the base + your domain name in your exemple it's www.panda1.pandaplus.biz

collex100 commented 8 years ago

empty

ErrafayM commented 8 years ago

Yeah this is another problem that i had it myself too with nginx i had to install it manually in the docker server to make it work

apt-get install nginx

then get into your nginx container

docker exec -it www-panda1-nginx su

cat /etc/nginx/sites-available/www.panda1.pandaplus.biz and copy everything in there

and paste it in /etc/nginx/sites-available/default in your docker server

then finally

service nginx restart or /etc/init.d/nginx restart

collex100 commented 8 years ago

I have another container for nginx screenshot_3

ErrafayM commented 8 years ago

then docker exec -it www-panda1-proxy su

collex100 commented 8 years ago

there is no such directory

ErrafayM commented 8 years ago

then do a cd /etc/nginx/sites-available and then an ls and check for your base file

collex100 commented 8 years ago

Can I install mc inside container

ErrafayM commented 8 years ago

ls is already installed .

collex100 commented 8 years ago

Strangely, I was not able to change postgresql.conf listen_addresses = '*' # what IP address(es) to listen on;

screenshot_4

It's very strange how it was to create a base?

collex100 commented 8 years ago

Have to I completely replace the contents of default on odoo-www-panda1-pandaplus-biz? Or add odoo-www-panda1-pandaplus-biz to default?

collex100 commented 8 years ago

I have done a replacement did restart /etc/init.d/nginx restart, but visible changes have not occurred.

ErrafayM commented 8 years ago

But dont put them in your nginx container , but in your docker server (Copy from proxy container to docker server)