Reputation: 528
I am able to restore the Odoo database on one of our cloud Ubuntu instances. But while referring to that application in Odoo Conf file, we are getting the below error. Same database is working fine in local environment
File "/usr/lib/python3.8/socketserver.py", line 466, in server_bind self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use 2021-03-02 19:16:03,134 7351 ERROR ? odoo.sql_db: bad query: CREATE SEQUENCE base_registry_signaling INCREMENT BY 1 START WITH 1
ERROR: relation "base_registry_signaling" already exists
2021-03-02 19:16:03,278 7351 ERROR ? odoo.modules.registry: Failed to load registry
2021-03-02 19:16:03,281 7351 CRITICAL ? odoo.service.server: Failed to initialize database databasename
.
Traceback (most recent call last):
File "/home/odoo2/odoo-12/odoo/service/server.py", line 1162, in preload_registries registry = Registry.new(dbname, update_module=update_module)
File "/home/odoo2/odoo-12/odoo/modules/registry.py", line 83, in new registry.setup_signaling()
File "/home/odoo2/odoo-12/odoo/modules/registry.py", line 378, in setup_signaling cr.execute("CREATE SEQUENCE base_registry_signaling INCREMENT BY 1 START WITH 1")
File "/home/odoo2/odoo-12/odoo/sql_db.py", line 148, in wrapper return f(self, *args, **kwargs)
File "/home/odoo2/odoo-12/odoo/sql_db.py", line 225, in execute res = self._obj.execute(query, params)
psycopg2.errors.DuplicateTable: relation "base_registry_signaling" already exists
Upvotes: 1
Views: 2521
Reputation: 336
I just stumbled on the same problem. Turns out I dumped the db with the --no-owner option and on import it set the owner to the current user - which was different.
Try setting the owner of the db and tables to the user your're using for odoo.
ALTER DATABASE "db_name" OWNER TO user;
-- Assign everything in the currently selected db to 'user'.
REASSIGN OWNED BY other_user TO user;
Upvotes: 3