Elastic Search is a fantastic, clustered search server built on top of Apache Lucene search engine. It’s very easy to install and configure.

However, on some servers, if you follow instructions (which is basically: download, unpack, run: bin/elasticsearch) you may get a weird permission error:

$ ./elasticsearch 
exec: 179: : Permission denied

even though there are no apparent permission problems and even if you run the script with sudo (which you should not have to).

The solution is extremely simple: if this happens, the real issue is that you do not have JDK 6. I know, that’s not what the error complains about, but that’s typically the root problem. Install JDK6 (e.g. with: “sudo apt-get install openjdk-6-jdk” on Debian) and the problem will go away.