Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Nifi not streaming twitter data

Explorer

Hello, I have install HDP2.6 on virtualbox, I configured GetTwitter processor in Nifi and I started the streaming but I got connection error. I went through this link but could not resolve the problem, Here is a screenshot of my error. I am using Hortonwork for my final year project and I am new in the community.


screenshot-14.png
21 REPLIES 21

@Elvine Egoko

Are you running the processor in a cluster? How many concurrent tasks and what is the run schedule of the processor?

Explorer

I followed this tutorial, I just started with Hortonwork

@Elvine Egoko

Change the Run Schedule to a value greater than 0 sec in the GetTwitter processor. I recommend trying 15 secs.

The Scheduling tab is where the property is located

39796-screen-shot-2017-10-13-at-81043-pm.png

@Elvine Egoko

That is a completely different issue. That looks like a port isn't opened. Look on the system where your ambari metrics process is running and make sure that port is open on that system.

Explorer

Concerning the first issues I have change the schedulint time but it still do not stream data. I don't kn ow what the possible solution.

@Elvine Egoko

Make sure and set the Run Duration to 0ms also.

Explorer

@Wynner It gives the same error. I wish to precise that, I am using a VPN application in order to access Twitter

Explorer

Please is there something else I could do?

@Elvine Egoko

Do you see any bulletins on the GetTwitter processor?

Explorer

@Wynner Yes, Here is the screenshot of what it shows

39868-screenshot-26.png

@Elvine Egoko

Are you able to ping this address, stream.twitter.com, from the system running NiFi?

@Elvine Egoko

That sounds like the issue then. You need to be able to ping that address before you'll be able get twitter data. Check the config of your VPN and/or firewall.

@Elvine Egoko

Try turning off the windows firewall completely, and then see if the GetTwitter processor can pull data.

@Elvine Egoko

What does the configuration of the GetTwitter processor look like?

@Elvine Egoko

You are running NiFi on a Windows 10 system correct?

Also, just install NiFi directly, not via the sandbox.

Explorer

Hello @Wynner, I did the changes as you said, I discovered that there is this error too


screenshot-16.png

Explorer

@Wynner, I can't ping it successfully

Explorer

@Wynner, I first used the wrong url http://stream.twitter.com on command line

39896-screenshot-36.png

. After which I ping using stream.twitter.com

, after I used https://stream.twitter.com on the browser. It required some credentials

, so I entered my twitter credentials. After I entered it, it returned on the browser unknown URL and a link to follow http://dev.twitter.com/pages/streaming_api. But the link does not exist. The screenshots are attached below. Also a scrennshot of vpn and firewall config

39894-screenshot-32.png

39895-screenshot-34.png

39891-screenshot-29.png

39892-screenshot-30.png

Explorer

@Elvine Egoko can you please ssh into your virtual machine

ssh root@localhost -p 12222
password: hadoop

Then grep the Nifi logs

cat /var/log/nifi/nifi-app.log | grep "ERROR"

See if you can find a more detailed explanation of that error.

Also, I noticed you were using a default template from the Nifi wiki: https://cwiki.apache.org/confluence/display/NIFI/Example+Dataflow+Templates

I tried to replicate the error on my end with the same template and processor to no avail. I am using the latest HDF sandbox with virtual box.

I did have to manually enter my own twitter API keys and access tokens with my application account . You can make one here: https://apps.twitter.com/

Do you have an account? Did you try entering in a new set of keys?

What do your processor properties look like?

39924-screen-shot-2017-10-23-at-23119-pm.png

Explorer
@palwell, @Wynner

I am using HDP 2.6

I have reinstall sandbox on centos virtual box I got connection_error again. Here is the screenshot of my configuration

41504-screenshot-1.png

41505-screenshot-2.png

41505-screenshot-2.png

41506-screenshot-3.png

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.