Discussion:
HTTPS Proxy and Authentication
(too old to reply)
Raveesh Meena
2018-09-04 16:41:39 UTC
Permalink
Hi,

I am testing the sample example FetchOnlineDataExample but getting a Java
related error:

*Could not retrive data: java.io.IOException: Unable to tunnel through
proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"*

Thinking that this issue seems to be related to Java's proxy settings I
have tried my bit and now wanted to seek a confirmation whether the logic
of establishing a HTTPS connection and authentication will work, given I
pass the following JVM Arguments during runtime:

-Dhttps.proxyHost=xxx.xxx.xx.xx -Dhttps.proxyPort=xxxx
-Dhttps.proxyUser=UserId -Dhttps.proxyPassword=Password
-Djdk.http.auth.tunneling.disabledSchemes=""

The last parameter is something I picked from various forums where it is
argued that Java 8 onwards Basic authentication scheme has been
deactivated. (
http://www.oracle.com/technetwork/java/javase/8u111-relnotes-3124969.html )

Actually, passing the Arguments did not resolve the error. Hence I wanted
to clarify if there are any Limitation on the Toolkit end.

****************Error logs
****************************************************
*** Wikidata Toolkit: FetchOnlineDataExample
------------------------------

*** This program fetches individual data using the wikidata.org API.
*** It does not download any dump files.
------------------------------

*** Fetching data for one entity:
2018-09-04 18:23:04 ERROR - Could not retrive data: java.io.IOException:
Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy
Authentication Required"
Exception in thread "main" java.lang.NullPointerException
at examples.FetchOnlineDataExample.main(FetchOnlineDataExample.java:100)
Raveesh M
2018-09-05 08:53:01 UTC
Permalink
Hi Wikitool users, developers,

I am testing the sample example FetchOnlineDataExample, but get this a Java
Network related error:

*Could not retrive data: java.io.IOException: Unable to tunnel through
proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"*

Thinking that this issue seems to be related to Java's proxy settings I
have tried my bit to no avail. I now wanted to seek a confirmation whether
the Wikitool is capable of establishing a HTTPS connection and Managing
authentication, given I pass the following JVM Arguments during runtime:

-Dhttps.proxyHost=xxx.xxx.xx.xx -Dhttps.proxyPort=xxxx
-Dhttps.proxyUser=UserId -Dhttps.proxyPassword=Password
-Djdk.http.auth.tunneling.disabledSchemes=""

*The last parameter is something I picked from various forums where it is
argued that Java 8 onwards the Basic authentication scheme has been
deactivated. (
http://www.oracle.com/technetwork/java/javase/8u111-relnotes-3124969.html )

Also, passing the jvm arguments did not resolve the error. Hence I wanted
to clarify if there are any limitation with the WikiData Toolkit:

****************Error logs
****************************************************
*** Wikidata Toolkit: FetchOnlineDataExample
------------------------------

*** This program fetches individual data using the wikidata.org API.
*** It does not download any dump files.
------------------------------

*** Fetching data for one entity:
2018-09-04 18:23:04 ERROR - Could not retrive data: java.io.IOException:
Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy
Authentication Required"
Exception in thread "main" java.lang.NullPointerException
at examples.FetchOnlineDataExample.main(FetchOnlineDataExample.java:100)
Loading...