Обсуждение: PostgreSQL fails to start
I've installed postgreSQL 8.4 on a Windows XP machine, and I can't get it to start. Choosing Start Server from the menu produces a DOS box that remains blank for about 3 minutes, then comes up with this error message: The postgresql-8.4 service is starting................................. The postgresql-8.4 service could not be started. The service did not report an error. More help is available by typing NET HELPMSG 3534. The start command returned an error (2) Press <return> to continue... Typing the suggested command actually produces no help other than what has already been printed. I do normally use NOD32 anti-virus and Windows Firewall. I uninstalled NOD32 before installing postgreSQL, and disabled the firewall. This was the state of the machine when the above error message was produced. I get the same error if NOD32 and the firewall are running. As far as I can tell, no log files have been produced. Therefore I am at a loss as to how to proceed. Any ideas? Eddie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
On 19/02/2010 13:10, Heddon's Gate Hotel wrote: > I've installed postgreSQL 8.4 on a Windows XP machine, and I can't get > it to start. Choosing Start Server from the menu produces a DOS box > that remains blank for about 3 minutes, then comes up with this error > message: > > The postgresql-8.4 service is starting................................. > The postgresql-8.4 service could not be started. > The service did not report an error. > More help is available by typing NET HELPMSG 3534. > The start command returned an error (2) > Press <return> to continue... > > Typing the suggested command actually produces no help other than what > has already been printed. > > I do normally use NOD32 anti-virus and Windows Firewall. I uninstalled > NOD32 before installing postgreSQL, and disabled the firewall. This was > the state of the machine when the above error message was produced. I > get the same error if NOD32 and the firewall are running. > > As far as I can tell, no log files have been produced. Therefore I am > at a loss as to how to proceed. Any ideas? Something may have been written to the Windows event log - have a look there. Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie
Thanks very much for the tip, Ray - it has led me to discover the Windows Event Viewer, which I did not even know existed. It was a sort of help, because it enabled me - eventually - to diagnose that the problem was to do with directory permissions. I had installed PostgreSQL with its data directory set to be under the Administrator's "home" directory, since that is the account I log on as. It seems that PostgreSQL, running as user postgres, couldn't see this directory. I have since reinstalled PostgreSQL, setting the data directory to be somewhere that Windows doesn't seem to restrict the permissions of (that weirdness is another whole story), and it runs fine. This is a real gotcha in the PostgreSQL Windows installation process - it should give you at least a warning about trying to create a data directory in a location that is not accessible to the postgres user. It also seems to show a weakness in PostgreSQL's logging, in that (a) it would help a lot if it just printed its error to stderr, and (b) the log message it did send to the event log was of the form "directory not found" rather than "permission denied". Eddie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Thanks very much for the tip, Ray - it has led me to discover the Windows Event Viewer, which I did not even know existed. It was a sort of help, because it enabled me - eventually - to diagnose that the problem was to do with directory permissions. I had installed PostgreSQL with its data directory set to be under the Administrator's "home" directory, since that is the account I log on as. It seems that PostgreSQL, running as user postgres, couldn't see this directory. I have since reinstalled PostgreSQL, setting the data directory to be somewhere that Windows doesn't seem to restrict the permissions of (that weirdness is another whole story), and it runs fine. This is a real gotcha in the PostgreSQL Windows installation process - it should give you at least a warning about trying to create a data directory in a location that is not accessible to the postgres user. It also seems to show a weakness in PostgreSQL's logging, in that (a) it would help a lot if it just printed its error to stderr, and (b) the log message it did send to the event log was of the form "directory not found" rather than "permission denied". Eddie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Eddie,
It also seems to show a weakness in PostgreSQL's logging, in that (a) it would help a lot if it just printed its error to stderr, and (b) the log message it did send to the event log was of the form "directory not found" rather than "permission denied".
problem for sending to stderr: there is no stderr for a service; so using the eventlog is the "thing to do" for services.
And "permission denied" is the error PostgreSQL gets from the operating system when trying to access its datadirectory; Windows will (correctly!) not allow an non-permitted user to query for existence of things it has no access to.
best wishes,
Harald
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
no fx, no carrier pigeon
-
%s is too gigantic of an industry to bend to the whims of reality
I have had the same/similar problem on a Mac. Postgres creates a user "postgres" and the only way that user can see files is for them to exist outside of any other particular user's home directory. I placed the files in the root directory!? I would like, I think, to give "postgres" privileges in my home directory (emphasis, I think). As a sign of despicable laziness, could I ask where the granting of user privileges is documented in the 8.4 docs? John On Feb 20, 2010, at 5:13 PM, Heddon's Gate Hotel wrote: > Thanks very much for the tip, Ray - it has led me to discover the > Windows Event Viewer, which I did not even know existed. It was a > sort of help, because it enabled me - eventually - to diagnose that > the problem was to do with directory permissions. > > I had installed PostgreSQL with its data directory set to be under > the Administrator's "home" directory, since that is the account I > log on as. It seems that PostgreSQL, running as user postgres, > couldn't see this directory. I have since reinstalled PostgreSQL, > setting the data directory to be somewhere that Windows doesn't seem > to restrict the permissions of (that weirdness is another whole > story), and it runs fine. > > This is a real gotcha in the PostgreSQL Windows installation process > - it should give you at least a warning about trying to create a > data directory in a location that is not accessible to the postgres > user. > > It also seems to show a weakness in PostgreSQL's logging, in that > (a) it would help a lot if it just printed its error to stderr, and > (b) the log message it did send to the event log was of the form > "directory not found" rather than "permission denied". > > Eddie > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general
On 2/20/2010 4:42 PM, John Gage wrote: > I have had the same/similar problem on a Mac. Postgres creates a user > "postgres" and the only way that user can see files is for them to exist > outside of any other particular user's home directory. I placed the > files in the root directory!? I would like, I think, to give "postgres" > privileges in my home directory (emphasis, I think). As a sign of > despicable laziness, could I ask where the granting of user privileges > is documented in the 8.4 docs? > > John > directory/file permissions is an OS behavior, not a postgresql behavior. Since OSX is unixen, you could make sure that you and postgres are are members of a common group. Then, you can grant whatever group privileges you want to the files/directories that you want common access to.
On 2/20/2010 4:42 PM, John Gage wrote: > I have had the same/similar problem on a Mac. Postgres creates a user > "postgres" and the only way that user can see files is for them to exist > outside of any other particular user's home directory. I placed the > files in the root directory!? I would like, I think, to give "postgres" > privileges in my home directory (emphasis, I think). As a sign of > despicable laziness, could I ask where the granting of user privileges > is documented in the 8.4 docs? http://ss64.com/osx/chmod.html