Discussion:
[ADMIN] Postgres service won't start, doesn't log any errors
(too old to reply)
Joe Carr
2010-10-18 21:11:14 UTC
Permalink
Hello all,
I have a windows postgres 9.0.1 installation which doesn't start, and also
doesn't log any information. The only evidence that an attempt was made is
in the event log with the following pair of messages :

1. Waiting for server startup...
2. Timed out waiting for server startup

I've tried to run postgres.exe from the command line to glean more
information, but it starts and stops without any output as well. I have
uninstalled the server, moved the previous data directory, and reinstalled
to no avail as well.

I'm wondering what debugging steps I might be able to take now to track down
the source of the problem? Thanks beforehand for any assistance.
Thomas Kellerer
2010-10-18 21:23:50 UTC
Permalink
Hello all, I have a windows postgres 9.0.1 installation which doesn't
start, and also doesn't log any information. The only evidence that
an attempt was made is in the event log with the following pair of
1. Waiting for server startup... 2. Timed out waiting for server
startup
I've tried to run postgres.exe from the command line to glean more
information, but it starts and stops without any output as well.
Did you try using pg_ctl instead (e.g. copy the commandline from the service definition)?

In most of the cases it's a permission issue with the data directory. Did you verify the postgres user (the one under which the service is started) has full access to the data directory?

Regards
Thomas
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Lukasz Brodziak
2010-10-19 05:02:37 UTC
Permalink
I would go with the permissions issue. Not all postgres startup
problems are logged in pg_log. Go check the Application log: right
click on Computer -> Manage -> Events -> Application and look for any
errors with PG as a source. It may be connected to the fact that
somehow postgres user doesn't have permission to write postmaster.pid
file either to delete the old one or creating new one. At least this
is the main issue I came accross in our clients' DBs. If the
postmaster.pid file is created check forr errors like "bogus data in
postmaster.pid" as this is another thing that may be the case.
Post by Thomas Kellerer
Hello all, I have a windows postgres 9.0.1 installation which doesn't
start, and also doesn't log any information. The only evidence that
an attempt was made is in the event log with the following pair of
1. Waiting for server startup... 2. Timed out waiting for server
startup
I've tried to run postgres.exe from the command line to glean more
information, but it starts and stops without any output as well.
Did you try using pg_ctl instead (e.g. copy the commandline from the service definition)?
In most of the cases it's a permission issue with the data directory. Did
you verify the postgres user (the one under which the service is started)
has full access to the data directory?
Regards
Thomas
--
http://www.postgresql.org/mailpref/pgsql-admin
--
Łukasz Brodziak
II MU Bioinformatyka
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Joe Carr
2010-10-18 22:55:47 UTC
Permalink
Hi Thomas,
Thanks for your reply. pg_ctrl has given me some more information, but I'm
not quite there yet.

I have verified that the postgres user has "full control" access to the data
directory.

When I take the commandline from the service definition and execute it, I
get the following:

C:\Program Files\PostgreSQL\9.0\bin>"C:/Program
Files/PostgreSQL/9.0/bin/pg_ctl.exe" runservice -N "postgresql-9.0" -D
"C:/Program Files/PostgreSQL/9.0/data" -w

pg_ctl: could not start service "postgresql-9.0": error code 1063

