Wayne,

If FileMaker is using the new LaunchDaemon utility - which they should - then 
it wouldn't be correct to start the app using the command below, but rather 
with something like terascript does:

        launchctl load /path_to_daemon_plist/deamon.plist

I think you can do:

        launchctl list

To see all the daemon scripts that are loaded into the launcher.

When we were moving the server to 10.6, we ran into this same problem and had 
to rework the daemonization process to use launchctl, which is now - I think - 
mandatory for forked processes.

It's also notable that the launchctl mechanism has the ability to auto 
re-launch failed daemons. You might be able to turn this on to achieve your 
goal. I think it's a setting the plist file.

If all that doesn't work, then you probably have to run the command with su, 
probably by doing

        sudo ./fmxdbc_listener

Note that you can edit your sudoers file so that sudo doesn't need the password 
to be entered.

You should also keep hounding FileMaker. The same bug existed for ODBC 
connections to the Advanced Server (Windows) and they corrected it in 11.3. I 
haven't needed to restart my listener in months.

Robert

-----Original Message-----
From: Wayne Irvine [mailto:wa...@byteserve.com.au]
Sent: Sunday, November 27, 2011 3:20 AM
To: Witango-Talk@witango.com
Subject: Witango-Talk: Trouble launching a process

I've been batting this around a few unix boards but they are a fairly aloof lot 
and I can't seem to get any answers.

I am running Terascript with FileMaker on OSX. Terascript talks to FileMaker 
via JDBC and FileMaker provides a process called fmxdbc_listener that listens 
for the JDBC calls and passes them on to FileMaker. fmxdbc_listener has a bug 
and it's memory footprint slowly grows until it crashes. FileMaker are not 
interested in this bug as I guess not enough people are using JDBC and 
experiencing it. I am.

I have converted an old script I got from who knows where that used to watch 
witangod, and if it crashed, launch it again. The new version can test whether 
fmxdbc_listener is alive and if it is, writes to a log. If it isn't it writes 
to a log and fires up the process. Works fine when triggered manually. When I 
trigger it through launchd (something that apparently replaces CRON) it writes 
to the log just fine but fails to start up fmxdbc_listener.

[code]
#!/bin/sh

#checking to see if fmxdbc_listener exists and writing to a variable

ps -ax |grep '/[f]mxdbc_listen' > /dev/null 2>&1

#echo "$checkfmxdbc"

if [ $? = "0" ]; then
        echo "fmxdbc_listener is still Running - `date`" >>  /checkfmxdbc.log
else
        echo "ERROR - fmxdbc_listener is NOT Running - `date`" >>  
/checkfmxdbc.log
        cd /Applications/FileMaker\ Pro\ 11\ Advanced/Extensions/xDBC\ 
Support/fmxdbc_listener.bundle/Contents/MacOS/
        ./fmxdbc_listener -u wayneirvine &
fi
[/code]

Using Lingon I have tried as a 'My agents', 'User agents', 'User Daemons' and 
'System Agents'. I have tried in the user account 'wayneirvine' and the root 
account, with the -u argument and without.

Any one have any input on this?

Wayne Irvine

----------------------------------------

To unsubscribe from this list, please send an email to lists...@witango.com 
with "unsubscribe witango-talk" in the body.



----------------------------------------

To unsubscribe from this list, please send an email to lists...@witango.com 
with "unsubscribe witango-talk" in the body.

Reply via email to