Thread: postgres help

postgres help

From
Jason House
Date:
I've gone through all the steps to set up postgreSQL on windows XP.  I
have updated permissions (to /tmp /usr/bin /usr/bin/*), verified the
system path variable, and verified that ipc and postmaster services have
been started.  I don't understand why I'm getting the following error:

$ psql -U postgres template1
psql: could not connect to server: No such file or directory
         Is the server running locally and accepting
         connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

The error does not change if I log in as myself or as postgres.
Any hints as to what to try would be greatly appreciated.



Re: postgres help

From
Jason Tishler
Date:
Jason,

On Fri, Aug 22, 2003 at 07:12:33PM -0400, Jason House wrote:
> I don't understand why I'm getting the following error:
>
> $ psql -U postgres template1
> psql: could not connect to server: No such file or directory
>         Is the server running locally and accepting
>         connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Was does the following yield?

    $ ls -l /tmp/.s.PGSQL.5432
    srwxrwxrwx    1 postgres None            0 Aug 23 12:51 /tmp/.s.PGSQL.5432

What version of Cygwin are you using?

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Re: postgres help

From
Jason Tishler
Date:
Jason,

On Mon, Aug 25, 2003 at 11:30:51AM -0400, Jason House wrote:
> JHOUSE@MM112379-2K ~
> $ cat /var/log/postmaster.log
> IpcSemaphoreInitialize: semctl(id=2, 0, SETVAL, 0) failed: Invalid argument
> LOG:  startup process (pid 2548) exited with exit code 1
> LOG:  aborting startup due to startup process failure

The above indicates that postmaster did not start up.  I have seen
reports of the above error message before.  Unfortunately, I have not
received definitive confirmation of a solution.

Does the following from the README help?

    2. It is recommended to delete all cygipc temporary files
    (/tmp/cygipc* and /tmp/MultiFile*) before starting postmaster under
    a different user account.  Otherwise, postmaster will fail to start
    due to IPC errors.  Note cygipc 2.x automatically removes these
    files during normal shutdown so this issue has been essentially
    obviated.

What PostgreSQL and cygipc versions are you running?

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Re: postgres help

From
Jason Tishler
Date:
Jason,

On Mon, Aug 25, 2003 at 01:10:59PM -0400, Jason House wrote:
> Thanks for the help everyone (Jason, Igor and Jonathan)

You are welcome.

> #2 did solve the problem.

Thanks for the confirmation!

> I have also upgraded the cygwin version to 1.5 which was probably
> another problem.

Yes:

    http://cygwin.com/ml/cygwin/2003-03/msg01344.html

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Re: postgres help

From
Jason House
Date:
I'm sorry, I forgot to mention that I did verify that /tmp/.s.PSQL.5432
was not present.  As far as version of cygwin, I don't know how to check
it.  I did run setup within the past week.  It should be an up to date
version.

Jason Tishler wrote:
> Jason,
>
> On Fri, Aug 22, 2003 at 07:12:33PM -0400, Jason House wrote:
>
>>I don't understand why I'm getting the following error:
>>
>>$ psql -U postgres template1
>>psql: could not connect to server: No such file or directory
>>        Is the server running locally and accepting
>>        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>
>
> Was does the following yield?
>
>     $ ls -l /tmp/.s.PGSQL.5432
>     srwxrwxrwx    1 postgres None            0 Aug 23 12:51 /tmp/.s.PGSQL.5432
>
> What version of Cygwin are you using?
>
> Jason
>



Re: postgres help

From
Jason House
Date:
Ok, through the assistance of others and my own poking around, I have
progressed further.  I did have a pre 1.5 version of cygwin... I guess
that I naively assumed performing an update would ensure that I had 1.5.

Here is the current attempt:

JHOUSE@MM112379-2K ~
$ cat /var/log/postmaster.log
cat: /var/log/postmaster.log: No such file or directory

JHOUSE@MM112379-2K ~
$ net start postmaster
The postmaster service is starting.
The postmaster service was started successfully.


JHOUSE@MM112379-2K ~
$ cat /var/log/postmaster.log
IpcSemaphoreInitialize: semctl(id=2, 0, SETVAL, 0) failed: Invalid argument
LOG:  startup process (pid 2548) exited with exit code 1
LOG:  aborting startup due to startup process failure

JHOUSE@MM112379-2K ~
$ ls /tmp/.s.*
ls: /tmp/.s.*: No such file or directory

JHOUSE@MM112379-2K ~
$ uname
CYGWIN_NT-5.1

JHOUSE@MM112379-2K ~
$ uname -a
CYGWIN_NT-5.1 MM112379-2K 1.5.2(0.90/3/2) 2003-08-08 20:29 i686 unknown
unknown Cygwin

Jason Tishler wrote:
> Jason,
>
> On Fri, Aug 22, 2003 at 07:12:33PM -0400, Jason House wrote:
>
>>I don't understand why I'm getting the following error:
>>
>>$ psql -U postgres template1
>>psql: could not connect to server: No such file or directory
>>        Is the server running locally and accepting
>>        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>
>
> Was does the following yield?
>
>     $ ls -l /tmp/.s.PGSQL.5432
>     srwxrwxrwx    1 postgres None            0 Aug 23 12:51 /tmp/.s.PGSQL.5432
>
> What version of Cygwin are you using?
>
> Jason
>



Re: postgres help

From
Jason House
Date:
Thanks for the help everyone (Jason, Igor and Jonathan)

#2 did solve the problem.  I have also upgraded the cygwin version to
1.5 which was probably another problem.

Now all I have to do is figure out how to use postgres ;)

Some recommended doc improvements (to prevent questions from people like
me... even though the doc already contains all the needed information)
- for the "net start postmaster" command for NT/XP, it might be nice
mention that "net start" and the services applet can give false
positives to the postmaster process starting successfully.  in the
applet, a manual refresh will reveal that it hasn't really been
"started".  From the command line "net stop postmaster" will give an
error if it truly didn't start up...
- Mention the uname command in comment 14 as a way to check the cygwin
version.  I know that I *should* have remembered this...
- cross referencing bugs to individual commands would also be nice

Jason Tishler wrote:
> Jason,
>
> On Mon, Aug 25, 2003 at 11:30:51AM -0400, Jason House wrote:
>
>>JHOUSE@MM112379-2K ~
>>$ cat /var/log/postmaster.log
>>IpcSemaphoreInitialize: semctl(id=2, 0, SETVAL, 0) failed: Invalid argument
>>LOG:  startup process (pid 2548) exited with exit code 1
>>LOG:  aborting startup due to startup process failure
>
>
> The above indicates that postmaster did not start up.  I have seen
> reports of the above error message before.  Unfortunately, I have not
> received definitive confirmation of a solution.
>
> Does the following from the README help?
>
>     2. It is recommended to delete all cygipc temporary files
>     (/tmp/cygipc* and /tmp/MultiFile*) before starting postmaster under
>     a different user account.  Otherwise, postmaster will fail to start
>     due to IPC errors.  Note cygipc 2.x automatically removes these
>     files during normal shutdown so this issue has been essentially
>     obviated.
>
> What PostgreSQL and cygipc versions are you running?
>
> Jason
>



Re: postgres help

From
Jason House
Date:
Thanks for the help everyone (Jason, Igor and Jonathan)

#2 did solve the problem.  I have also upgraded the cygwin version to
1.5 which was probably another problem.

Now all I have to do is figure out how to use postgres ;)

Some recommended doc improvements (to prevent questions from people like
me... even though the doc already contains all the needed information)
- for the "net start postmaster" command for NT/XP, it might be nice
mention that "net start" and the services applet can give false
positives to the postmaster process starting successfully.  in the
applet, a manual refresh will reveal that it hasn't really been
"started".  From the command line "net stop postmaster" will give an
error if it truly didn't start up...
- Mention the uname command in comment 14 as a way to check the cygwin
version.  I know that I *should* have remembered this...
- cross referencing bugs to individual commands would also be nice

Jason Tishler wrote:
> Jason,
>
> On Mon, Aug 25, 2003 at 11:30:51AM -0400, Jason House wrote:
>
>>JHOUSE@MM112379-2K ~
>>$ cat /var/log/postmaster.log
>>IpcSemaphoreInitialize: semctl(id=2, 0, SETVAL, 0) failed: Invalid argument
>>LOG:  startup process (pid 2548) exited with exit code 1
>>LOG:  aborting startup due to startup process failure
>
>
> The above indicates that postmaster did not start up.  I have seen
> reports of the above error message before.  Unfortunately, I have not
> received definitive confirmation of a solution.
>
> Does the following from the README help?
>
>     2. It is recommended to delete all cygipc temporary files
>     (/tmp/cygipc* and /tmp/MultiFile*) before starting postmaster under
>     a different user account.  Otherwise, postmaster will fail to start
>     due to IPC errors.  Note cygipc 2.x automatically removes these
>     files during normal shutdown so this issue has been essentially
>     obviated.
>
> What PostgreSQL and cygipc versions are you running?
>
> Jason
>