Skip to content

Instantly share code, notes, and snippets.

@fvdnabee
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fvdnabee/4defa281bcb7fe676b56 to your computer and use it in GitHub Desktop.
Save fvdnabee/4defa281bcb7fe676b56 to your computer and use it in GitHub Desktop.
pfsense: script to restart sixxs-aiccu daemon that hangs once in while...
#!/bin/sh
# Restart sixxs-aiccu...
/usr/bin/logger -t sixxs-aiccu-restart "Killing sixxs-aiccu daemon"
pidVar=`cat /var/run/aiccu.pid`
# sleep 10 seconds so the daemon is definitely killed
kill -9 $pidVar
sleep 10
# send signal again (for good measure)
kill -9 $pidVar
/usr/bin/logger -t sixxs-aiccu-restart "Starting sixxs-aiccu daemon"
/usr/local/etc/rc.d/sixxs-aiccu-start.sh
@massar
Copy link

massar commented Oct 8, 2014

Always great to be pointed out that people have a need for "restart" things but that they clearly are unable to read a FAQ:

https://www.sixxs.net/faq/aiccu/?faq=tic

I am blocked from TIC!
Due to some people seeing a need for quering the TIC server every couple of seconds, as they most likely put AICCU or another TIC client in some sort of looping construct, eg by using daemontools/launchd/scripting/cron/etc, we have configured a ratelimit on the service to avoid it from being overburdened by misconfigured clients.

If a client connects too frequently it will be blocked by the TIC server and a 500 error will be given pointing to this FAQ. If the client keeps on attempting to contact the TIC server even though it has been told that it is blocked, the block will be extended for a longer period of time. If we are able to determine the user causing this we will of course notify the user that this happened. It seems though that people even though informed rarely fix the problem and just keep on hammering.

As in general you will not have to connect more than once this should not pose a problem to normal clients.

To make it clear: do not run AICCU in a automatic restarting manner.

If AICCU stops working there is a reason why it did that. Check the logs and the output of the program to check why and report problems to SixXS Staff or ask the forums on how to solve a problem.

Both AYIYA and heartbeat have been designed for a variety of scenarios, eg frequently changing IP addresses there is thus no need to restart AICCU. Even if you have a mobile client you do not have to restart AICCU.

@fvdnabee
Copy link
Author

@massar: Absolutely, although this issue might be related to the aiccu daemon itself. I made a thread on your forums at https://www.sixxs.net/forum/?msg=general-12505873.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment