Thread: Can't start postmaster
I’d appreciate any insight on the problems that you might see in console printout below. I installed the postmaster service as owned by user postgres:
cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user postgres --shutdown
I’m guessing that I might not be able to run it that way, because there is no “su” command in cygwin/Windows.
Should I start from scratch and install the postmaster as owned by me?
On the flipside, how can I get me to own the server process? Is it like putting me and postgres into a group?
Thanks,
r.
----------------------------------
me@MAIN ~
$ initdb -D /usr/share/postgresql/data
The files belonging to this database system will be owned by user "me"
.
This user must also own the server process.
The database cluster will be initialized with locale C.
Fixing permissions on existing directory /usr/share/postgresql/data... ok
creating template1 database in /usr/share/postgresql/data/base/1... FATAL: Can'
t create lock file /usr/share/postgresql/data/postmaster.pid: Permission denied
initdb failed.
me@MAIN ~
$ net start postmaster
The postmaster service is starting.
The postmaster service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.
me@MAIN ~
$
I tried to switch to user postgres and initdb from that account as is recommended in postgres-version.README. But I’m getting the error below while trying that. Thank you in advance for any suggestions.
r.
P.S.
postgres@MAIN ~
$ initdb -D /usr/share/postgresql/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale C.
Fixing permissions on existing directory /usr/share/postgresql/data... ok
creating directory /usr/share/postgresql/data/base... ok
creating directory /usr/share/postgresql/data/global... ok
creating directory /usr/share/postgresql/data/pg_xlog... ok
creating directory /usr/share/postgresql/data/pg_clog... ok
creating template1 database in /usr/share/postgresql/data/base/1... IpcSemaphore
Create: semget(key=1, num=17, 03600) failed: Function not implemented
initdb failed.
postgres@MAIN ~
$ net start postmaster
The postmaster service is starting.
The postmaster service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.
-----Original Message-----
From: pgsql-cygwin-owner@postgresql.org [mailto:pgsql-cygwin-owner@postgresql.org] On Behalf Of Reshat Sabiq
Sent: Saturday, December 21, 2002 6:31 PM
To: pgsql-cygwin@postgresql.org
Subject: [CYGWIN] Can't start postmaster
I’d appreciate any insight on the problems that you might see in console printout below. I installed the postmaster service as owned by user postgres:
cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user postgres --shutdown
I’m guessing that I might not be able to run it that way, because there is no “su” command in cygwin/Windows.
Should I start from scratch and install the postmaster as owned by me?
On the flipside, how can I get me to own the server process? Is it like putting me and postgres into a group?
Thanks,
r.
----------------------------------
me@MAIN ~
$ initdb -D /usr/share/postgresql/data
The files belonging to this database system will be owned by user "me"
.
This user must also own the server process.
The database cluster will be initialized with locale C.
Fixing permissions on existing directory /usr/share/postgresql/data... ok
creating template1 database in /usr/share/postgresql/data/base/1... FATAL: Can'
t create lock file /usr/share/postgresql/data/postmaster.pid: Permission denied
initdb failed.
me@MAIN ~
$ net start postmaster
The postmaster service is starting.
The postmaster service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.
me@MAIN ~
$
Hi Maybe you should update the ipc-daemon. My initdb also fails until I downloaded and installed a newer version. Greetings Conni
Thanks, I really had overlooked that. But I couldn't get it to run anyway. Indeed I hadn't unpacked cygipc-1.13-2.tar.bz2 until your message. I think there was an older version. However, even after unpacking it I'm still getting the same error message after switching to user postgres. The files went to /usr/local/bin and a couple of other folders. I assume I don't have to build them, am I right (there's no source and no makefile, anyway)? I simply ran tar xvjf cygipc-1.13-2.tar.bz2 and then did this: Under the key HKLM\Software\Cygnus Solutions\Cygwin\Program Options create a key of type REG_SZ (String) named like the full DOS path to the application, eg. "C:\cygwin\usr\local\bin\ipc-daemon.exe" and with the value equal to the preferred CYGWIN settings, eg "binmode tty ntsec". As recommended at http://www.neuro.gatech.edu/users/cwilson/cygutils/cygipc/index.html#LAT EST. So, it appears that I've got cygipc, and I can do net start ipc-daemon successfully. Yet the message below suggests that it ain't working. I start installation as myself, then switch to postgres user to do initdb (hoping to come back and launch psql as myself), and initdb fails. Sorry for long message. Thanks, r. P.S. I don't quite understand what semaphore is and how to test ipc-daemon, but I did figure out 1 simple test command: $ ipctest s c 1 17 Test v0.03s g 0 1 semaphore 0 created Plus, it does run successfully as a service. P.P.S. And when trying to run as myself, and not as a service, a log was created saying it runs on port 5432, but I can't connect from pgAdmin. P.P.P.S. $ initdb -D /usr/share/postgresql/data The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale C. Fixing permissions on existing directory /usr/share/postgresql/data... ok creating directory /usr/share/postgresql/data/base... ok creating directory /usr/share/postgresql/data/global... ok creating directory /usr/share/postgresql/data/pg_xlog... ok creating directory /usr/share/postgresql/data/pg_clog... ok creating template1 database in /usr/share/postgresql/data/base/1... IpcSemaphore Create: semget(key=1, num=17, 03600) failed: Function not implemented initdb failed. -----Original Message----- From: pgsql-cygwin-owner@postgresql.org [mailto:pgsql-cygwin-owner@postgresql.org] On Behalf Of Cornelia Boenigk Sent: Saturday, December 21, 2002 8:50 PM To: Reshat Sabiq; pgsql-cygwin@postgresql.org Subject: Re: [CYGWIN] Can't start postmaster Hi Maybe you should update the ipc-daemon. My initdb also fails until I downloaded and installed a newer version. Greetings Conni ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
I still can't run it as service, which I guess makes it more secure and more production-like, but I did succeed in connecting with pgAdmin running as myself. To play around, this is good enough. I just wonder why I get a semget not implemented when trying to initdb as postgres, and running as a service. Something about permissions, but I don't see what it is. P.S. The problem in connecting as myself was conf setting to allow tcp_ip socket connections. I don't even reach that stage when doing initdb as postgres. r. -----Original Message----- From: pgsql-cygwin-owner@postgresql.org [mailto:pgsql-cygwin-owner@postgresql.org] On Behalf Of Reshat Sabiq Sent: Sunday, December 22, 2002 1:15 AM To: 'Cornelia Boenigk'; pgsql-cygwin@postgresql.org Subject: Re: [CYGWIN] Can't start postmaster Thanks, I really had overlooked that. But I couldn't get it to run anyway. Indeed I hadn't unpacked cygipc-1.13-2.tar.bz2 until your message. I think there was an older version. However, even after unpacking it I'm still getting the same error message after switching to user postgres. The files went to /usr/local/bin and a couple of other folders. I assume I don't have to build them, am I right (there's no source and no makefile, anyway)? I simply ran tar xvjf cygipc-1.13-2.tar.bz2 and then did this: Under the key HKLM\Software\Cygnus Solutions\Cygwin\Program Options create a key of type REG_SZ (String) named like the full DOS path to the application, eg. "C:\cygwin\usr\local\bin\ipc-daemon.exe" and with the value equal to the preferred CYGWIN settings, eg "binmode tty ntsec". As recommended at http://www.neuro.gatech.edu/users/cwilson/cygutils/cygipc/index.html#LAT EST. So, it appears that I've got cygipc, and I can do net start ipc-daemon successfully. Yet the message below suggests that it ain't working. I start installation as myself, then switch to postgres user to do initdb (hoping to come back and launch psql as myself), and initdb fails. Sorry for long message. Thanks, r. P.S. I don't quite understand what semaphore is and how to test ipc-daemon, but I did figure out 1 simple test command: $ ipctest s c 1 17 Test v0.03s g 0 1 semaphore 0 created Plus, it does run successfully as a service. P.P.S. And when trying to run as myself, and not as a service, a log was created saying it runs on port 5432, but I can't connect from pgAdmin. P.P.P.S. $ initdb -D /usr/share/postgresql/data The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale C. Fixing permissions on existing directory /usr/share/postgresql/data... ok creating directory /usr/share/postgresql/data/base... ok creating directory /usr/share/postgresql/data/global... ok creating directory /usr/share/postgresql/data/pg_xlog... ok creating directory /usr/share/postgresql/data/pg_clog... ok creating template1 database in /usr/share/postgresql/data/base/1... IpcSemaphore Create: semget(key=1, num=17, 03600) failed: Function not implemented initdb failed. -----Original Message----- From: pgsql-cygwin-owner@postgresql.org [mailto:pgsql-cygwin-owner@postgresql.org] On Behalf Of Cornelia Boenigk Sent: Saturday, December 21, 2002 8:50 PM To: Reshat Sabiq; pgsql-cygwin@postgresql.org Subject: Re: [CYGWIN] Can't start postmaster Hi Maybe you should update the ipc-daemon. My initdb also fails until I downloaded and installed a newer version. Greetings Conni ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org