pg_ctl: could not start service "pgsql-8.2": error code 1063

Started by Stefano Talmost 19 years ago3 messagesgeneral
Jump to latest
#1Stefano T
stefano.tranquillini@gmail.com

Hi everybody.
Well.. i've a probelm. pg doesn't start at boot. if i copy the string
of command and try execute:

C:\Programs\PostgreSQL\8.2\bin\pg_ctl.exe runservice -N "pgsql-8.2" -D
"C:\Programs\PostgreSQL\8.2\data\"
the output is:
pg_ctl: could not start service "pgsql-8.2": error code 1063

and if i try to execute this:
C:\WINDOWS\system32\net.exe start pgsql-8.2

the output is:

The PostgreSQL Database Server 8.2 service is starting.
The PostgreSQL Database Server 8.2 service could not be started.
The service did not report an error.

and the execution of this:
C:\Programs\PostgreSQL\8.2\bin>psql.exe
psql: could not connect to server: Connection refused (0x0000274D/
10061)
Is the server running on host "???" and accepting
TCP/IP connections on port 5432?

some one can help me? how can i fix this problem?

#2Magnus Hagander
magnus@hagander.net
In reply to: Stefano T (#1)
Re: pg_ctl: could not start service "pgsql-8.2": error code 1063

Stefano T wrote:

Hi everybody.
Well.. i've a probelm. pg doesn't start at boot. if i copy the string
of command and try execute:

C:\Programs\PostgreSQL\8.2\bin\pg_ctl.exe runservice -N "pgsql-8.2" -D
"C:\Programs\PostgreSQL\8.2\data\"
the output is:
pg_ctl: could not start service "pgsql-8.2": error code 1063

runservice can only be used fromthe service control manager, as the
error indicates.

and if i try to execute this:
C:\WINDOWS\system32\net.exe start pgsql-8.2

the output is:

The PostgreSQL Database Server 8.2 service is starting.
The PostgreSQL Database Server 8.2 service could not be started.
The service did not report an error.

What do you get in the eventlog and/or the postgresql log at this time?

//Magnus

#3Noname
georgy.slavov@gmail.com
In reply to: Magnus Hagander (#2)
Re: pg_ctl: could not start service "pgsql-8.2": error code 1063

postmaster starting
Execution of PostgreSQL
C:\apache2triad\pgsql\bin> by a user with administrative permissions
is not
permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromises. See the documentation for
more information on how to properly start the server.

Solution
1. Create a new user and make it a member only of the Users group
2. In Services set Log On for the PostgreSQL Service the newly created
user

On my pc it worked