Hi,

I hope I'm not spamming here.

I'm trying to set up a PostgreSQL system container, starting exactly
from the example in the Guix cookbook. Unfortunately, the container's
Shepherd instance doesn't seem to activate the service — PostgreSQL is
marked as enabled but remains stopped. If I try to restart, it
freezes. I'm not sure how to debug it. Actually I can launch manually
the server once inside the container, but not from shepherd.

Here is the log output when the container is launched:

#+begin_example
    system container is running as PID 26982
    WARNING: (guile-user): imported module (guix build utils) overrides coreRun 
'sudo guix container exec 26982 /run/current-system/profile/bin/bash --login'
    or run 'sudo nsenter -a -t 26982' to get a shell into it.
    
    binding `delete'
    WARNING: (guile-user): imported module (guix build utils) overrides core 
binding `delete'
    making '/gnu/store/vhw97fjjqx3pnnb7majczjh2dnv9qcrq-system' the current 
system...
    populating /etc from /gnu/store/9vjv5vpgmws775hhzyfnpinghy9sjdbn-etc...
    WARNING: (guile-user): imported module (guix build utils) overrides core 
binding `delete'
    WARNING: (guile-user): imported module (guix build utils) overrides core 
binding `delete'
    setting up privileged programs in '/run/privileged/bin'...
    WARNING: (guile-user): imported module (guix build utils) overrides core 
binding `delete'
    Please wait while gathering entropy to generate the key pair;
    this may take time...
    The files belonging to this database system will be owned by user 
"postgres".
    This user must also own the server process.
    
    The database cluster will be initialized with locale "en_US.utf8".
    The default database encoding has accordingly been set to "UTF8".
    The default text search configuration will be set to "english".
    
    Data page checksums are disabled.
    
    fixing permissions on existing directory /var/lib/postgresql/data ... ok
    creating subdirectories ... ok
    selecting dynamic shared memory implementation ... posix
    selecting default max_connections ... 100
    selecting default shared_buffers ... 128MB
    selecting default time zone ... Europe/Oslo
    creating configuration files ... ok
    running bootstrap script ... ok
    performing post-bootstrap initialization ... sh: line 1: locale: command 
not found
    2025-04-22 10:23:14.372 CEST [20] WARNING:  no usable system locales were 
found
    ok
    syncing data to disk ... ok
    
    initdb: warning: enabling "trust" authentication for local connections
    You can change this by editing pg_hba.conf or using the option -A, or
    --auth-local and --auth-host, the next time you run initdb.
    
    Success. You can now start the database server using:
    
    /gnu/store/7dqxc5rizlqyc1s7frbnzd8wnbfpd2v6-postgresql-14.13/bin/pg_ctl -D 
/var/lib/postgresql/data -l logfile start
    
    shepherd[1]: GNU Shepherd 1.0.3 (Guile 3.0.9, x86_64-unknown-linux-gnu)
    shepherd[1]: Starting service root...
    shepherd[1]: Service root started.
    shepherd[1]: Service root running with value #<<process> id: 1 command: #f>.
    shepherd[1]: Service root has been started.
    shepherd[1]: starting services...
    shepherd[1]: Configuration successfully loaded from 
'/gnu/store/bvjlvrpqss4rqp7wgidj5w1v9zzk11w4-shepherd.conf'.
    shepherd[1]: Starting service user-file-systems...
    shepherd[1]: Starting service root-file-system...
    shepherd[1]: Starting service host-name...
    shepherd[1]: Starting service pam...
    shepherd[1]: Starting service sysctl...
    shepherd[1]: Starting service log-rotation...
    shepherd[1]: Starting service loopback...
    shepherd[1]: Service user-file-systems started.
    shepherd[1]: Service root-file-system started.
    shepherd[1]: Service host-name started.
    shepherd[1]: Service pam started.
    shepherd[1]: Service log-rotation started.
    shepherd[1]: Service user-file-systems running with value #t.
    shepherd[1]: Service user-file-systems has been started.

#+end_example

Can anyone help me debug it?

Best regards,
-- 
Antonio Carlos PADOAN JUNIOR
PGP fingerprint:
243F 237F 2DD3 4DCA 4EA3  1341 2481 90F9 B421 A6C9

Reply via email to