我已經創建了docker openerp容器。從瀏覽器首次啓動是好的,我可以創建新的數據庫或者恢復以前的數據庫。docker openerp無法啓動 - 停止
然後我做了docker stop openerp
,然後是docker start openerp
。 從瀏覽器再次訪問不再有效。我得到的背景界面,但openerpserver錯誤。
我已經嘗試過使用我自己的Docker鏡像,它可以在github yvnicolas/docker-openerp repo上找到,也可以使用Dockerhub中的tinyerp/ubuntu-openerp回購以及類似的效果。
這裏是錯誤跟蹤我得到:
Client Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 204, in dispatch
response["result"] = method(self, **self.params)
File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1427, in load
action = req.session.model(action_type).read([action_id], False, ctx)
File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 42, in proxy
result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 30, in proxy_method
result = self.session.send(self.service_name, method, *args)
File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 103, in send
raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 89, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 296, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 626, in dispatch
res = fn(db, uid, *params)
File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 190, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 132, in wrapper
return f(self, dbname, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 199, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 187, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3679, in read
result = self._read_flat(cr, user, select, fields, context, load)
File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3800, in _read_flat
res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
File "/usr/lib/pymodules/python2.7/openerp/osv/fields.py", line 1145, in get
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_actions.py", line 211, in _search_view
'search', context=context)
File "/usr/lib/pymodules/python2.7/openerp/addons/account/account_invoice.py", line 363, in fields_view_get
res = super(account_invoice,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 2278, in fields_view_get
xarch, xfields = self.__view_look_dom_arch(cr, user, result['arch'], view_id, context=ctx)
File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 1930, in __view_look_dom_arch
fields = self.fields_get(cr, user, None, context)
File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3597, in fields_get
res_trans = translation_obj._get_source(cr, user, self._name + ',' + f, 'field', context['lang'])
File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 18, in lookup
r = self.lookup(self2, cr, *args)
File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 46, in lookup
value = d[key] = self.method(self2, cr, *args)
File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_translation.py", line 336, in _get_source
(lang or '', types, tools.ustr(name)))
File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 161, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 226, in execute
res = self._obj.execute(query, params)
InternalError: current transaction is aborted, commands ignored until end of transaction block
我期待着我在停止/啓動openerp時停止其服務或進程時在專用機器上獲得的相同行爲。 Docker似乎做了相當不錯的工作,因爲在我的docker stop和docker啓動後,似乎我的ENTRYPOINT中的啓動腳本再次啓動,並且爲postgres和openerp啓動了所需的進程。似乎openerp在Web界面和數據庫內容之間出現了混亂。數據庫內容仍然存在,因爲我在數據容器卷內創建了我的postgres集羣。 – 2014-10-07 17:43:25
我明白了。對不起,回答錯誤的問題:) – seanmcl 2014-10-07 17:56:19