Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] if db-pwd != "admin" :: ?old fallback? #953

Closed
blaggacao opened this issue Jul 7, 2014 · 27 comments
Closed

[BUG] if db-pwd != "admin" :: ?old fallback? #953

blaggacao opened this issue Jul 7, 2014 · 27 comments
Assignees

Comments

@blaggacao
Copy link
Contributor

Please refer to the rather complete description including reference to runbot logs and first analysis in the response to the q&a here.

@odony
Copy link
Contributor

odony commented Jul 7, 2014

This bug report is quite incomplete (weren't you keen on using a template for reporting issues? ;-)), we would at least need explicit steps to reproduce plus version info.
Also note that the referenced runbot logs are 404 now, as automatic garbage collection happens on old build logs.

If you are talking about a master/8.0 issue, your subject line looks vaguely related to an issue that temporarily caused the admin password field to be ignored at database creation. It was introduced at c887e53 and fixed at a0ee2b5.

Please provide more details if you can still reproduce, so we can reopen it. Thanks.

@odony odony closed this as completed Jul 7, 2014
@tmotyl
Copy link
Contributor

tmotyl commented Aug 5, 2014

@xmo-odoo
Copy link
Collaborator

xmo-odoo commented Aug 5, 2014

@odony I have a repro, at least locally:

  • create an empty db (may also trigger with "old" databases, or dbs created with old versions): createdb foo
  • start 8.0: ./odoo.py
  • load http://localhost:8069 in a browser

Server starts churning and installing base in the first database it found, and ends up with

QWebTemplateNotFound: External ID not found in the system: web.login

and an Internal Server Error in the browser. Also reproduced on @sle-odoo's machine.

@xmo-odoo xmo-odoo reopened this Aug 5, 2014
@murb
Copy link

murb commented Aug 7, 2014

Have the same issue with the code fresh from the repo (openerp: OpenERP version 9.0alpha1). OS-X (10.9.4), installed PostgreSQL 9.3 through homebrew, Python (2.7.5) packages with PIP.

Initially it used the first database it encountered, which wasn't desired. Then I created an empty database, with username odoo, databasename odoo and password 'admin' (since the post in the thread at Odoo.com suggests that might help) but it didn't work.

I also noticed that it never seems to finish 2014-08-07 12:17:31,704 43694 INFO odoo openerp.models: Computing parent left and right for table ir_ui_menu... (not sure if that is related, just starting with Odoo)

I got it initially working without a problem on a Ubuntu machine, which still runs Postgres 9.1...

@murb
Copy link

murb commented Aug 7, 2014

... which let me to downgrading PostgreSQL on my OS-X machine, which worked for me (I've seen others recommending against >=9.2 , so I'm not sure whether it is a compatibility thing?

@odony
Copy link
Contributor

odony commented Aug 7, 2014

@murb Haven't been able to repro it yet, but I can confirm there is no compatibility problem with PostgreSQL >= 9.2, you can pick any version >= 9.1 for Odoo v8 or later.

@dmo-odoo
Copy link
Contributor

Got the same problem minutes ago, solved it by adding "-u all" when calling odoo.py.

@guaka
Copy link

guaka commented Aug 31, 2014

It's also happening on Ubuntu 14.04 now. Odoo v8. -u all doesn't help. It's happening with both openerp-server and openerp-gevent.

It started working again after I did dropdb odoo.

The first installation failed because of missing Python dependencies. I think this somehow left the database in an inconsistent state.

@michel-briand
Copy link

I can confirm as of package openerp 8.0.0~rc1-0, that choosing a custom admin password will break the install feature of Odoo.

Please fix that with the highest priority :) !

@yajo
Copy link
Contributor

yajo commented Sep 4, 2014

In my case with the following configuration, it also fails:

db_user = admin
db_password = admin
database = odoo
admin_passwd = admin

This is the error:

2014-09-04 11:17:21,411 12 ERROR odoo werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/werkzeug/serving.py", line 177, in run_wsgi
    execute(self.server.app)
  File "/usr/lib/python2.7/site-packages/werkzeug/serving.py", line 165, in execute
    application_iter = app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/openerp/service/server.py", line 280, in app
    return self.app(e, s)
  File "/usr/local/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 216, in application
    return application_unproxied(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 202, in application_unproxied
    result = handler(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/openerp/http.py", line 1218, in __call__
    return self.dispatch(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/openerp/http.py", line 1192, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/lib/python2.7/site-packages/werkzeug/wsgi.py", line 579, in __call__
    return self.app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/openerp/http.py", line 1364, in dispatch
    response = self.get_response(httprequest, result, explicit_session)
  File "/usr/local/lib/python2.7/dist-packages/openerp/http.py", line 1299, in get_response
    result = request.registry['ir.http']._handle_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_http.py", line 105, in _handle_exception
    return request._handle_exception(exception)
  File "/usr/local/lib/python2.7/dist-packages/openerp/http.py", line 592, in _handle_exception
    return super(HttpRequest, self)._handle_exception(exception)
  File "/usr/local/lib/python2.7/dist-packages/openerp/http.py", line 1296, in get_response
    result.flatten()
  File "/usr/local/lib/python2.7/dist-packages/openerp/http.py", line 1169, in flatten
    self.response.append(self.render())
  File "/usr/local/lib/python2.7/dist-packages/openerp/http.py", line 1161, in render
    context=request.context)
  File "/usr/local/lib/python2.7/dist-packages/openerp/api.py", line 234, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_ui_view.py", line 1004, in render
    return self.pool[engine].render(cr, uid, id_or_xml_id, qcontext, loader=loader, context=context)
  File "/usr/local/lib/python2.7/dist-packages/openerp/api.py", line 234, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 247, in render
    return self.render_node(self.get_template(id_or_xml_id, qwebcontext), qwebcontext)
  File "/usr/local/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 187, in get_template
    raise_qweb_exception(QWebTemplateNotFound, message="Loader could not find template %r" % name, template=origin_template)
  File "/usr/local/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 185, in get_template
    xml_doc = qwebcontext.loader(name)
  File "/usr/local/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_ui_view.py", line 1002, in loader
    return self.read_template(cr, uid, name, context=context)
  File "/usr/local/lib/python2.7/dist-packages/openerp/api.py", line 234, in wrapper
    return old_api(self, *args, **kwargs)
  File "<string>", line 2, in read_template

  File "/usr/local/lib/python2.7/dist-packages/openerp/tools/cache.py", line 119, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_ui_view.py", line 846, in read_template
    view_id = self.pool['ir.model.data'].xmlid_to_res_id(cr, uid, xml_id, raise_if_not_found=True)
  File "/usr/local/lib/python2.7/dist-packages/openerp/api.py", line 234, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_model.py", line 906, in xmlid_to_res_id
    return self.xmlid_to_res_model_res_id(cr, uid, xmlid, raise_if_not_found)[1]
  File "/usr/local/lib/python2.7/dist-packages/openerp/api.py", line 234, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_model.py", line 898, in xmlid_to_res_model_res_id
    return self.xmlid_lookup(cr, uid, xmlid)[1:3]
  File "/usr/local/lib/python2.7/dist-packages/openerp/api.py", line 234, in wrapper
    return old_api(self, *args, **kwargs)
  File "<string>", line 2, in xmlid_lookup

  File "/usr/local/lib/python2.7/dist-packages/openerp/tools/cache.py", line 71, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_model.py", line 888, in xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % (xmlid))
QWebTemplateNotFound: External ID not found in the system: web.login

The workaround of setting db_passwd = admin does not work for me :(

The host is CentOS 7 with package from odoo_8.0rc1-20140903-160407.noarch.rpm.

@yajo
Copy link
Contributor

yajo commented Sep 5, 2014

OK, I found the problem. It has nothing to do with password being "admin" or not.

It's just that only the base module gets installed by default, but the template for web.login is defined in the module web.

Try this:

  1. Create an empty database in your Postgres server called newdb.
  2. Execute: openerp-server --config openerp-server.conf -i base,web -d newdb
  3. Log in. This time you will be able.

So, web should be auto-installed by default too.

@odony
Copy link
Contributor

odony commented Sep 5, 2014

For the record, web is set to auto-install with no dependencies so it should always be installed, just like base. If it is not, then that is a bug indeed.

@rvalyi
Copy link
Contributor

rvalyi commented Sep 5, 2014

Hello, I didn't investigate this further, but I could observe this bug/strack trace
I think it typically happens if I create a single database with createdb with the proper owner.
then I start OpenERP and try to login view the browser immediately. It will see that there is no available database so it will try to install the base module in the unique empty database available and the way it will install it I get this traceback in the server log and I'm not able to login. Will try to give more accurate information eventually.

@yajo
Copy link
Contributor

yajo commented Sep 8, 2014

Execute: openerp-server --config openerp-server.conf -i base,web -d newdb

Even more weird: if you use that workaround, but with openerp-gevent instead of openerp-server, it will still fail.

@itunb
Copy link

itunb commented Sep 9, 2014

maybe this is the problem
passlib is not install.
try
sudo pip install passlib

@tadeusz-karpinski-openglobe

I deleted all databases
su postgres
dropdb 'db_name'

then I installed passlib
apt-get install python-passlib

started odoo

And it worked

@yajo
Copy link
Contributor

yajo commented Sep 10, 2014

I had python-passlib 1.5.3 installed since the begining.

@arriouach
Copy link

tadeusz-karpinski-openglobe ! thanks, its work.

odony added a commit that referenced this issue Sep 17, 2014
If the server was started without -i or -u and
happened to initialize a fresh database,
auto-installed modules that depend
on `base` only would stay in status "to install"
without actually being installed (until the next
installation round was triggered).
This was of little consequence in 7.0, but causes
a crash in 8.0.

Fixes #953
@odony
Copy link
Contributor

odony commented Sep 17, 2014

The bug was triggered when a new database was initialized from scratch and the server had been started without any explicit -i, -u or equivalent configuration parameters.
In that situation only the base module was installed, and other auto-installable modules were only marked for install but not actually installed.
This was the case since v7.0, but in 7.0 this did not cause a crash, it only delayed the actual installation of those modules. In 8.0+ it crashes because the web now contains data records and those are required for the frontend/backend to work.

Fixed in 7.0 at 938502a and forward-ported up to 8.0 at e5bff82.

Thanks for reporting, commenting and investigating!

@odony odony closed this as completed Sep 17, 2014
@thebestfriend
Copy link

@itunb: thanks for your help :). It work for me too

@miltonlab
Copy link

My solution was the same @tadeusz-karpinski-openglobe !!! Install passlib an works !!

@bjoliveau
Copy link

Thanks to @tadeusz-karpinski-openglobe
Install passlib and it works well ;-)

@kingofsevens
Copy link

I had a working environment.. I did nothing interesting. I have an up to date code. Only thing I did was to delete all the databases and can't recreate a new one anymore. I used to have v7 and v8 databases under the same user and I was able to create new databases right until the moment I deleted them all. Now I am getting the same error and no way to create a fresh empty database. I am getting this error in Ubuntu fresh server and in my Mac. Below is the output of fresh code cloned to mac just now. And I have passlib install in all the servers I have tried.

2014-12-07 11:51:57,922 29750 ERROR mot werkzeug: Error on request:
Traceback (most recent call last):
  File "/Users/xxx/.virtualenvs/odoo/lib/python2.7/site-packages/Werkzeug-0.9.6-py2.7.egg/werkzeug/serving.py", line 177, in run_wsgi
    execute(self.server.app)
  File "/Users/xxx/.virtualenvs/odoo/lib/python2.7/site-packages/Werkzeug-0.9.6-py2.7.egg/werkzeug/serving.py", line 165, in execute
    application_iter = app(environ, start_response)
  File "/Users/xxx/Desktop/v8_github/openerp/service/server.py", line 281, in app
    return self.app(e, s)
  File "/Users/xxx/Desktop/v8_github/openerp/service/wsgi_server.py", line 216, in application
    return application_unproxied(environ, start_response)
  File "/Users/xxx/Desktop/v8_github/openerp/service/wsgi_server.py", line 202, in application_unproxied
    result = handler(environ, start_response)
  File "/Users/xxx/Desktop/v8_github/openerp/http.py", line 1236, in __call__
    return self.dispatch(environ, start_response)
  File "/Users/xxx/Desktop/v8_github/openerp/http.py", line 1210, in __call__
    return self.app(environ, start_wrapped)
  File "/Users/xxx/.virtualenvs/odoo/lib/python2.7/site-packages/Werkzeug-0.9.6-py2.7.egg/werkzeug/wsgi.py", line 588, in __call__
    return self.app(environ, start_response)
  File "/Users/xxx/Desktop/v8_github/openerp/http.py", line 1382, in dispatch
    response = self.get_response(httprequest, result, explicit_session)
  File "/Users/xxx/Desktop/v8_github/openerp/http.py", line 1317, in get_response
    result = request.registry['ir.http']._handle_exception(e)
  File "/Users/xxx/Desktop/v8_github/openerp/addons/base/ir/ir_http.py", line 100, in _handle_exception
    return request._handle_exception(exception)
  File "/Users/xxx/Desktop/v8_github/openerp/http.py", line 617, in _handle_exception
    return super(HttpRequest, self)._handle_exception(exception)
  File "/Users/xxx/Desktop/v8_github/openerp/http.py", line 1314, in get_response
    result.flatten()
  File "/Users/xxx/Desktop/v8_github/openerp/http.py", line 1187, in flatten
    self.response.append(self.render())
  File "/Users/xxx/Desktop/v8_github/openerp/http.py", line 1181, in render
    context=request.context)
  File "/Users/xxx/Desktop/v8_github/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/Users/xxx/Desktop/v8_github/openerp/addons/base/ir/ir_ui_view.py", line 1007, in render
    return self.pool[engine].render(cr, uid, id_or_xml_id, qcontext, loader=loader, context=context)
  File "/Users/xxx/Desktop/v8_github/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/Users/xxx/Desktop/v8_github/openerp/addons/base/ir/ir_qweb.py", line 253, in render
    return self.render_node(self.get_template(id_or_xml_id, qwebcontext), qwebcontext)
  File "/Users/xxx/Desktop/v8_github/openerp/addons/base/ir/ir_qweb.py", line 184, in get_template
    raise_qweb_exception(QWebTemplateNotFound, message="Loader could not find template %r" % name, template=origin_template)
  File "/Users/xxx/Desktop/v8_github/openerp/addons/base/ir/ir_qweb.py", line 182, in get_template
    xml_doc = qwebcontext.loader(name)
  File "/Users/xxx/Desktop/v8_github/openerp/addons/base/ir/ir_ui_view.py", line 1005, in loader
    return self.read_template(cr, uid, name, context=context)
  File "/Users/xxx/Desktop/v8_github/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "<string>", line 2, in read_template

  File "/Users/xxx/Desktop/v8_github/openerp/tools/cache.py", line 119, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/Users/xxx/Desktop/v8_github/openerp/addons/base/ir/ir_ui_view.py", line 849, in read_template
    view_id = self.pool['ir.model.data'].xmlid_to_res_id(cr, uid, xml_id, raise_if_not_found=True)
  File "/Users/xxx/Desktop/v8_github/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/Users/xxx/Desktop/v8_github/openerp/addons/base/ir/ir_model.py", line 941, in xmlid_to_res_id
    return self.xmlid_to_res_model_res_id(cr, uid, xmlid, raise_if_not_found)[1]
  File "/Users/xxx/Desktop/v8_github/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/Users/xxx/Desktop/v8_github/openerp/addons/base/ir/ir_model.py", line 933, in xmlid_to_res_model_res_id
    return self.xmlid_lookup(cr, uid, xmlid)[1:3]
  File "/Users/xxx/Desktop/v8_github/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "<string>", line 2, in xmlid_lookup

  File "/Users/xxx/Desktop/v8_github/openerp/tools/cache.py", line 71, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/Users/xxx/Desktop/v8_github/openerp/addons/base/ir/ir_model.py", line 923, in xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % (xmlid))
QWebTemplateNotFound: External ID not found in the system: web.login

amon-ra pushed a commit to oondeo/docker-odoo that referenced this issue Apr 9, 2016
amon-ra pushed a commit to oondeo/docker-odoo that referenced this issue Apr 9, 2016
@Phuongtam
Copy link

I met that problem a little minutes ago, I follow you and install 'passlib'. However, the problem was not fixed. Incidentally, I found the reason is : my old account in module web was saved on browser. And I ran localhost in hidden browser, then my web operated well.

@pedrobaeza
Copy link
Collaborator

Clean you browser cache

@SalahAdDin
Copy link

it does not work.

@Phuongtam
Copy link

Phuongtam commented Jun 25, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests