FS#23858 - Postgresql rc.d script is broken
Attached to Project:
Arch Linux
Opened by Jonathan (ThatJon) - Wednesday, 20 April 2011, 15:25 GMT
Last edited by Dan McGee (toofishes) - Saturday, 23 April 2011, 18:41 GMT
Opened by Jonathan (ThatJon) - Wednesday, 20 April 2011, 15:25 GMT
Last edited by Dan McGee (toofishes) - Saturday, 23 April 2011, 18:41 GMT
|
Details
Description:
When postgresql is freshly installed, the postgres user account is set to have a shell of /sbin/nologin: postgres:x:88:88:PostgreSQL user:/var/lib/postgres:/sbin/nologin However, the script /etc/rc.d/postgresql tries to run the line su - postgres -c "/usr/bin/initdb $INITOPTS -D $PGROOT/data" This fails, with the error "This account is currently not available." Additional info: * Version: postgresql 9.0.4-1 * Broken in both i686 and x86_64 Steps to reproduce: sudo pacman -S postgresql sudo /etc/rc.d/postgresql start |
This task depends upon
Closed by Dan McGee (toofishes)
Saturday, 23 April 2011, 18:41 GMT
Reason for closing: Fixed
Additional comments about closing: postgresql-9.0.4-2
Saturday, 23 April 2011, 18:41 GMT
Reason for closing: Fixed
Additional comments about closing: postgresql-9.0.4-2
removing everything to do with postgres, reinstalling; it just won't work.
Hope its easy to solve and workaroud in the meanwhile.
oh, it not worked to me with "pg_ctl: could not start server
Examine the log output."
and "/bin/false" not worked too -__-
I think I saw the same error a while ago in a 9.0.3 postgresql .
I now did a pacman -Sy and a pacman -S extra/postgresql in another system of mine , and just by changing the shell of the postgres user , the database could start fine.
Try upgrading , or uninstalling and installing again, and tell me, please.
regards.
Changing the postgres' shell to /bin/bash worked for me. So it seems to be a problem with 'su' invocation, because if I changed the shell that way or if I add "-s /bin/sh" to all "su" invocations at /etc/rc.d/postgresql, it seems to work just fine.
Also, if I try something like: "su - postgres -c pwd" nothing happens, but it works if I do "su - postgres -c pwd -s /bin/sh".
I hope it helps.
Thank you!
Regards.
I tried to start postgresql-9.0.4 after update all system
And yeah - i reinstalling DBMS a few times and it not helping :/
I think, in my case trouble in another thing... But where?
Unfortunately, I can't configure the application until it started. I'm just trying to figure out how to solve this problem
Yes.
When i tried to start without change shell, i have:
"This account is currently not available."
But then, when i change it from "/sbin/nologin" to "/bin/bash", start failing with:
"pg_ctl: could not start server
Examine the log output."
I can't understand what i doing wrong
After that, change the shell and try again.
If /var/lib/postgres/data doesn't exist and the shell is /bin/bash, it should work (at least, it works for me).
CAUTION: don't do that if you have some data on your PostgreSQL databases.
Good luck!
really, now server starting successfully!
thank for all for help :3
sudo chsh -s /bin/bash postgres
Or wait for the new package to arrive, which will run this automatically if necessary.