Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#18488 closed defect (invalid)

Postgres 8.2 port can not be re-started via launchctl

Reported by: decibel (Jim Nasby) Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: Cc: jyrkiwahlstedt
Port: postgresql82

Description (last modified by mf2k (Frank Schima))

decibel@platter.1[23:31]~:5%sudo launchctl stop org.macports.postgresql82-server
decibel@platter.1[23:31]~:6%ps auxww | grep postgresql
decibel  23392   0.0 -0.0    27328    424  p6  R+   11:31PM   0:00.00 grep postgresql
decibel@platter.1[23:31]~:7%

(note that it takes serveral tries to actually get the daemondo process to stay dead)

decibel@platter.1[23:32]~:10%sudo launchctl start org.macports.postgresql82-server
decibel@platter.1[23:34]~:11%ps auxww | grep postgresql
root     23393   0.0 -0.0    27904    748  ??  Ss   11:31PM   0:00.02 /opt/local/bin/daemondo --label=postgresql82-server --start-cmd /opt/local/etc/LaunchDaemons/org.macports.postgresql82-server/postgresql82-server.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.postgresql82-server/postgresql82-server.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.postgresql82-server/postgresql82-server.wrapper restart ; --pid=none
decibel  23451   0.0 -0.0    27368    444  p6  S+   11:34PM   0:00.00 grep postgresql
decibel@platter.1[23:34]~:12%psql
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"?
decibel@platter.1[23:34]~:13%

Now the daemondo process is running, but it hasn't started postgres for some reason. Sending a SIGHUP doesn't help. Killing daemondo just results in another one being re-spawned, presumably by launchctl.

Change History (5)

comment:1 Changed 16 years ago by decibel (Jim Nasby)

launchctl load doesn't help either...

decibel@platter.1[23:39]/opt/local/etc/LaunchDaemons:33%sudo launchctl load -w org.macports.postgresql82-server/org.macports.postgresql82-server.plist org.macports.postgresql82-server: Already loaded decibel@platter.1[23:39]/opt/local/etc/LaunchDaemons:34%

comment:2 Changed 16 years ago by mf2k (Frank Schima)

Cc: jwa@… added
Description: modified (diff)
Owner: changed from macports-tickets@… to mww@…
Port: postgresql82 added

comment:3 Changed 16 years ago by decibel (Jim Nasby)

Ok, turns out this is a PEBKAC error... :)

For people looking at this, make sure you check the postgresql log file for problems. (Might be worth adding that advice to the pages describing launchctl and daemondo).

comment:4 Changed 16 years ago by mf2k (Frank Schima)

Resolution: invalid
Status: newclosed

comment:5 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.