Using a proxied connection with Data Gateway

In some environments it may be required to use a proxied connection when creating an outbound connection to the Internet from an internal server. In cases where this is reliant on HTTP_PROXY or HTTPS_PROXY environment variables, and no authentication is required, we can configure the JVM running Data Gateway to utilize the proxy for all network traffic.

  1. Extract the Data Gateway archive on your server.
  2. Open bin/flume-ng in an Editor (e.g. vim/notepad)
  3. Find the following lines:
    $EXEC $JAVA_HOME/bin/java $JAVA_OPTS $FLUME_JAVA_OPTS "${arr_java_props[@]}" -cp "$FLUME_CLASSPATH" \
  4. Replace them with:
    $EXEC $JAVA_HOME/bin/java $JAVA_OPTS $FLUME_JAVA_OPTS "${arr_java_props[@]}" -cp "$FLUME_CLASSPATH" \
    -Dhttp.proxyHost=PROXY.IP.HERE -Dhttp.proxyPort=PROXY.PORT.HERE -Djava.library.path=$FLUME_JAVA_LIBRARY_PATH "$FLUME_APPLICATION_CLASS" $*

    Note: Replace PROXY.IP.HERE with the IP of the proxy (e.g. and PROXY.PORT.HERE with the associated port (e.g. 8080).
  5. Run Data Gateway as outlined in the documentation.

You can confirm that the traffic is using the correct port by running netstat -punt |grep 8080 (or whatever port your proxy is using) and confirming that there is an associated Java process.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request