2014-10-07 80 views
1

我已經創建了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 

回答

0

什麼是你希望當您運行啓動和停止會怎樣呢?停止正在運行的容器將會丟失所有內存數據和所有進程。您將需要重新啓動正在運行的任何進程,例如,再次發出啓動CMD/ENTRYPOINT。但是你創建的所有數據庫都將會消失。如果你想保留進程和數據,你可以嘗試新的暫停/取消暫停命令,0.12.0中的新命令。這是一個快照機制,可以做你認爲應該做的事情。

+0

我期待着我在停止/啓動openerp時停止其服務或進程時在專用機器上獲得的相同行爲。 Docker似乎做了相當不錯的工作,因爲在我的docker stop和docker啓動後,似乎我的ENTRYPOINT中的啓動腳本再次啓動,並且爲postgres和openerp啓動了所需的進程。似乎openerp在Web界面和數據庫內容之間出現了混亂。數據庫內容仍然存在,因爲我在數據容器卷內創建了我的postgres集羣。 – 2014-10-07 17:43:25

+0

我明白了。對不起,回答錯誤的問題:) – seanmcl 2014-10-07 17:56:19

0

我想知道是否有某種狀態保留正在進行。你做你的碼頭運行,它啓動一切,但碼頭停留將保持容器狀態,碼頭工人開始重新啓動相同的容器,而不是創建一個新的圖像。如果你做了一個docker rm然後碼頭運行來創建一個新的容器它是否工作?

+0

其實,sice的全部目的不是每次重新載入數據,我試過你的建議保留數據容器。如果我從一個全新的空數據容器開始,它可以工作,但我必須手動恢復我的基礎,這不是我想要的。如果我用現有的數據啓動一個新的執行容器,我有同樣的問題... – 2014-10-08 17:54:36