PHP Fatal error: Uncaught exception ‘GearmanException’ with message ‘Failed to set exception option’

This cryptic message may seem rather out of place, but it usually has a very simple explaination; the Gearman server address you provided does not have a Gearman server running. Your Gearman server is down, or the address is wrong.

The reason why this is the error you’ll see is that the call to set the exception option depends on the connection being up.

There is however another possibility – if your libgearman is newer than your gearmand (which will lead to libgearman attempting to set the exception option, while gearmand has no idea what an exception option is), you’ll also receive this error. The fix is to make sure that you use the same version of libgearman as the gearmand you’re running, either by downgrading the gearman module / library you’re using, or (more sensible) by upgrading gearmand to the same version. This was the cause of the issue mentioned in the comments.

SOLR: java.io.FileNotFoundException: no segments* file found

While playing around with one of my development SOLR installations (this time under Windows), I suddenly got a weird error message when feeding data to one of the fresh cores.


SEVERE: java.lang.RuntimeException: java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.SimpleFSDirectory@C:\temp\solr\*\data\index: files:

Taking a look at the contents of the index\ directory, it was in fact empty. Seems weird, but my initial guess was that Lucene / SOLR would treat this as a new installation and create the files.

Turns out the issue is that it won’t – as long as the index directory exists, Lucene / SOLR goes looking for the segment files.

Thanks to an old post to the solr-dev list by Yonik, the easiest fix is to simply delete the index directory and restart your applet container (Tomcat in this case).