powered by Jive Software

Start/Stop server on Mac via sh/bash?

In this thread

http://www.igniterealtime.org/forum/thread.jspa?threadID=24645&tstart=100

The resolution was to stop/start the server from the preference pane in system preferences, which is fine if you have direct (or ARD or VNC) access to the server. Often I don’'t. I do have ssh access however.

I see that the server can be started by ./wildfire/bin/wildfire start

How can it be stopped by command line?

I’'ve tried the kill command from the launchd wrapper script included, and all that does is cause the wildfire java process to use 70+% CPU and spawn a new process.

Thanks!

Hi,

I’'ve never seen an OSX shell but I guess there is a “ps” and a “kill” command. Get Wildfires process id and execute then “kill -15 444444” where 444444 should be replaced by the process id. (-15 == Ctrl+C)

LG

hi LG - thanks for your continuing efforts to help!!

Mac OS/X uses a bash shell (and it also has sh if you want to use it…)

I took this command from the wildfire/bin/extra/wildfire-launchd-wrapper.sh file (which includes the commands to kill the wildfire server if the OS needs to…):

kill -s TERM ps auxww | grep -v wrapper | awk ''/wildfire/ && !/awk/ {print $2}''

When I execute this, it causes the high CPU utilization described and it does kill the active processes, but wildfire also spawns new processes.

So I can do this over and over (as root) with no net effect…

sorry…

Hi,

does

ps auxww | grep -v wrapper | awk ‘’/wildfire/ && !/awk/ {print $2}’’

return the same output as

ps -ef | grep java

?

I’'d look for java processes and locate there the one which is Wildfire. Are you using Wildfire as root or as “jiveuser”? A “killall -u jiveuser” could help.

LG

I’'m not sure…-f is not a valid option in bash. sorry.

ps auxww | grep -v wrapper | awk ‘’/wildfire/ && !/awk/ {print $2}’’

does return the pids of the wildfire processes.

wildfire runs on the mac (as installed by the package) installer as user ‘‘wildfire’’

I tried killall -u wildfire and it had the same effect of spawning new processes

This is one persistent little server…

One thing to look at I suppose it what the PreferencePane does when you click “Stop server”

Do you know who built the PreferencePane for the Mac?

Hi,

as I don’'t own a Mac I can just guess that Wildfire runs as an os-service and this service is configured to restart automatically if it fails. So renaming the .sh script could help you to keep it down but I have no idea if this causes trouble for the service manager. Maybe it helps to rename it an place there a script with:

#!/bin/bash

sleep 600

The service manager should start it every 10 minutes and if you need to start Wildfire again you just need to exchange both scripts.

For Windows there are is the “net” command line utility available, “net stop service” stops a service.

LG

apparently the installer does install it and cause it to run as a service - which is probably the best thing.

But that doesn’'t work either.

I’'ve looked at the very limited docs again, and the unix docs (OS/X is FreeBSD…) say that the wildfire/bin/wildfire script takes either start or stop as an argument.

I tried ./wildfire.sh stop (it’'s called wildfire.sh on mac - and it fails to install with the execute bit set (this is a very minor bug in the mac installer script).

It wreacked havoc with my server. my users connections were lost (as expected), but the server didnt’’ stop (same high CPU effect).

Then I went to the web admin, and it tried to get me to set-up…as though it never had been.

The prefpane stop and start didn’‘t fix that either…so I’'ve restarted the mac now.

Hmm…it seems there should be an easy way to stop the server? no?