Stardog Connection via HTTP_PROXY

Hi,

I am trying to connect to a Stardog instance via HTTP using a HTTP Proxy.

Connection aConn = ConnectionConfiguration
.to(“db”)
.server(aServerUrl) //connecting to remote server
// .from(aServerUrl)
.credentials(“username”, “password”)
.connect())

However all I get is a java.net.UnknownHostException.
How can I tell the ConnectionConfiguration to use a HTTP PROXY?

Best regards
Felix

Are you able to resolve what aServerUrl is set to?

Yes. I am able to resolve what aServeUrl is set to when using the HTTP proxy settings (e.g. in the browser).

Is there a way to tell Stardog ConnectionConfiguration to use Java System Properties such as:

System.getProperties().put(“http.proxyHost”, “127.0.0.1”);
System.getProperties().put(“http.proxyPort”, “53128”);

You can give it a try by setting them in STARDOG_JAVA_ARGS

STARDOG_JAVA_ARGS="-Xmx2g -Xms2g -XX:MaxDirectMemorySize=1g -Dhttp.proxyHost=127.0.0.1 -Dhttp.protyPort=53128"

and restarting stardog

(I’m a stardog user so I can’t be more spacific about if it is expected to work so let me know if it does )

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.