[
https://issues.apache.org/jira/browse/NIFI-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15265834#comment-15265834
]
Pierre Villard commented on NIFI-1751:
--------------------------------------
[~dawynne] Could you confirm you are talking about InvokeHttp processor?
For GetHttp et PostHttp, if you use username and password properties, it works
with a proxy requiring authentication.
Regarding InvokeHttp, I had a look and I am able to propose a PR, but OkHttp
dependency seems to be a little unstable regarding proxy... During my testings,
if the user provides a wrong username/password for proxy authentication, the
error will be
{noformat}
java.net.ProtocolException: Too many follow-up requests: 21
{noformat}
because OkHttp client will keep trying to authenticate against the proxy even
if the proxy replied that credentials are wrong
(https://github.com/square/okhttp/issues/2464).
Another bigger issue is that when trying, with a local proxy, to access HTTPS
pages, it always fail with the following error:
{noformat}
java.io.IOException: unexpected end of stream on null
at
com.squareup.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:201)
at
com.squareup.okhttp.internal.io.RealConnection.createTunnel(RealConnection.java:245)
at
com.squareup.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:168)
at
com.squareup.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:145)
at
com.squareup.okhttp.internal.io.RealConnection.connect(RealConnection.java:108)
at
com.squareup.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184)
at
com.squareup.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126)
at
com.squareup.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95)
at
com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:283)
at
com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224)
at com.squareup.okhttp.Call.getResponse(Call.java:286)
at
com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243)
at
com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:205)
at com.squareup.okhttp.Call.execute(Call.java:80)
at
org.apache.nifi.processors.standard.InvokeHTTP.onTrigger(InvokeHTTP.java:611)
...
Caused by: java.io.EOFException: \n not found: size=0 content=...
at
okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:201)
at
com.squareup.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:186)
{noformat}
It seems to be an issue which depends of the proxy behavior
(https://github.com/square/okhttp/issues/2453)... so it could only be because
of the proxy I use. But still...
I you think that would be better than nothing, let me know and I'll submit the
PR.
Any thoughts?
> Update HTTP processors to allow a proxy authentication strategy
> ---------------------------------------------------------------
>
> Key: NIFI-1751
> URL: https://issues.apache.org/jira/browse/NIFI-1751
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: David A. Wynne
> Priority: Minor
>
> If trying to use the HTTP processors from behind a proxy server, the
> following error occurs:
> Received error HTTP_ERROR: HTTP/1.1 407 Proxy Authentication Required. Will
> attempt to reconnect
> The library NiFi uses for HTTP processors has the ability to set a proxy
> authentication strategy but currently doesn't use it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)