I have tried clearing the REST cache and this did not solve the problem. This tool worked a couple of weeks ago and now it doesn't. I am not sure what has changed. I have removed a few layers from the dynamic services, but that is the only change I have made. I have not changed the code from when it worked to the point where I started getting the error.
It almost seems as though the search tool can longer connect to the services.
I have resolved this problem . Thanks.