Open luochen1990 opened 1 year ago
The daemon can suddenly exit when build successed.
4月 22 15:07:01 home-server odoo-start[624399]: File: "/nix/store/fdqpyj613dr0v1l1lrzqhzay7sk4xg87-python3-3.10.10/lib/python3.10/http/server.py", line 433, in handle
4月 22 15:07:01 home-server odoo-start[624399]: self.handle_one_request()
4月 22 15:07:01 home-server odoo-start[624399]: File: "/nix/store/fdqpyj613dr0v1l1lrzqhzay7sk4xg87-python3-3.10.10/lib/python3.10/http/server.py", line 401, in handle_one_request
4月 22 15:07:01 home-server odoo-start[624399]: self.raw_requestline = self.rfile.readline(65537)
4月 22 15:07:01 home-server odoo-start[624399]: File: "/nix/store/fdqpyj613dr0v1l1lrzqhzay7sk4xg87-python3-3.10.10/lib/python3.10/socket.py", line 705, in readinto
4月 22 15:07:01 home-server odoo-start[624399]: return self._sock.recv_into(b)
4月 22 15:07:01 home-server odoo-start[624399]: 2023-04-22 07:07:01,432 624399 INFO ? odoo.service.server: Initiating server reload
4月 22 15:07:01 home-server odoo-start[624399]: 2023-04-22 07:07:01,619 624399 INFO ? odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 2 connections
4月 22 15:07:01 home-server odoo-start[624399]: File "/nix/store/vcjhkg3cyas3zi3xzf0myw3f5jy9nz39-odoo-15.0.20230317/bin/odoo", line 2
4月 22 15:07:01 home-server odoo-start[624399]: PATH=${PATH:+':'$PATH':'}
4月 22 15:07:01 home-server odoo-start[624399]: ^
4月 22 15:07:01 home-server odoo-start[624399]: SyntaxError: invalid syntax
4月 22 15:07:01 home-server systemd[1]: odoo.service: Main process exited, code=exited, status=1/FAILURE
4月 22 15:07:01 home-server systemd[1]: odoo.service: Failed with result 'exit-code'.
4月 22 15:07:01 home-server systemd[1]: odoo.service: Consumed 1.128s CPU time, received 7.3K IP traffic, sent 131.6K IPtraffic.
@mkg20001 Hello, thanks for taking odoo into NixOS, that is very helpful. But I don't know how it is expected to be used. After I enter http://127.0.0.1:8069/web/database/selector
, there is a form and two button Create database
, or restore a database
, but I cannot tell odoo to use the odoo
database (which is created by the services.odoo
module), and if I choose to create a new database, then I'm told Database creation error: permission denied to create database
. So it seems I can neither use a existing database nor create a new one. need some help, thx.
My NixOS Configuration:
services.odoo.enable = true;
services.odoo.package = pkgs.odoo.overrideAttrs (old: { doCheck = false; });
services.odoo.settings = {
options = {
admin_passwd = "123";
db_user = "odoo";
};
};
#DOC: https://www.odoo.com/documentation/15.0/administration/install/deploy.html
nixpkgs.config.permittedInsecurePackages = [
"qtwebkit-5.212.0-alpha4"
];
Find warning in journalctl -u odoo.service
:
odoo-start[638223]: 2023-04-22 08:00:49,789 638223 WARNING ? py.warnings: /nix/store/vcjhkg3cyas3zi3xzf0myw3f5jy9nz39-odoo-15.0.20230317/lib/python3.10/site-packages/odoo/addons/base/models/ir_mail_server.py:22: DeprecationWarning: 'urllib3.contrib.pyopenssl' module is deprecated and will be removed in a future release of urllib3 2.x. Read more in this issue: https://github.com/urllib3/urllib3/issues/2680
@luochen1990 I remember doing things a bit manually when setting it up. Maybe I screwed something up in the module, but I can't recall how I set up odoo, since that was years ago.
One thing you can try is in postgres ALTER USER odoo WITH SUPERUSER; DROP DATABASE odoo;
and then just create the odoo database via webinterface, later remove superusers.
I'm not sure how others have set up their odoo, maybe someone else can comment here.
Test failure seems to be a broken test (usually it was just some silenced warning that was added in a newer python version). So something is really broken this time. The package might build, but it might not work as it should.
If you want to update it, you can try cloning nixpkgs and running the update script:
nix-shell maintainers/scripts/update.nix --argstr package odoo
https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/finance/odoo/default.nix (this is the package file)
And then nix-shell -p odoo to test
But you might need to update the python modules aswell, that might be too complicated if you've never done packaging.
Heyho, I got an update to 17 (202406xx) working but would like to know how to use the default.nix in my configuration.nix before pushing any half backed changes, any guide on that? or will it "just work" when it works with nix-shell? Sorry for the question, I'm a total noob, just installed nixos tree days ago.
Describe the bug
odoo Failed to build, seems like it's because one of hypothesis's unit test failed.
Steps To Reproduce
Steps to reproduce the behavior:
NIXPKGS_ALLOW_INSECURE=1 nix-shell -p odoo
Expected behavior
Success into the shell with odoo
Screenshots
Additional context
I tried to skip the test step as following, and it worked this time:
Notify maintainers
@mkg20001
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.