6.5 C
United States of America
Thursday, December 26, 2024

homebrew – PostgreSQL Daemon Not Working


I am having bother making a profitable daemon. Earlier than PostgreSQL went to naming their folders with an @ image, I had a working daemon, however now one thing, someplace has modified that I can not determine.

If I run:

sudo -u _systemuser /decide/homebrew/decide/postgresql@14/bin/postgres -D /decide/homebrew/var/postgresql@14

PostgreSQL begins advantageous.

Nonetheless this plist does not work:

<?xml model="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist model="1.0">
<dict>
    <key>Label</key>
    <string>homebrew.mxcl.postgresql</string>
    <key>RunAtLoad</key>
    <true/>
    <key>GroupName</key>
    <string>_systemuser</string>
    <key>UserName</key>
    <string>_systemuser</string>
    <key>ProgramArguments</key>
    <array>
        <string>/decide/homebrew/bin/postgres</string>
        <string>-D</string>
        <string>/decide/homebrew/var/postgres</string>
    </array>
</dict>
</plist>

In LaunchControl, it says “This job has failed for no obvious purpose.”

So if I allow logging:

<?xml model="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist model="1.0">
<dict>
    <key>Label</key>
    <string>homebrew.mxcl.postgresql14</string>
    <key>RunAtLoad</key>
    <true/>
    <key>GroupName</key>
    <string>_systemuser</string>
    <key>UserName</key>
    <string>_systemuser</string>
    <key>ProgramArguments</key>
    <array>
        <string>/decide/homebrew/decide/postgresql@14/bin/postgres</string>
        <string>-D</string>
        <string>/decide/homebrew/var/postgres@14</string>
    </array>
    <key>StandardErrorPath</key>
    <string>/decide/homebrew/var/log/[email protected]</string>
    <key>StandardOutPath</key>
    <string>/decide/homebrew/var/log/[email protected]</string>
</dict>
</plist>

I get the error “Person _systemuser can’t write to the file: “file:///decide/homebrew/var/log/[email protected]“”

I’ve modified the permissions to these folders with:

sudo chown -R _systemuser /decide/homebrew/var/postgresql@14
sudo chgrp -R _systemuser /decide/homebrew/var/postgresql@14

Nonetheless, utilizing this logging plist does evoke a brand new error in LaunchControl:

2024-12-26 11:06:02.649106 <Error> Service couldn't initialize: posix_spawn(/decide/homebrew/decide/postgresql@14/bin/postgres), error 0xd - Permission denied

However as I stated in the beginning, PostgreSQL begins up advantageous from CLI.

Stumped. Any concepts on what is perhaps the issue?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles