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

postgresql.service: Failed to determine user credentials: No such process #9814

Closed
blueyed opened this issue Aug 6, 2018 · 6 comments

Comments

@blueyed
Copy link
Contributor

@blueyed blueyed commented Aug 6, 2018

After a recent upgrade of Arch Linux the postgresql service fails to start:

Aug 06 21:18:57 lena.thequod.de systemd[1]: Starting PostgreSQL database server...
Aug 06 21:18:57 lena.thequod.de systemd[29613]: postgresql.service: Failed to determine user credentials: No such process
Aug 06 21:18:57 lena.thequod.de systemd[29613]: postgresql.service: Failed at step USER spawning /usr/bin/postgresql-check-db-dir: No such process
Aug 06 21:18:57 lena.thequod.de systemd[1]: postgresql.service: Control process exited, code=exited status=217
Aug 06 21:18:57 lena.thequod.de systemd[1]: postgresql.service: Failed with result 'exit-code'.
Aug 06 21:18:57 lena.thequod.de systemd[1]: Failed to start PostgreSQL database server.

systemd 239.0-2

% cat /usr/lib/systemd/system/postgresql.service
[Unit]
Description=PostgreSQL database server
After=network.target

[Service]
Type=notify
TimeoutSec=120
User=postgres
Group=postgres

Environment=PGROOT=/var/lib/postgres

SyslogIdentifier=postgres
PIDFile=/var/lib/postgres/data/postmaster.pid
RuntimeDirectory=postgresql
RuntimeDirectoryMode=755

ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data
ExecStart=/usr/bin/postgres -D ${PGROOT}/data
ExecReload=/bin/kill -HUP ${MAINPID}
KillMode=mixed
KillSignal=SIGINT

# Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in
# killing Postgres, so adjust it downward
OOMScoreAdjust=-200

# Additional security-related features
PrivateTmp=true
ProtectHome=true
ProtectSystem=full
NoNewPrivileges=true

[Install]
WantedBy=multi-user.target

According to #systemd on IRC this is a regression from 238 to 239.

@blueyed

This comment has been minimized.

Copy link
Contributor Author

@blueyed blueyed commented Aug 6, 2018

Running systemctl daemon-reexec fixed it.
Closing.

@blueyed blueyed closed this Aug 6, 2018
@strasharo

This comment has been minimized.

Copy link

@strasharo strasharo commented Aug 19, 2018

Hit the same issue with the tor service on Arch, systemctl daemon-reexec resolved it.

@aSystemOverload

This comment has been minimized.

Copy link

@aSystemOverload aSystemOverload commented Aug 29, 2018

Had a similar problem with syncthing, but only on an Intel Atom Zotac mini desktop for some reason. Was fine on two standard machines and two Raspberry Pis.

systemctl daemon-reexec worked a treat, thanks!

@Yamakaja

This comment has been minimized.

Copy link

@Yamakaja Yamakaja commented Sep 8, 2018

Had the same issue with grafana-server, but systemctl daemon-reexec fixed it :)

@dowlandaiello

This comment has been minimized.

Copy link

@dowlandaiello dowlandaiello commented Jan 1, 2019

Why in the world would you reopen an issue just to say "thanks, it worked"?

@strasharo

This comment has been minimized.

Copy link

@strasharo strasharo commented Jan 1, 2019

Get a life, grumpy cat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants
You can’t perform that action at this time.