Why am I getting "Could not connect" status for email and search server?

On the System Tools page when you see "Could not connect status for search and email servers", you must stop and start your phoenix.sh and you may need to set the JAVA_HOME environment variable to the location of your jdk.

The stop/start of phoenix commands:
sh /usr/local/sourceforge/dist/james/james-2.2.0/bin/phoenix.sh stop 
sh /usr/local/sourceforge/dist/james/james-2.2.0/bin/phoenix.sh start