EnterpriseDB: The Enterprise Postgres Company Postgres Plus Forums: The PostgreSQL Open Source Database from EnterpriseDB
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 

WIndows postgres 8.3- could not connect to server: connection refused  XML

Forum Index » PostgreSQL Installers for Windows, Linux and OS X
Author Message
Jonathan_Nel

New member

Joined: 7 Oct 2009 09:03:42
Messages: 6
Offline

Hi,

I've installed DB through the wizard, got to the end of the install and got an error to look at the log, finished the install and then found this error in the log:


...Script output:
Starting postgresql-8.3
Service postgresql-8.3 started successfully
startserver.vbs ran to completion

Script stderr:


Loading additional SQL modules...
Executing cscript //NoLogo "C:\Program Files\PostgreSQL\8.3\installer\server\loadmodules.vbs" "postgres" "Chelse4101&" "C:\Program Files\PostgreSQL\8.3" "C:\Program Files\PostgreSQL\8.3\data" 5432

Script exit code: 2

Script output:
Installing pl/pgsql in the template1 databases...
psql: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "???" and accepting
TCP/IP connections on port 5432?

Failed to install pl/pgsql in the 'template1' database
Installing the adminpack module in the postgres database...
psql: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "???" and accepting
TCP/IP connections on port 5432?

Failed to install the 'adminpack' module in the 'postgres' database
loadmodules.vbs ran to completion

Script stderr:
Program ended with an error exit code

Error running cscript //NoLogo "C:\Program Files\PostgreSQL\8.3\installer\server\loadmodules.vbs" "postgres" "Chelse4101&" "C:\Program Files\PostgreSQL\8.3" "C:\Program Files\PostgreSQL\8.3\data" 5432 : Program ended with an error exit code
[12:49:08] Write the data directory to the ini file...
[12:49:08] Write the port number, service ID, locale and superuser to the ini file...
[12:49:08] Write the server description to the ini file...
[12:49:08] Write the server branding to the ini file...
[12:49:08] Finished running post-installation/upgrade tasks.
Creating [i]Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
Creating uninstaller 100%
Installation completed
Log finished
[/i]

When I try to connect to the server it continues to give the error:

Server doesn't listen

Any thoughts?

Thanks for your help
Jonathan
Sachin_S

Senior member

Joined: 1 Aug 2008 02:37:24
Messages: 486
Offline

Hello Jonathan,

Seems like, the server dint get started from the service.

There can be 2 solutions to it:

1) See if the server starts by pg_ctl command.



2) Try to start it the postgresql service as:



If the service fails to start, then there might be an error creating the service, in that case try these 2 commands to install the service again:


and then try to start the service again.

Hope it helps.

--
Regards,
Sachin Srivastava
EnterpriseDB , the Enterprise Postgres company.
Jonathan_Nel

New member

Joined: 7 Oct 2009 09:03:42
Messages: 6
Offline

Hi Sachin,

Thaks for the response:

this is what I got returned.

C:\Program Files\PostgreSQL\8.3>net start postgresql-8.3
The postgresql-8.3 service is starting.................................................
The postgresql-8.3 service could not be started.

The service did not report an error.

More help is available by typing NET HELPMSG 3534.


C:\Program Files\PostgreSQL\8.3>NET HELPMSG 3534

The service did not report an error.


I then tried to delete the service as sugegsted as follows:

C:\Program Files\PostgreSQL\8.3>sc delete postgresql-8.3
[SC] DeleteService SUCCESS


Then got this when trying to install again:

C:\Program Files\PostgreSQL\8.3>bin\pg_ctl.exe register -N postgresql-8.3 -U postgres -P Chelse4101&
pg_ctl: service "postgresql-8.3" already registered

Do you have any further sugegstions?
Sachin_S

Senior member

Joined: 1 Aug 2008 02:37:24
Messages: 486
Offline

Hello Jonathan,

Thats strange, as you successfully deleted postgresql-8.3 service.. hmm.. one way that can happen is you might have immediately fired the second command.. the service manager takes some time to remove the service.. You can confirm whether the service is deleted or not you can fire


If that gives something which suggest that no such service exist, try the second command again.

