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

"DBIx::Class::Schema" is empty. #696

Closed
tbenst opened this issue Dec 10, 2019 · 3 comments
Closed

"DBIx::Class::Schema" is empty. #696

tbenst opened this issue Dec 10, 2019 · 3 comments

Comments

@tbenst
Copy link

tbenst commented Dec 10, 2019

When I call hydra-init, I get the following error:

Base class package "DBIx::Class::Schema" is empty.
    (Perhaps you need to 'use' the module which defines that package first,
    or make that module available in @INC (@INC contains: /nix/store/xky44md2ixi021xphjh81zc83qjiqjdx-hydra-2019-08-30/libexec/hydra/lib /nix/store/82byfimpw49vlwrzwg0zcpk0s06g4hk3-hydra-perl-deps/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi /nix/store/82byfimpw49vlwrzwg0zcpk0s06g4hk3-hydra-perl-deps/lib/perl5/site_perl/5.30.0 /nix/store/82byfimpw49vlwrzwg0zcpk0s06g4hk3-hydra-perl-deps/lib/perl5/site_perl /nix/store/3adfpfcpcf8vwm3ncsg5h4dlki7xkmsb-perl-5.30.0/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi /nix/store/3adfpfcpcf8vwm3ncsg5h4dlki7xkmsb-perl-5.30.0/lib/perl5/site_perl/5.30.0 /nix/store/3adfpfcpcf8vwm3ncsg5h4dlki7xkmsb-perl-5.30.0/lib/perl5/site_perl /nix/store/82byfimpw49vlwrzwg0zcpk0s06g4hk3-hydra-perl-deps/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi /nix/store/82byfimpw49vlwrzwg0zcpk0s06g4hk3-hydra-perl-deps/lib/perl5/site_perl/5.30.0 /nix/store/82byfimpw49vlwrzwg0zcpk0s06g4hk3-hydra-perl-deps/lib/perl5/site_perl /nix/store/3adfpfcpcf8vwm3ncsg5h4dlki7xkmsb-perl-5.30.0/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi /nix/store/3adfpfcpcf8vwm3ncsg5h4dlki7xkmsb-perl-5.30.0/lib/perl5/site_perl/5.30.0 /nix/store/3adfpfcpcf8vwm3ncsg5h4dlki7xkmsb-perl-5.30.0/lib/perl5/site_perl /nix/store/3adfpfcpcf8vwm3ncsg5h4dlki7xkmsb-perl-5.30.0/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi /nix/store/3adfpfcpcf8vwm3ncsg5h4dlki7xkmsb-perl-5.30.0/lib/perl5/site_perl/5.30.0 /nix/store/3adfpfcpcf8vwm3ncsg5h4dlki7xkmsb-perl-5.30.0/lib/perl5/5.30.0/x86_64-linux-thread-multi /nix/store/3adfpfcpcf8vwm3ncsg5h4dlki7xkmsb-perl-5.30.0/lib/perl5/5.30.0).
 at /nix/store/xky44md2ixi021xphjh81zc83qjiqjdx-hydra-2019-08-30/libexec/hydra/lib/Hydra/Schema.pm line 10.
BEGIN failed--compilation aborted at /nix/store/xky44md2ixi021xphjh81zc83qjiqjdx-hydra-2019-08-30/libexec/hydra/lib/Hydra/Schema.pm line 10.
Compilation failed in require at /nix/store/xky44md2ixi021xphjh81zc83qjiqjdx-hydra-2019-08-30/bin/.hydra-init-wrapped line 4.
BEGIN failed--compilation aborted at /nix/store/xky44md2ixi021xphjh81zc83qjiqjdx-hydra-2019-08-30/bin/.hydra-init-wrapped line 4.

A fully reproducible version of the error is here: https://github.com/ElvishJerricco/simple-hydra. On startup of hydra-init.service, I get the following error:

Dec 10 01:50:27 hydra-server systemd[1]: Starting hydra-init.service...
Dec 10 01:50:27 hydra-server sudo[2715]:     root : TTY=unknown ; PWD=/ ; USER=postgres ; COMMAND=/nix/store/46xc51hfqc493zbd4kr2abw07h19y0zd-postgresql-11.6/bin/createuser hydra
Dec 10 01:50:27 hydra-server sudo[2715]: pam_unix(sudo:session): session opened for user postgres by (uid=0)
Dec 10 01:50:27 hydra-server sudo[2715]: pam_unix(sudo:session): session closed for user postgres
Dec 10 01:50:27 hydra-server sudo[2718]:     root : TTY=unknown ; PWD=/ ; USER=postgres ; COMMAND=/nix/store/46xc51hfqc493zbd4kr2abw07h19y0zd-postgresql-11.6/bin/createdb -O hydra hydra
Dec 10 01:50:27 hydra-server sudo[2718]: pam_unix(sudo:session): session opened for user postgres by (uid=0)
Dec 10 01:50:27 hydra-server sudo[2718]: pam_unix(sudo:session): session closed for user postgres
Dec 10 01:50:27 hydra-server sudo[2723]:     root : TTY=unknown ; PWD=/ ; USER=postgres ; COMMAND=/nix/store/46xc51hfqc493zbd4kr2abw07h19y0zd-postgresql-11.6/bin/psql hydra
Dec 10 01:50:27 hydra-server sudo[2723]: pam_unix(sudo:session): session opened for user postgres by (uid=0)
Dec 10 01:50:27 hydra-server qgd2f34hvxlfpry9z9mqjx2ygbpwky7f-unit-script-hydra-init-pre-start[2703]: CREATE EXTENSION
Dec 10 01:50:27 hydra-server sudo[2723]: pam_unix(sudo:session): session closed for user postgres
Dec 10 01:50:27 hydra-server hydra-init[2729]: Base class package "DBIx::Class::Schema" is empty.
Dec 10 01:50:27 hydra-server hydra-init[2729]:     (Perhaps you need to 'use' the module which defines that package first,
Dec 10 01:50:27 hydra-server hydra-init[2729]:     or make that module available in @INC (@INC contains: /nix/store/xky44md2ixi021xphjh81zc83qjiqjdx-hydra-2019-08-30/libexec/hydra/lib /nix/store/82byfimpw49vlwrzwg0zcpk0s06g4hk3-hydr>
Dec 10 01:50:27 hydra-server hydra-init[2729]:  at /nix/store/xky44md2ixi021xphjh81zc83qjiqjdx-hydra-2019-08-30/libexec/hydra/lib/Hydra/Schema.pm line 10.
Dec 10 01:50:27 hydra-server hydra-init[2729]: BEGIN failed--compilation aborted at /nix/store/xky44md2ixi021xphjh81zc83qjiqjdx-hydra-2019-08-30/libexec/hydra/lib/Hydra/Schema.pm line 10.
Dec 10 01:50:27 hydra-server hydra-init[2729]: Compilation failed in require at /nix/store/xky44md2ixi021xphjh81zc83qjiqjdx-hydra-2019-08-30/bin/.hydra-init-wrapped line 4.
Dec 10 01:50:27 hydra-server hydra-init[2729]: BEGIN failed--compilation aborted at /nix/store/xky44md2ixi021xphjh81zc83qjiqjdx-hydra-2019-08-30/bin/.hydra-init-wrapped line 4.
Dec 10 01:50:27 hydra-server systemd[1]: hydra-init.service: Main process exited, code=exited, status=255/EXCEPTION
Dec 10 01:50:27 hydra-server systemd[1]: hydra-init.service: Failed with result 'exit-code'.
Dec 10 01:50:27 hydra-server systemd[1]: Failed to start hydra-init.service.

I tried adding the following with no luck:

    services.postgresql = {
      enable = true;
      package = pkgs.postgresql;
      ensureDatabases = [ "hydra" ];
      ensureUsers = [
        {
          name = "hydra";
          ensurePermissions = {
            "DATABASE hydra" = "ALL PRIVILEGES";
          };
        }
      ];
    };

Adding the ~/.pgpass file from Installation section of manual made no difference either.

@duairc
Copy link

duairc commented Dec 21, 2019

I'm pretty sure this is nixpkgs#72783. It should be fixed in the latest nixpkgs master.

@tbenst
Copy link
Author

tbenst commented Dec 21, 2019

@duairc thanks! did you mean to link another issue? Self-referencial tautology ;)

@duairc
Copy link

duairc commented Dec 21, 2019

I fixed the link! If it's the issue I think it is it was fixed by this PR. It's in nixpkgs master but hasn't yet made it into nixos-unstable.

@tbenst tbenst closed this as completed Dec 22, 2019
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

2 participants