Re: server doesn't listen postgresql 9.1 after service change

From: Harshad Adalkonda <adalkondaharshad(at)gmail(dot)com>
To: danny <dinesh4202001(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: server doesn't listen postgresql 9.1 after service change
Date: 2015-04-24 13:29:33
Message-ID: CANnQH_iEtzTcDnNKw8WdBeOy9WivM5sLsgYxT1yDjzhHDyaUpA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Apr 23, 2015 at 4:27 AM, danny <dinesh4202001(at)gmail(dot)com> wrote:

> Don't know what the error is please help me guys I am pretty new to
> PostgreSQL
>
> I did Install PostgreSQL 9.1 on my 2012 R2 windows server It did installed
> successfully now I changed PostgreSQL service account
>
> Facing error when trying to restart PostgreSQL service !
>
> The PostgreSQL 9.1 service on local computer started and then stopped. Some
> services stooped automatically if they are not in use by other services or
> programs.
> <http://postgresql.nabble.com/file/n5846460/Capture03.png>
>
> When I am trying to login to PostgreSQL database facing the below errors
> <http://postgresql.nabble.com/file/n5846460/Capture.png>
> <http://postgresql.nabble.com/file/n5846460/Capture01.png>
> Server Doesn't listen
> I checked config file
>
> listen_addresses = '*'
> port = 5432
>
>
>
> --
> View this message in context:
> http://postgresql.nabble.com/server-doesn-t-listen-postgresql-9-1-after-service-change-tp5846460.html
> Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>

Hi Danny,

There might be other postgresql server or service is using 5432 port, check
it by following command

*netstat -abno | findstr :5432*

Turn on the postgresql logs from postgresql.conf and check postgresql logs
for errors.

If still you cant find post the logs here.

Try to start postgresql from command prompt, if it is working then default
service is got corrupted.

You can also create new service for same server as follows

Syntax:

pg_ctl register -N [SERVICENAME] -U [USERNAME] -P [PASSWORD] -D
[DATADIR] -S [START-TYPE] -w

Example:

*pg_ctl register -N postgresql-9.1 -U postgres -P postgres -D
D:\PostgreSQL\9.1\Data -S auto -w*

I hope above solution will solve the problem.

--
Thanks & Regards,
Harshad Adalkonda
Database Administrator
www.shreeyansh.com

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message danny 2015-04-24 16:08:32 Re: server doesn't listen postgresql 9.1 after service change
Previous Message Holger.Friedrich-Fa-Trivadis 2015-04-24 13:19:53 Re: server doesn't listen postgresql 9.1 after service change