On 1/22/2015 9:18 AM, Carl Roberts wrote:
> Is there a way to pass in proxy settings to Solr?
>
> The reason that I am asking this question is that I am trying to run
> the DIH RSS example, and it is not working when I try to import the
> RSS feed URL because the code in Solr comes back with an unknown host
> exception due to the proxy that we use at work.
>
> If I use the curl tool and the environment variable http_proxy to
> access the RSS feed directly it works, but it appears Solr does not
> use that environment variable because it is throwing this error:
>
> 39642 [Thread-15] ERROR
> org.apache.solr.handler.dataimport.URLDataSource – Exception thrown
> while getting data

Checking the code, URLDataSource seems to use the URL capability that
comes with Java itself.  The system properties on this page are very
likely to affect objects that come with Java:

http://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html#Proxies

You would need to set these properties on the java commandline that
starts your servlet container, with the -D option.

Thanks,
Shawn

Reply via email to