[ic] launchd?
David Christensen
david at endpoint.com
Mon Nov 2 21:16:58 UTC 2009
Jeff wrote:
>>> Is anyone running interchange on OS X Server? I am using 10.4.11
>>> server and can't seem to get the new launchd to start my daemon
>>> when the system restarts.
>>>
>>> I can start it manually, but when I start it with a script, the
>>> daemon starts, but the catalogs won't run.
>>
>>
>> Do you get any sort of error message with this? And are you
>> running this as a system-level launchd job, or under a specific
>> user? Can you provide your plist for the startup? In particular,
>> I'm wondering if something in your environment is not yet set up
>> when starting up at boot time.
> I'm running it as a LaunchAgent. I have the plist in "/Library/
> LaunchAgents/"
>
> I can start it with "launchctl load /Library/LaunchAgents/
> com.icdevgroup.interchange.plist" It starts without any errors but
> when I restart it doesn't start.
>
> This is the output when I start it:
> xserve-g4:~ interch$ launchctl load /Library/LaunchAgents/
> com.icdevgroup.interchange.plist
> xserve-g4:~ interch$ The Interchange server was not running (/Users/
> interch/interchange/etc/interchange.pid).
> Vend::Payment::TestPayment payment module loaded
> Low traffic settings.
> Calling UI......UI is loaded...
> Interchange V5.7.3
> Running with old signals.
> Configuring catalog DTD...Using MySQL, DSN=dbi:mysql:test_DTD...done.
> Configuring catalog test...Using MySQL,
> DSN=dbi:mysql:test_test...done.
> Interchange server started in UNIX mode(s) (process id 369)
Has the mysql daemon started at this point in the system startup
procedure? IIRC, there's a way to add an explicit service dependency
in your LaunchAgent plist to indicate that you need other services
running. That would definitely lead to catalog loading errors/issues.
> This is my plist:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd
> ">
> <plist version="1.0">
> <dict>
> <key>Label</key>
> <string>com.icdevgroup.interchange</string>
> <key>ProgramArguments</key>
> <array>
> <string>/Users/interch/interchange/bin/interchange</
> string>
> <string>-r</string>
The "-r" flag is used to restart the IC daemon, although it should
start afresh with only a warning that the previous instance was not
running. You can add the interch user's ~/bin to your path if you
want to allow easier restart of the IC server (i.e., if this was an
intentional behavior).
> </array>
> <key>OnDemand</key>
> <true/>
> <key>RunAtLoad</key>
> <true/>
I don't know that this will cause issues, but there's no reason to
have it run on demand. Since IC is a daemon, it doesn't make sense to
have launchd doing anything but the initial launch. Also, no port or
other identifier is set to trigger the on-demanded-ness, so I don't
think it'd end up doing anything anyway. :-)
> <key>UserName</key>
> <string>interch</string>
> </dict>
> </plist>
>
Regards,
David
--
David Christensen
End Point Corporation
david at endpoint.com
More information about the interchange-users
mailing list