YannickB / odoo-hosting

Other
64 stars 50 forks source link

Error when deploy odoo container #57

Closed ChristopherPa closed 8 years ago

ChristopherPa commented 8 years ago

Hi,

I get this error when i try to deploy the odoo or clouder container:

ValidateError Error while validating constraint Data error! You need to specify a link to Clouder for the container local-clouder.

The Logfile shows:

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 948, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 940, in _call_kw
    return checked_call(request.db, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 939, in checked_call
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/api.py", line 345, in old_api
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder/clouder_model.py", line 307, in create
    res = super(ClouderModel, self).create(vals)
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/models.py", line 4092, in create
    record = self.browse(self._create(old_vals))
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/api.py", line 481, in new_api
    result = method(self._model, cr, uid, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/models.py", line 4277, in _create
    result += self._columns[field].set(cr, self, id_new, field, vals[field], user, rel_context) or []
  File "/opt/odoo/odoo/openerp/osv/fields.py", line 801, in set
    id_new = obj.create(cr, user, act[2], context=context)
  File "/opt/odoo/odoo/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/api.py", line 345, in old_api
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder/clouder_model.py", line 307, in create
    res = super(ClouderModel, self).create(vals)
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/models.py", line 4092, in create
    record = self.browse(self._create(old_vals))
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/api.py", line 481, in new_api
    result = method(self._model, cr, uid, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/models.py", line 4283, in _create
    recs._validate_fields(vals)
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/models.py", line 1282, in _validate_fields
    raise ValidationError("Error while validating constraint\n\n%s" % tools.ustr(e))
ValidationError: ('ValidateError', u'Error while validating constraint\n\nData error!\nYou need to specify a link to Clouder for the container local-clouder')

thx for your help.

YannickB commented 8 years ago

Hi Christopher, check the one2many links in the container, you need to have the target field filled with another container (for example postgres)

It seems there is an error with the error message

ChristopherPa commented 8 years ago

Hi Yannick,

In the Application Link section are all target fields filled wiith the links to their container (e.g. postgres got the link to the postgres container and postfix got the link to the postfix container).

The error is still same.

ErrafayM commented 8 years ago

Have the same problem here , you need to give it Shinken container. or remove Shinken from the Clouder application and try again to create your odoo container.

ChristopherPa commented 8 years ago

hi ErrafayM,

If i remove shinken from the Application Link section, i get this error Message:

ValidateError Error while validating constraint Data error! You need to specify a link to Shinken for the container local-clouder.

And if i fill the target field of Shinken i get this error Message:

Connect error!

We were not able to connect to your server. Please make sure you add the public key in the authorized_keys file of your root user on your server. If you were trying to connect to a container, a click on the 'reset key' button on the container record may resolve the problem. Target : localhost Error : [Errno 111] Connection refused

The logfile shows:

2015-11-12 16:00:05,444 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:05,881 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:05,881 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:06,412 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:06,677 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:06,691 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:06,706 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:07,089 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:07,100 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:07,448 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:07,732 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:07,732 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:08,683 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:09,165 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:09,165 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:10,374 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:10,858 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:10,858 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:11,383 2163 INFO HIWI paramiko.transport.sftp: [chan 2] Opened sftp connection (server version 3)
2015-11-12 16:00:11,385 2163 INFO HIWI paramiko.transport.sftp: [chan 2] sftp session closed.
2015-11-12 16:00:18,519 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.7p1)
2015-11-12 16:00:18,659 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:24,877 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:25,348 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:25,348 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:25,533 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:26,110 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:26,111 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:26,128 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:26,597 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:26,598 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:26,985 2163 ERROR HIWI openerp.http: Exception during JSON request handling.
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 948, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 940, in _call_kw
    return checked_call(request.db, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 939, in checked_call
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/api.py", line 345, in old_api
    result = method(recs, *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 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder/clouder_template_registry/clouder_template_registry.py", line 70, in deploy
    return super(ClouderContainer, self).deploy()
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder/clouder_container.py", line 703, in deploy
    self.deploy_post()
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder_template_postgres/clouder_template_postgres.py", line 38, in deploy_post
    super(ClouderContainer, self).deploy_post()
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder_template_mysql/clouder_template_mysql.py", line 40, in deploy_post
    super(ClouderContainer, self).deploy_post()
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder_template_shinken/clouder_template_shinken.py", line 92, in deploy_post
    super(ClouderContainer, self).deploy_post()
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder_template_postfix/clouder_template_postfix.py", line 44, in deploy_post
    ssh = self.connect(self.fullname)
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder/clouder_model.py", line 412, in connect
    "Error : " + str(inst)))
except_orm: (u'Connect error!', u"We were not able to connect to your server. Please make sure you add the public key in the authorized_keys file of your root user on your server.\nIf you were trying to connect to a container, a click on the 'reset key' button on the container record may resolve the problem.\nTarget : localhost\nError : [Errno 111] Connection refused")

All other container can connect to the server "localhost". Only the Clouder/Odoo container doesn't work.

Thx for your help.

ErrafayM commented 8 years ago

Can you wait for a few ? I reinstalled Clouder again . i'll check if i get again the same error.

ChristopherPa commented 8 years ago

i can wait, i have time.

Thanks for the effort and your help

YannickB commented 8 years ago

It seems the error come from the shinken container indeed, it's probably not deploy correctly and thus clouder can't connect to it.

To get your Odoo container running the quickest way is to bypass the shinken container by removing the shinken link from both your odoo container and your odoo application (this is the link in the application which trigger the error)

ErrafayM commented 8 years ago

Worked just fine after i added the link of my Shinken container. or just like Yannick said , remove Shinken link from Odoo/Clouder Application. and will work aswell.

ChristopherPa commented 8 years ago

hi yannick and Errafay,

thx for your suggested solutions but they didnt help. If i remove the shinken link i get the Error Message of Post number 1 with the same logs.

Also removing the shinken container doesn't help.

ErrafayM commented 8 years ago

Are you sure you did this ? Remove Shinken from Odoo Application & also same on Clouder ? Because i did it and worked for me . removefromapplication

ChristopherPa commented 8 years ago

Ok. i removed the wrong links. i will check this.

ChristopherPa commented 8 years ago

I removed Shinken from Odoo Application and from Clouder Application. It didn't work for me. I get this Error Message:

Connect error!

We were not able to connect to your server. Please make sure you add the public key in the authorized_keys file of your root user on your server. If you were trying to connect to a container, a click on the 'reset key' button on the container record may resolve the problem. Target : localhost Error : [Errno 111] Connection refused

The logfile shows:

2015-11-12 16:00:05,444 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:05,881 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:05,881 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:06,412 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:06,677 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:06,691 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:06,706 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:07,089 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:07,100 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:07,448 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:07,732 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:07,732 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:08,683 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:09,165 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:09,165 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:10,374 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:10,858 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:10,858 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:11,383 2163 INFO HIWI paramiko.transport.sftp: [chan 2] Opened sftp connection (server version 3)
2015-11-12 16:00:11,385 2163 INFO HIWI paramiko.transport.sftp: [chan 2] sftp session closed.
2015-11-12 16:00:18,519 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.7p1)
2015-11-12 16:00:18,659 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:24,877 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:25,348 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:25,348 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:25,533 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:26,110 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:26,111 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:26,128 2163 INFO ? paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1p1)
2015-11-12 16:00:26,597 2163 INFO ? paramiko.transport: Auth banner: Ubuntu 14.04.3 LTS