There is no other way you can get the output you got from the second command.

(In a very weird case if that also not works out for you, try changing the name of postgresql-8.3 to postgresql in second command.)

PS: I hope you are firing this command from the same user you ran the installer and that user has administrative rights.

--
Regards,
Sachin Srivastava
EnterpriseDB , the Enterprise Postgres company.
Jonathan_Nel

New member

Joined: 7 Oct 2009 09:03:42
Messages: 6
Offline

Hi Sachin,

Thanks again for the response - I'm just going through the user account again to make sure that it has all the priviledges it needs as I mananged to install 8.4 successfully on a different system.

Cheers,
Jonathan
Jonathan_Nel

New member

Joined: 7 Oct 2009 09:03:42
Messages: 6
Offline

Hi Sachin,

Just thought I'd run another question past you to do with this issue - as I mentioned previously, I have managed to install 8.4 on my local machine and I did it by letting the install create the prostgres user. I then tried this again on my domain controller where I was doing the initial installation but found that the system won't let the install create the user. Do you have any suggestions on how I can get around this.

Thanks
Jonathan
Sachin_S

Senior member

Joined: 1 Aug 2008 02:37:24
Messages: 486
Offline

Hello,

You can manually create a user 'postgres' something like:



and then run the installer.

I would be very curious to know what error you got from the installer while creating the user. You can see that in the log (%TEMP%\install-postgresql.log).

One more thing are you using the latest postgresql-8.3.8 installer? We have made some changes to the user creation part in that.

--
Regards,
Sachin Srivastava
EnterpriseDB , the Enterprise Postgres company.
Jonathan_Nel

New member

Joined: 7 Oct 2009 09:03:42
Messages: 6
Offline

Hi Sachin,

Thaks for the prompt reply,

This is the error I got from the log:

Failed to install pl/pgsql in the 'template1' database
Installing the adminpack module in the postgres database...
psql: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "???" and accepting
TCP/IP connections on port 5432?

If I look further up in the log it indicates that the user/password combination is working and able to install, the issues seems to come in when it's trying to connect to itself towards the end of the installation.

I'm using the 8.4.1-1 installer now.
Jonathan_Nel

New member

Joined: 7 Oct 2009 09:03:42
Messages: 6
Offline

Hi Sachin,

Just to let you know I've resolved the issue.

Go to Admin tools > services > right click, properties > "Log On" Tab > check "local system Account"

Start the service and that's it.

Thanks again for your help though.

Regards,
Jonathan
grizzly1

Member

Joined: 17 Feb 2011 00:30:21
Messages: 22
Offline

Hi,

I am having the same problem, can't get the PostgreSQL 8.3 service to start.

Go to Admin tools > services > right click, properties > "Log On" Tab > check "local system Account"


You don't say where these adminstration tools is. Where is it? - In the pgAdmin?

flutin

New member

Joined: 22 Nov 2012 02:53:26
Messages: 1
Offline

although this thread is dead, just in case this helps someone... i got mine to work by starting the server (apparently it was never started).
you can go to start>all programs>postgresql8.4(or whatever your version)>start server. selecting "restart server" will not work. it must be "start server."

that will start it up and you can then access your database server through the command line or pgadmin.
Beathoven

New member

Joined: 30 Dec 2012 12:10:15
Messages: 1
Offline

I had the same problem (Win7-64). At one point it needs to get a package via internet connection. This is not right because the install package s/b able to install without a connection but that's how it is. Your firewall is blocking the install. Here's what you need to do:

Shut Down Windows Firewall (Control Panel\All Control Panel Items\Windows Firewall\Customize Settings)

If you use this great program shut down Firewall Control (Exit from task bar or Use Task Mgr to kill UI & Service - 2 items)

For downloading Selected Packages:
Shut Down Key Protection Services:
Shut Down Base Filtering (Leaves you unprotected! - Dependencies will.restart when BFE is restarted)
Base Filtering Engine
IKE and AuthIP IPsec Keying Modules
IPsec Policy Agent
ICS
...

Don't forget to restart all protections.
 
Forum Index » PostgreSQL Installers for Windows, Linux and OS X
Go to:   
Powered by JForum 2.1.8 © JForum Team