Running IrisClassifier behind a proxy: "Connection refused: no further information"

Hi, I’m a newbie in Deepleaning4Java.

At home (without a proxy), the IrisClassifier module runs fine: the DownloaderUtility actually downloads correctly the file.

Adversely, the IrisClassifier module meets the following error when trying to download the same training file behind a proxy server:

  Exception in thread "main" Connection refused: no further information
	at java.base/
	at org.nd4j.common.resources.Downloader.lambda$downloadAndExtract$1(
	at org.nd4j.common.resources.Downloader.doOrWait(
	at org.nd4j.common.resources.Downloader.downloadAndExtract(
	at org.nd4j.common.resources.Downloader.downloadAndExtract(
	at org.nd4j.common.resources.Downloader.downloadAndExtract(
	at org.deeplearning4j.examples.utils.DownloaderUtility.Download(
	at org.deeplearning4j.examples.utils.DownloaderUtility.Download(
	at org.deeplearning4j.examples.quickstart.modeling.feedforward.classification.IrisClassifier.main(

In IntelliJ, I put in the manual proxy settings the right data (hostname, port number, login and pwd) and the ‘Check connection’ run successfully (File/Settings/Appearance & Behavior/System Settings/HTTP Proxy).

Would you know what needs to be done to overcome this issue (e.g. can the DownloaderUtility be modified to receive the proxy as parameters)? The same issue affects all other examples when the execution requires to download a data file.

I skimmed thru the community but with no avail.

Thanks for sharing your experience.


In IntelliJ, I right clicked on ‘Modify Run Configuration…’, then on ‘Modify options’, selected ‘Add VM option’, which then appeared in the box. I thus put -Dhttp.proxyHost=ADDRESS -Dhttp.proxyPort=PORT -Dhttp.proxyUser=USER -Dhttp.proxyPassword=PWD -Dhttps.proxyHost=ADDRESS -Dhttps.proxyPort=PORT -Dhttps.proxyUser=USER -Dhttps.proxyPassword=PWD in the VM option.

@lbonansbrux thanks for replying with the answer. Sorry none of that was really specific to the framework. All I could think of would have been to mirror the dataset internally or something. Iris itself is only a 150 row csv.