This question has been flagged
1 Reply
2522 Views

Good evening,

I am currently stuck on a rather restrictive problem.

Our CRM server is a debian 8 VM hosted on Azure, so managed by us. It is an ODOO v 10.

Recently we had a certificate problem, we were still able to work on ODOO but with the connection unsecured until I resolved the problem.

Today I managed to solve the problem but I am stuck on the database selection page and as soon as I press it it makes me stay on the selection page with no way to connect to it.

The error messages in the postgresql logs are as follows:


ERROR: constraint "subscription_subscription_cron_id_fkey" of relation "subscription_subscription" does not exist
ALTER TABLE subscription_subscription DROP CONSTRAINT subscription_subscription_cron_id_fkey
and
ERROR: could not obtain lock on row in relation "ir_cron"
STATEMENT: SELECT id FROM "ir_cron" WHERE id IN (6) FOR UPDATE NOWAIT

On the forums they talk about modifying a line in the odoo configuration file max_cron_threads = 1 but we probably have 2 databases as the old developer providers installed the production site and the development site on the same machine... I know it's not advisable but it was done a while ago when I wasn't there. That's why I don't dare touch anything.

I'm a neophyte and I don't have any help from my company as we are very small, so I'm asking for your help. 


If you want more details, do not hesitate .


Regards,

Avatar
Discard
Author

I've found this error code on my production odoo :

2021-08-16 10:44:55,039 1122 ERROR XXXX odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/PATH/XXXX/odoo/odoo/odoo/modules/registry.py", line 83, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/PATH/XXXX/odoo/odoo/odoo/odoo/modules/loading.py", line 335, in load_modules
force, status, report, loaded_modules, update_module)
File "/PATH/XXXX/odoo/odoo/odoo/modules/loading.py", line 237, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/PATH/XXXX/odoo/odoo/odoo/modules/loading.py", line 136, in load_module_graph
registry.init_models(cr, model_names, {'module': package.name})
File "/PATH/XXXX/odoo/odoo/odoo/modules/registry.py", line 322, in init_models
model._auto_end()
File "/PATH/XXXX/odoo/odoo/addons/subscription/models/subscription.py", line 64, in _auto_end
self.env.cr.execute("ALTER TABLE %s DROP CONSTRAINT %s" % (self._table, '%s_cron_id_fkey' % self._table))
File "/PATH/XXXX/odoo/odoo/odoo/sql_db.py", line 154, in wrapper
return f(self, *args, **kwargs)
File "/PATH/XXXX/odoo/odoo/odoo/sql_db.py", line 231, in execute
res = self._obj.execute(query, params)
ProgrammingError: constraint "subscription_subscription_cron_id_fkey" of relation "subscription_subscription" does not exist

Author

I've found something :

My odoo works with
python /PATH/XXXX/odoo/odoo/odoo-bin -c /PATH/XXXX/config/odoo.cfg

But not as a service.

Author Best Answer

I tried  max_cron_threads = 1 (it is  max_cron_threads = 0 before) but no change...

UPDATE : i can reach my odoo prod on http://publicip:deticatedport

UPDATE : postgresql.conf have ssl=on with snakeoil cert, i attempt to renew the cert with this command:  make-ssl-cert generate-default-snakeoil --force-overwrite but there is no change after restart DB and ODOO


UPDATE : My issue was resolv, i tried to start Odoo with odoo-bin and that work perfectly.

Then, i take a look on my /etc/init.d/odoo config and i found on the line :

DAEMON_OPTS = " -c odoo - u user" 

a user who doesn't exist on /etc/shadow.

I switch it to odoo user and that work !


I don't know how it's work before with gost user :(

Avatar
Discard