from the forum post (
http://archives.postgresql.org/pgsql-general/2007-05/msg00281.php), the
runservice command alledgedly can only be executed from the service control
manager. So, if I replace "runservice" with "start", the server starts
without issue :

C:\Program Files\PostgreSQL\9.0\bin>"C:/Program
Files/PostgreSQL/9.0/bin/pg_ctl.exe" start -N "postgresql-9.0" -D
"C:/Program Files/PostgreSQL/9.0/data" -w
waiting for server to start.... done
server started

and this will work whether I'm logged in as "postgres" or under my user
account. Additionally, the \data\pg_log directory is being filled with
logging information, indicating (I believe), that permissions are set
correctly.

But, the service will not start from the service control manager, or
pgAdmin3 (which I imagine attempts to start the service in the same manner).

So, I think it's very close at this point. Thanks again beforehand!
Hello all, I have a windows postgres 9.0.1 installation which doesn't
start, and also doesn't log any information. The only evidence that
an attempt was made is in the event log with the following pair of
1. Waiting for server startup... 2. Timed out waiting for server
startup
I've tried to run postgres.exe from the command line to glean more
information, but it starts and stops without any output as well.
Did you try using pg_ctl instead (e.g. copy the commandline from the service definition)?
In most of the cases it's a permission issue with the data directory. Did
you verify the postgres user (the one under which the service is started)
has full access to the data directory?
Regards
Thomas
--
http://www.postgresql.org/mailpref/pgsql-admin
100-eti
2010-11-29 20:23:03 UTC
Permalink
Joe,

I'm seeing the exact same thing when I do a fresh installation of Postgres
9.0 on either a 2008 installation or a 2003 installation. In both cases I
ensure the entire directory structure is owned by postgres and I've even
made postgres a member of the local Administrators group with the same
result.

Have you had any more luck resolving this issue?

Thanks in advance,

Roger
Post by Joe Carr
Hi Thomas,
Thanks for your reply. pg_ctrl has given me some more information, but I'm
not quite there yet.
I have verified that the postgres user has "full control" access to the data
directory.
When I take the commandline from the service definition and execute it, I
C:\Program Files\PostgreSQL\9.0\bin>"C:/Program
Files/PostgreSQL/9.0/bin/pg_ctl.exe" runservice -N "postgresql-9.0" -D
"C:/Program Files/PostgreSQL/9.0/data" -w
pg_ctl: could not start service "postgresql-9.0": error code 1063
from the forum post (
http://archives.postgresql.org/pgsql-general/2007-05/msg00281.php), the
runservice command alledgedly can only be executed from the service control
manager. So, if I replace "runservice" with "start", the server starts
C:\Program Files\PostgreSQL\9.0\bin>"C:/Program
Files/PostgreSQL/9.0/bin/pg_ctl.exe" start -N "postgresql-9.0" -D
"C:/Program Files/PostgreSQL/9.0/data" -w
waiting for server to start.... done
server started
and this will work whether I'm logged in as "postgres" or under my user
account. Additionally, the \data\pg_log directory is being filled with
logging information, indicating (I believe), that permissions are set
correctly.
But, the service will not start from the service control manager, or
pgAdmin3 (which I imagine attempts to start the service in the same manner).
So, I think it's very close at this point. Thanks again beforehand!
Hello all, I have a windows postgres 9.0.1 installation which doesn't
start, and also doesn't log any information. The only evidence that
an attempt was made is in the event log with the following pair of
1. Waiting for server startup... 2. Timed out waiting for server
startup
I've tried to run postgres.exe from the command line to glean more
information, but it starts and stops without any output as well.
Did you try using pg_ctl instead (e.g. copy the commandline from the service definition)?
In most of the cases it's a permission issue with the data directory. Did
you verify the postgres user (the one under which the service is started)
has full access to the data directory?
Regards
Thomas
--
http://www.postgresql.org/mailpref/pgsql-admin
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-service-won-t-start-doesn-t-log-any-errors-tp3218164p3285074.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Thomas Kellerer
2010-11-29 22:14:33 UTC
Permalink
Hi Thomas, Thanks for your reply. pg_ctrl has given me some more
information, but I'm not quite there yet.
I have verified that the postgres user has "full control" access to
the data directory.
When I take the commandline from the service definition and execute
C:\Program Files\PostgreSQL\9.0\bin>"C:/Program
Files/PostgreSQL/9.0/bin/pg_ctl.exe" runservice -N "postgresql-9.0"
-D "C:/Program Files/PostgreSQL/9.0/data" -w
pg_ctl: could not start service "postgresql-9.0": error code 1063
and this will work whether I'm logged in as "postgres" or under my
user account. Additionally, the \data\pg_log directory is being
filled with logging information, indicating (I believe), that
permissions are set correctly.
But, the service will not start from the service control manager, or
pgAdmin3 (which I imagine attempts to start the service in the same manner).
So, I think it's very close at this point. Thanks again beforehand!
Are you sure the service is started under the postgres account?
Is the password given there correct?

Regards
Thomas
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Kevin Grittner
2010-11-30 15:21:03 UTC
Permalink
"The postgresql-9.0 - PostGreSQL Server 9.0 service on Local
Computer started and then stopped. Some services stop
automatically if they have no work to do, for example, the
Performance Logs and Alerts service."
In my case it starts, then stops. There is data in the data
directory, so I can only assume that the database is
initialized... Also, the password is correct for the service.
There is probably a log file somewhere which will tell you what the
problem is. If the log information is being thrown away, you may
need to try starting PostgreSQL from a command line and specifying
the log file. Without information from the log, we would only be
guessing.

-Kevin
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
100-eti
2010-11-30 16:29:17 UTC
Permalink
That's the problem though... I've searched through all the PostgreSQL
directories, and there are no logs that indicate anything.

Next step is to try this on CentOS as it seems the Windows implementation is
broken or at least I can't seem to get it going (yet).
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-service-won-t-start-doesn-t-log-any-errors-tp3218164p3286312.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Lou Picciano
2010-11-30 16:33:08 UTC
Permalink
Mr./Ms. 100-eti,


Might there be a 'server.log' written to by default in your cluster directory?


Experience says that these things often down to permissions problems...


Lou

----- Original Message -----
From: "100-eti" <100-***@csc-scc.gc.ca>
To: pgsql-***@postgresql.org
Sent: Tuesday, November 30, 2010 11:29:17 AM
Subject: Re: [ADMIN] Postgres service won't start, doesn't log any errors


That's the problem though... I've searched through all the PostgreSQL
directories, and there are no logs that indicate anything.

Next step is to try this on CentOS as it seems the Windows implementation is
broken or at least I can't seem to get it going (yet).
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-service-won-t-start-doesn-t-log-any-errors-tp3218164p3286312.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Kenneth Marshall
2010-11-30 16:36:33 UTC
Permalink
We definitely had a permissions problem. Once that was fixed, per
the documentation, it started right up. You may be able to log
access problems in Windows too, to help you locate the problem.

Good luck,
Ken
Post by Lou Picciano
Mr./Ms. 100-eti,
Might there be a 'server.log' written to by default in your cluster directory?
Experience says that these things often down to permissions problems...
Lou
----- Original Message -----
Sent: Tuesday, November 30, 2010 11:29:17 AM
Subject: Re: [ADMIN] Postgres service won't start, doesn't log any errors
That's the problem though... I've searched through all the PostgreSQL
directories, and there are no logs that indicate anything.
Next step is to try this on CentOS as it seems the Windows implementation is
broken or at least I can't seem to get it going (yet).
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-service-won-t-start-doesn-t-log-any-errors-tp3218164p3286312.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
http://www.postgresql.org/mailpref/pgsql-admin
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Kevin Grittner
2010-11-30 16:50:15 UTC
Permalink
I've searched through all the PostgreSQL directories, and there
are no logs that indicate anything.
Have you checked the event viewer for application entries?
Next step is to try this on CentOS as it seems the Windows
implementation is broken or at least I can't seem to get it going
(yet).
Did you try starting with pg_ctl with a -l switch?

-Kevin
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
100-eti
2010-11-30 17:37:51 UTC
Permalink
There was no server log anywhere, there were no entries in the Event Viewer
(under Application, Security or System) and I ensured the entire directory
structure is set to Full Control for the user (and the user is in the local
Administrators group)... Nothing other than the service its trying to
start, and then it times out.

When I used 'pg_ctl start -D ..\Data -U postgres -l
..\Data\pg_log\pglog.log' I get a log file opened, and the "server starting"
message in the CMD window, but nothing written to the window, and no active
connection in the pgAdmin III window. When I perform a pg_ctl stop it shows
"server stopped" but again nothing in the logs...

When I do the pg_ctl start ..... I can see the postamster.pid file created,
and it gets deleted when I do a pg_ctl stop, but I am still unable to
connect to the database using pgAdmin: it never gets created when I start
the service in the Service MMC.

This is a proof of concept/capability research check only, so I don't care
about the platform for the database at this point. If I can get it going on
CentOS, that's fine... as long as I can connect to the database with OpenNMS
to do my research, its all good.

Thanks so far!

Roger
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-service-won-t-start-doesn-t-log-any-errors-tp3218164p3286452.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
100-eti
2010-12-02 15:45:24 UTC
Permalink
Got the CentOS version up and running, but I am going to use the windows
version only for the admin client and connect across the network...

The last message I got in the Windows install is Error initializing Cluster
configuration... This might be a direct cause of the initial problem :-)

Roger
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-service-won-t-start-doesn-t-log-any-errors-tp3218164p3289586.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Scott Marlowe
2011-09-17 22:06:51 UTC
Permalink
Post by 100-eti
There was no server log anywhere, there were no entries in the Event Viewer
(under Application, Security or System) and I ensured the entire directory
structure is set to Full Control for the user (and the user is in the local
Administrators group)...  Nothing other than the service its trying to
start, and then it times out.
I think pg might refuse to start if it has the equivalent of root privileges.
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
100-eti
2010-11-30 13:06:14 UTC
Permalink
Not sure if this helps, but the Services dialogue I get now is:

"The postgresql-9.0 - PostGreSQL Server 9.0 service on Local Computer
started and then stopped. Some services stop automatically if they have no
work to do, for example, the Performance Logs and Alerts service."

In my case it starts, then stops. There is data in the data directory, so I
can only assume that the database is initialized... Also, the password is
correct for the service.

largish image incoming... sorry...

Loading Image...
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-service-won-t-start-doesn-t-log-any-errors-tp3218164p3286033.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
kapuleto
2011-09-17 17:18:18 UTC
Permalink
I had the same problem. in my case, I changed the user account to the user
who was logged on the local system at the time (which has administrator
privileges). I did this by accessing the service properties, Logon tab, as
shown:

Loading Image...

After that, I commanded the startup of the service, which started normally.

Hug!

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-service-won-t-start-doesn-t-log-any-errors-tp3218164p4814207.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Loading...