Opened 11 years ago

Closed 11 years ago

#38495 closed defect (fixed)

cassandra can't be started using launchctl

Reported by: alexs@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: brian+macports@…
Port: cassandra

Description (last modified by neverpanic (Clemens Lang))

This appears to be due to at least 2 different bugs.

Firstly there's this one #34221.

java -version hangs in some circumstances if __CFPREFERENCES_AVOID_DAEMON=1 is not set. This is fixed by adding

    <string>env</string>
    <string>__CFPREFERENCES_AVOID_DAEMON=1</string>

to the LaunchDaemon plist.

The next problem is (I think) that the /opt/local/share/java/cassandra-1.2.2/conf/cassandra-env.sh script requires /usr/sbin/sysctl but the $PATH it's running in under launchd doesn't have /usr/sbin/.

Manually setting the $PATH in the plist again fixes this but it seems like there's probably a nicer way to do that...

Attachments (1)

Portfile.patch (2.6 KB) - added by alexs@… 11 years ago.
After rebooting and using the above patch for a while, I found it wasn't very reliable. Forcing cassandra to stay foregrounded into daemondo seems to help with this.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by alexs@…

I fail at WikiFormatting :(

comment:2 Changed 11 years ago by neverpanic (Clemens Lang)

Description: modified (diff)

comment:3 Changed 11 years ago by brian+macports@…

Cc: brian+macports@… added

Cc Me!

Changed 11 years ago by alexs@…

Attachment: Portfile.patch added

After rebooting and using the above patch for a while, I found it wasn't very reliable. Forcing cassandra to stay foregrounded into daemondo seems to help with this.

comment:4 Changed 11 years ago by alexs@…

What do I have to do to get this merged? I see 1.2.3 has been added without this update now.

comment:5 Changed 11 years ago by anddam (Andrea D'Amore)

Resolution: fixed
Status: newclosed

Committed r105107, ticket closed.

Note: See TracTickets for help on using tickets.