I'm having the same issue. Unfortunately, Jayme's suggestion doesn't fix the problem. Were it simply a configuration issue, the "reason" messaging would differ, pointing out that groovy is disabled for requests of this type.

After I updated from 2.1.1 to 2.2.0 I see this error when trying to use scripts.
{"type":"illegal_argument_exception","reason":"Unable to find on disk file script [closest_listing] using lang [groovy]"}

closest_lisitng.groovy is the script located at /etc/elasticsearch/scripts

+1 on this one. I'm running embedded in a grails app, so groovy is already on the classpath. I get a (non-fatal) stack trace when I create the node: script_lang not supported [groovy] when it encounters my .groovy file in the script dir. It used to work just fine on 1.7.x. I tried adding an inline script field using the search builder, but it fails in a similar way, claiming "script_lang not supported [groovy]". Any help would be greatly appreciated.