Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ADMIN] Postgres service won't start, doesn't log any errors

2,061 views
Skip to first unread message

Joe Carr

unread,
Oct 18, 2010, 5:11:14 PM10/18/10
to
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

unread,
Oct 18, 2010, 5:23:50 PM10/18/10
to
Joe Carr wrote on 18.10.2010 23:11:
> 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.

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

unread,
Oct 19, 2010, 1:02:37 AM10/19/10
to
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.

2010/10/18 Thomas Kellerer <spam_...@gmx.net>:

--
Łukasz Brodziak
II MU Bioinformatyka

Joe Carr

unread,
Oct 18, 2010, 6:55:47 PM10/18/10
to
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!

100-eti

unread,
Nov 29, 2010, 3:23:03 PM11/29/10
to

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

--
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.

Thomas Kellerer

unread,
Nov 29, 2010, 5:14:33 PM11/29/10
to
Joe Carr wrote on 19.10.2010 00:55:
> 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
>
> So, if I replace "runservice" with "start", the server starts without issue :
>
> 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?

Kevin Grittner

unread,
Nov 30, 2010, 10:21:03 AM11/30/10
to
100-eti <100...@csc-scc.gc.ca> wrote:

> 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.

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

100-eti

unread,
Nov 30, 2010, 11:29:17 AM11/30/10
to

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.

--

Lou Picciano

unread,
Nov 30, 2010, 11:33:08 AM11/30/10
to
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

Kenneth Marshall

unread,
Nov 30, 2010, 11:36:33 AM11/30/10
to
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

Kevin Grittner

unread,
Nov 30, 2010, 11:50:15 AM11/30/10
to
100-eti <100...@csc-scc.gc.ca> wrote:

> 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

100-eti

unread,
Nov 30, 2010, 12:37:51 PM11/30/10
to

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.

--

100-eti

unread,
Dec 2, 2010, 10:45:24 AM12/2/10
to

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

kapuleto

unread,
Sep 17, 2011, 1:18:18 PM9/17/11
to
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:

http://postgresql.1045698.n5.nabble.com/file/n4814207/img.png

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.

Scott Marlowe

unread,
Sep 17, 2011, 6:06:51 PM9/17/11
to
On Tue, Nov 30, 2010 at 10:37 AM, 100-eti <100...@csc-scc.gc.ca> wrote:
>
> 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.
0 new messages