Odoo stuck on deploying

Hi everyone,

I lost power to truenas 24.10 (ups batts might have kick bucket)
all my apps are working but odoo is not, tried stopping it and start, but no luck.
i new with app and got some data i need.

i got some logs from container name odoo show starting but postgres is running

2025-04-14 11:29:13.695807+00:00AssertionError: /var/lib/odoo/sessions: directory is not writable
2025-04-14 11:29:13.695823+00:002025-04-14 11:29:13,695 1 INFO ? werkzeug: 127.0.0.1 - - [14/Apr/2025 11:29:13] "GET /web/health HTTP/1.1" 500 - 0 0.000 0.001
2025-04-14 11:29:23.767072+00:002025-04-14 11:29:23,766 1 ERROR ? odoo.http: Exception during request handling. 
2025-04-14 11:29:23.767151+00:00Traceback (most recent call last):
2025-04-14 11:29:23.767165+00:00File "/usr/lib/python3/dist-packages/odoo/tools/config.py", line 776, in session_dir
2025-04-14 11:29:23.767174+00:00os.makedirs(d, 0o700)
2025-04-14 11:29:23.767182+00:00File "<frozen os>", line 225, in makedirs
2025-04-14 11:29:23.767189+00:00FileExistsError: [Errno 17] File exists: '/var/lib/odoo/sessions'
2025-04-14 11:29:23.767197+00:002025-04-14T11:29:23.767197413Z
2025-04-14 11:29:23.767204+00:00During handling of the above exception, another exception occurred:
2025-04-14 11:29:23.767221+00:002025-04-14T11:29:23.767221712Z
2025-04-14 11:29:23.767229+00:00Traceback (most recent call last):
2025-04-14 11:29:23.767236+00:00File "/usr/lib/python3/dist-packages/odoo/http.py", line 2364, in __call__
2025-04-14 11:29:23.767243+00:00request._post_init()
2025-04-14 11:29:23.767250+00:00File "/usr/lib/python3/dist-packages/odoo/http.py", line 1450, in _post_init
2025-04-14 11:29:23.767257+00:00self.session, self.db = self._get_session_and_dbname()
2025-04-14 11:29:23.767264+00:00^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-14 11:29:23.767271+00:00File "/usr/lib/python3/dist-packages/odoo/http.py", line 1456, in _get_session_and_dbname
2025-04-14 11:29:23.767278+00:00session = root.session_store.new()
2025-04-14 11:29:23.767286+00:00^^^^^^^^^^^^^^^^^^
2025-04-14 11:29:23.767293+00:00File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 42, in __get__
2025-04-14 11:29:23.767300+00:00value = self.fget(obj)
2025-04-14 11:29:23.767308+00:00^^^^^^^^^^^^^^
2025-04-14 11:29:23.767315+00:00File "/usr/lib/python3/dist-packages/odoo/http.py", line 2289, in session_store
2025-04-14 11:29:23.767323+00:00path = odoo.tools.config.session_dir
2025-04-14 11:29:23.767330+00:00^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-14 11:29:23.767337+00:00File "/usr/lib/python3/dist-packages/odoo/tools/config.py", line 780, in session_dir
2025-04-14 11:29:23.767344+00:00assert os.access(d, os.W_OK), \
2025-04-14 11:29:23.767351+00:00^^^^^^^^^^^^^^^^^^^^^
2025-04-14 11:29:23.767358+00:00AssertionError: /var/lib/odoo/sessions: directory is not writable
2025-04-14 11:29:23.767367+00:002025-04-14 11:29:23,767 1 INFO ? werkzeug: 127.0.0.1 - - [14/Apr/2025 11:29:23] "GET /web/health HTTP/1.1" 500 - 0 0.000 0.001
2025-04-14 11:29:33.852103+00:002025-04-14 11:29:33,851 1 ERROR ? odoo.http: Exception during request handling. 
2025-04-14 11:29:33.852162+00:00Traceback (most recent call last):
2025-04-14 11:29:33.852173+00:00File "/usr/lib/python3/dist-packages/odoo/tools/config.py", line 776, in session_dir
2025-04-14 11:29:33.852181+00:00os.makedirs(d, 0o700)
2025-04-14 11:29:33.852188+00:00File "<frozen os>", line 225, in makedirs
2025-04-14 11:29:33.852196+00:00FileExistsError: [Errno 17] File exists: '/var/lib/odoo/sessions'
2025-04-14 11:29:33.852203+00:002025-04-14T11:29:33.852203330Z
2025-04-14 11:29:33.852212+00:00During handling of the above exception, another exception occurred:
2025-04-14 11:29:33.852220+00:002025-04-14T11:29:33.852220579Z
2025-04-14 11:29:33.852227+00:00Traceback (most recent call last):
2025-04-14 11:29:33.852234+00:00File "/usr/lib/python3/dist-packages/odoo/http.py", line 2364, in __call__
2025-04-14 11:29:33.852242+00:00request._post_init()
2025-04-14 11:29:33.852248+00:00File "/usr/lib/python3/dist-packages/odoo/http.py", line 1450, in _post_init
2025-04-14 11:29:33.852256+00:00self.session, self.db = self._get_session_and_dbname()
2025-04-14 11:29:33.852263+00:00^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-14 11:29:33.852270+00:00File "/usr/lib/python3/dist-packages/odoo/http.py", line 1456, in _get_session_and_dbname
2025-04-14 11:29:33.852277+00:00session = root.session_store.new()
2025-04-14 11:29:33.852284+00:00^^^^^^^^^^^^^^^^^^
2025-04-14 11:29:33.852291+00:00File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 42, in __get__
2025-04-14 11:29:33.852298+00:00value = self.fget(obj)
2025-04-14 11:29:33.852305+00:00^^^^^^^^^^^^^^
2025-04-14 11:29:33.852312+00:00File "/usr/lib/python3/dist-packages/odoo/http.py", line 2289, in session_store
2025-04-14 11:29:33.852320+00:00path = odoo.tools.config.session_dir
2025-04-14 11:29:33.852326+00:00^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-14 11:29:33.852334+00:00File "/usr/lib/python3/dist-packages/odoo/tools/config.py", line 780, in session_dir
2025-04-14 11:29:33.852341+00:00assert os.access(d, os.W_OK), \
2025-04-14 11:29:33.852348+00:00^^^^^^^^^^^^^^^^^^^^^
2025-04-14 11:29:33.852355+00:00AssertionError: /var/lib/odoo/sessions: directory is not writable
2025-04-14 11:29:33.852701+00:002025-04-14 11:29:33,852 1 INFO ? werkzeug: 127.0.0.1 - - [14/Apr/2025 11:29:33] "GET /web/health HTTP/1.1" 500 - 0 0.000 0.001

i take any help i can get.

Cheers,
Luke.

looks like a permission issue. Did you mount that directory via hostpath to a dataset?

Hi, thankyou for reply.

i did see that but not sure how fix it, i made zero changes odoo, just installed it, started using it. is there way too ssh into it fix permission?

cheers.

I have the same problem, it started when i upgraded to Odoo 18, when i roll back to 17 it works, if you find a solution please share it.

Default install with ix-volumes is fine, so either something changed with permissions or yours are different from a stock install

I’d file a bug report at GitHub - truenas/apps if you want it fixed

Yes that works for me as well, so the app itself doesn’t seem to be broken, but when I try fresh installs with hostpath it is still broken, so seems like that’s the problem, will create a github issue

If you’re using hostpath and can’t install is broken it’s your permissions are off, but anyways, file a bug report if you want, they’ll tell you what to do.

You can always see the permissions of the app inside a test install, they’ll be shown on the side, aka

If it uses a postgres dataset, you’re better off using the automatic permissions checkbox for that one:

https://www.truenas.com/docs/truenasapps/managingapps/#postgres-datasets

1 Like