Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

NIFI behind proxy not working

NIFI behind proxy not working

New Contributor

I added the proxy configuration to bootstrap.conf

java.arg.20=-Dhttp.proxyHost=proxy.apac.xxx.com

java.arg.21=-Dhttp.proxyPort=8080

java.arg.22=-Dhttp.nonProxyHosts=localhost|127.0.0.1

java.arg.23=-Dhttps.proxyHost=proxy.apac.xxx.com

java.arg.24=-Dhttps.proxyPort=8080

java.arg.25=-Dhttps.nonProxyHosts=localhost|127.0.0.1

and when I restarted the service I can see NIFI picks up my new configuration

2018-03-01 15:50:33,727 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: /data/HDF/nifi-1.5.0.3.1.0.0-564

2018-03-01 15:50:33,727 INFO [main] org.apache.nifi.bootstrap.Command Command: java -classpath /data/HDF/nifi-1.5.0.3.1.0.0-564/./conf:/data/HDF/nifi-1.5.0.3.1.0.0-564/./lib/javax.servlet-api-3.1.0.jar:/data/HDF/nifi-1.5.0.3.1.0.0-564/./lib/jetty-schemas-3.1.jar:/data/HDF/nifi-1.5.0.3.1.0.0-564/./lib/logback-classic-1.2.3.jar:/data/HDF/nifi-1.5.0.3.1.0.0-564/./lib/logback-core-1.2.3.jar:/data/HDF/nifi-1.5.0.3.1.0.0-564/./lib/slf4j-api-1.7.25.jar:/data/HDF/nifi-1.5.0.3.1.0.0-564/./lib/jcl-over-slf4j-1.7.25.jar:/data/HDF/nifi-1.5.0.3.1.0.0-564/./lib/jul-to-slf4j-1.7.25.jar:/data/HDF/nifi-1.5.0.3.1.0.0-564/./lib/log4j-over-slf4j-1.7.25.jar:/data/HDF/nifi-1.5.0.3.1.0.0-564/./lib/nifi-api-1.5.0.3.1.0.0-564.jar:/data/HDF/nifi-1.5.0.3.1.0.0-564/./lib/nifi-framework-api-1.5.0.3.1.0.0-564.jar:/data/HDF/nifi-1.5.0.3.1.0.0-564/./lib/nifi-runtime-1.5.0.3.1.0.0-564.jar:/data/HDF/nifi-1.5.0.3.1.0.0-564/./lib/nifi-nar-utils-1.5.0.3.1.0.0-564.jar:/data/HDF/nifi-1.5.0.3.1.0.0-564/./lib/nifi-properties-1.5.0.3.1.0.0-564.jar -Dhttps.proxyHost=proxy.apac.xxx.com -Dhttp.nonProxyHosts=localhost|127.0.0.1 -Dhttps.nonProxyHosts=localhost|127.0.0.1 -Dhttps.proxyPort=8080 -Dhttp.proxyPort=8080 -Dhttp.proxyHost=proxy.apac.xxx.com -Dorg.apache.jasper.compiler.disablejsr199=true -Xmx512m -Xms512m -Djavax.security.auth.useSubjectCredsOnly=true -Djava.security.egd=file:/dev/urandom -Dsun.net.http.allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -XX:+UseG1GC -Djava.protocol.handler.pkgs=sun.net.www.protocol -Dnifi.properties.file.path=/data/HDF/nifi-1.5.0.3.1.0.0-564/./conf/nifi.properties -Dnifi.bootstrap.listen.port=35336 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=/data/HDF/nifi-1.5.0.3.1.0.0-564/logs org.apache.nifi.NiFi

But when I start the processor again, it throws exception

Error message :

2018-03-01 15:00:15,935 ERROR [Timer-Driven Process Thread-10] o.a.nifi.processors.twitter.GetTwitter GetTwitter[id=d5ddfa9c-0161-1000-ff57-a3a5d13832e9] Received error CONNECTION_ERROR: Failed to establish connection properly. Will attempt to reconnect

2018-03-01 15:00:19,787 WARN [hosebird-client-io-thread-0] com.twitter.hbc.httpclient.ClientBase GetTwitter[id=d5ddfa9c-0161-1000-ff57-a3a5d13832e9] IOException caught when establishing connection to https://stream.twitter.com/1.1/statuses/sample.json?delimited=length&stall_warnings=true

2018-03-01 15:00:19,938 ERROR [Timer-Driven Process Thread-10] o.a.nifi.processors.twitter.GetTwitter GetTwitter[id=d5ddfa9c-0161-1000-ff57-a3a5d13832e9] Received error CONNECTION_ERROR: connect timed out. Will attempt to reconnect

2018-03-01 15:00:35,788 WARN [hosebird-client-io-thread-0] com.twitter.hbc.httpclient.ClientBase GetTwitter[id=d5ddfa9c-0161-1000-ff57-a3a5d13832e9] failed to establish connection properly