Обсуждение: server doesn't listen postgresql 9.1 after service change

Поиск
Список
Период
Сортировка

server doesn't listen postgresql 9.1 after service change

От
danny
Дата:
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.


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

От
Дата:
Hello Danny,

So what does the server log say?  If you don't know where it is, it is most likely in the pg_log subdirectory of your
datadirectory. 

As you said you changed the PostgreSQL service account then it stopped working, it is probably a permission thing.  On
Linuxthe data directory must have permissions for the postgres user and the postgres user ONLY, so assuming something
similarapplies to Windows, maybe you didn't take away the permissions for your old service account? 

Best regards
Holger Friedrich


-----Original Message-----
From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of danny
Sent: Thursday, April 23, 2015 12:57 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] server doesn't listen postgresql 9.1 after service change

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
serviceaccount 

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
notin 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@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


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

От
Harshad Adalkonda
Дата:

On Thu, Apr 23, 2015 at 4:27 AM, danny <dinesh4202001@gmail.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@postgresql.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

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

От
danny
Дата:
Hello Holger,

Yes after checking log file it did worked, Now I installed and changed
service successfully now I want to connect server from client machine how to
configure connections please let me know

Thanks,
Danny



--
View this message in context:
http://postgresql.nabble.com/server-doesn-t-listen-postgresql-9-1-after-service-change-tp5846460p5846732.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


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

От
danny
Дата:
Harshad,

Thanks for the reply I did check logs and now its working I did change
services but now I want to know how can I establish connection between
client machine to server and how I know if PostgreSQL is running under same
service I mentioned still it is asking for default password which I have
given during installation



--
View this message in context:
http://postgresql.nabble.com/server-doesn-t-listen-postgresql-9-1-after-service-change-tp5846460p5846734.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


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

От
Harshad Adalkonda
Дата:

On Fri, Apr 24, 2015 at 9:42 PM, danny <dinesh4202001@gmail.com> wrote:

Hi Danny,

 1)

Harshad,

Thanks for the reply I did check logs and now its working I did change
services butnow I want to know how can I establish connection between client machine to server

Run the following command from cmd by cd C:\Program Files\PostgreSQL\9.1\bin directory of postgresql

psql -h ip address dbserver -U username -d dbname -p port
 
Ex: 

 psql -h 192.168.0.110 -U postgres -d postgres -p 5432           (From other system ip entry should be present in pg_hba.conf of postgresql)

 psql -h 127.0.0.1 -U postgres -d postgres -p 5432                  (From localhost/ same system)

2)

and how I know if PostgreSQL is running under same service I mentioned still it is asking for default password which I have
given during installation

Is it asking password for service or while connecting to psql terminal ?

For psql terminal it will ask password because it is md5 is default security in postgresql server.

Following PostgreSQL Document link will help you to solve your problems


Hope above solution will solve your problem.

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