Artix Linux Forum

Artix Linux => Applications & Software => Topic started by: moth1983 on 26 March 2025, 03:02:44

Title: Cannot get postgresql to start (dinit)
Post by: moth1983 on 26 March 2025, 03:02:44
I installed postgresql. I changed the postgres user password. I switched to the postgres user and initialized the database cluster. But when I try to enable the service with "dinitctl enable postgresql", I get the following error:

dinitctl: connecting to socket: /run/user/1000/dinitctl: No such file or directory
dinitctl: perhaps no user instance is running?

How can I get postgresql going?

Thanks
Title: Re: Cannot get postgresql to start (dinit)
Post by: Wolzly on 26 March 2025, 04:12:38
At first glance, you should use "sudo dinitctl enable postgresql" since without sudo, you are controlling the user-instance of dinit (if you use it).
Title: Re: Cannot get postgresql to start (dinit)
Post by: moth1983 on 30 March 2025, 04:10:21
Thank you for your reply. When I include sudo, I get this error:

dinitctl: failed to find service description.
dinitctl: check service description file exists / service name spelling.
Title: Re: Cannot get postgresql to start (dinit)
Post by: Wolzly on 30 March 2025, 05:32:49
Maybe a dumb question but have you installed the package "postgresql-dinit"?

If so check in /etc/dinit.d to see if the name of the service description file is indeed "postgresql"
Title: Re: Cannot get postgresql to start (dinit)
Post by: moth1983 on 31 March 2025, 05:11:09
Since I'm new to Artix, nothing is a dumb question. I installed postgresql-dinit. I looked in /etc/dinit.d like you said. Nothing was labelled as a service description, per se, but I did see a file called postgres (as opposed to postgresql). So I tried the command on that, and it is started now.

Thank you.