I had the same error. The issue was, due to the fact that there was no http(port:80) URL configured in Webservice URL tab for my reporting server. We use SSL (port 443) so port 80 (http) URL was missing. I had to configure it temporarily to make my RS script work without the connection problem.