2015-11-12 16:00:26,598 2163 INFO ? paramiko.transport: Authentication (publickey) successful!
2015-11-12 16:00:26,985 2163 ERROR HIWI openerp.http: Exception during JSON request handling.
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 948, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 940, in _call_kw
    return checked_call(request.db, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 939, in checked_call
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/api.py", line 345, in old_api
    result = method(recs, *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 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder/clouder_template_registry/clouder_template_registry.py", line 70, in deploy
    return super(ClouderContainer, self).deploy()
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder/clouder_container.py", line 703, in deploy
    self.deploy_post()
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder_template_postgres/clouder_template_postgres.py", line 38, in deploy_post
    super(ClouderContainer, self).deploy_post()
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder_template_mysql/clouder_template_mysql.py", line 40, in deploy_post
    super(ClouderContainer, self).deploy_post()
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder_template_shinken/clouder_template_shinken.py", line 92, in deploy_post
    super(ClouderContainer, self).deploy_post()
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder_template_postfix/clouder_template_postfix.py", line 44, in deploy_post
    ssh = self.connect(self.fullname)
  File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/addons/clouder/clouder_model.py", line 412, in connect
    "Error : " + str(inst)))
except_orm: (u'Connect error!', u"We were not able to connect to your server. Please make sure you add the public key in the authorized_keys file of your root user on your server.\nIf you were trying to connect to a container, a click on the 'reset key' button on the container record may resolve the problem.\nTarget : localhost\nError : [Errno 111] Connection refused")
ErrafayM commented 8 years ago

Weird. try to rebuild your odoo image , or check odoo image logs

ChristopherPa commented 8 years ago

I checked the odoo image logs and the code. There was a problem with downloadlink of wkthmltopdf. The link wasn't up to date and because of that it was impossible to build a correct odoo image.

Thx for your help :+1:

ErrafayM commented 8 years ago

You're welcome.