Re: postgres failed to start from services manager on windows 2008 r2

From: PHANIKUMAR G <phanikumar(dot)gm(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: postgres failed to start from services manager on windows 2008 r2
Date: 2016-10-01 15:30:06
Message-ID: CABhJz8T-i9BByZqinHuqpWfYBNhT8EFONZzhOc4fjzT6qE8YJw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
Please help me on this issue, postgresql is failing to start from Windows
services manager.

Below is the scenario we performed.

Verified services manager that postgresql service was registered and failed
to start.

We tried to start the service manually and observed the following.

a. fail to start the postgresql service.

b. found that pg_log directory is not created under data directory.

c. found that "log on as" type as "Local System account"

We then tried to start the service with the following changes.

a. we changed the "Log on as" type to "This account"

b. changed the account name to ".\<local account with admin
privileges>"

c. And entered the password for this account and saved.

After that we are able to start the postgresql service successfully.

Found that the pg_log directory is created under data directory with
postgres-Sep.log

Why it is failing with local system account, the local system account is
part of administrators group. If we specifically provide credentials to the
service as explained above, service getting started. Please help me to
understand what is causing.

Best regards
Phani Kumar

On Sep 26, 2016 12:31 PM, "PHANIKUMAR G" <phanikumar(dot)gm(at)gmail(dot)com> wrote:

> hi,
>
> We are able to start the postgres from command line without any issue,
> if postgres is registered as windows service and tried to start it, we are
> facing an issue .
>
> *Problem:*
>
> We have registered postgres(version 9.3.4) as windows service on windows
> 2008 R2 and registration got succeeded.
>
> we are performing below 2 commands to register postgres as windows service
>
> *<fullpath>pg_ctl.exe register -N "prostgresService" -D
> "fullpath_to_data_directory" -W*
>
> *>sc description prostgresService "prostgresService Applicatio*
> *n Server Database Service"*
>
> when we try to start the service from services manager(services.msc) it is
> failing and popping up below message
>
> *"The prostgres service on Local Computer started and then stopped. Some
> services stop automatically if they are not in use by other services or
> programs "*
>
> postgres does not even create log and its directory pg_log in pgsql\data
> directory.
>
> windows event log has a message
>
> *The description for Event ID 0 from source PostgreSQL cannot be found.
> Either the component that raises this event is not installed on your local
> computer or the installation is corrupted. You can install or repair the
> component on the local computer.*
>
> *If the event originated on another computer, the display information had
> to be saved with the event.*
>
> *The following information was included with the event: *
>
> *Timed out waiting for server startup*
>
>
> could you please help us how to start, we are clueless since postgres is
> not creating log except windows event log.
>
>
> thanks in advance
> Phani Kumar
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2016-10-01 16:06:15 Re: postgres failed to start from services manager on windows 2008 r2
Previous Message Armand Pirvu (home) 2016-10-01 01:36:36 Re: executing os commands from a function