You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Frank Zheng <be...@gmail.com> on 2012/11/21 04:27:53 UTC

Two Problems about Running Twitter Trend Example in cluster mode

Hi all,

I am using zookeeper-3.3.6 (stable).
I tried to run the twitter trend example in two machines: testing.machine1
and testing.machine2.
In testing.machine1, I ran 3 zk servers, named zoo1, zoo2 and zoo3.
In testing.machine2, I ran 2 zk servers, named zoo4 and zoo5.
I was sure that the zk server cluster was set up successfully.

Then I followed the instructions step by step in the official website.
However I tried to create and deploy applications separately, but I failed
to deploy after created the applications.
The error logs are as follows.

[root@testing s4]# ./s4 deploy -appName=twitter-counter -c=cluster1
-s4r=./test-apps/twitter-counter/build/libs/twitter-counter.s4r
-zk=testing.machine1:2181
09:57:03.628 [main] ERROR org.apache.s4.tools.Deploy - Cannot deploy app
java.lang.NullPointerException: null
    at org.apache.s4.tools.Deploy.main(Deploy.java:73)
~[s4-tools-0.5.0-incubating.jar:0.5.0-incubating]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[na:1.6.0_22]
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
~[na:1.6.0_22]
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.6.0_22]
    at java.lang.reflect.Method.invoke(Method.java:616) ~[na:1.6.0_22]
    at org.apache.s4.tools.Tools$Task.dispatch(Tools.java:54)
[s4-tools-0.5.0-incubating.jar:0.5.0-incubating]
    at org.apache.s4.tools.Tools.main(Tools.java:94)
[s4-tools-0.5.0-incubating.jar:0.5.0-incubating]


Then I ran the command "./s4 deploy -appName=twitter-counter -c=cluster1
-b=`pwd`/test-apps/twitter-counter/build.gradle" to create and deploy at
one step.
At this time, I succeed.
And the adapter was working properly. One of the counter applications was
working properly, however, there was always one counter applications unable
to work well.

Counter1:
11:14:23.980 [TopicSeen] INFO  o.a.s.e.t.TopicCountAndReportPE - Handling
new topic [techschool]
11:14:24.011 [TopicSeen] INFO  o.a.s.e.t.TopicCountAndReportPE - Handling
new topic [Windows8yHP]
11:14:24.011 [TopicSeen] INFO  o.a.s.e.t.TopicCountAndReportPE - Handling
new topic [fiesta]
11:14:24.937 [TopicSeen] INFO  o.a.s.e.t.TopicCountAndReportPE - Handling
new topic [Hola]
11:14:24.945 [TopicSeen] INFO  o.a.s.e.t.TopicCountAndReportPE - Handling
new topic [itsokay]
11:14:26.943 [TopicSeen] INFO  o.a.s.e.t.TopicCountAndReportPE - Handling
new topic [Enerooooooooo!.]
11:14:26.977 [TopicSeen] INFO  o.a.s.e.t.TopicCountAndReportPE - Handling
new topic [BUnation]
11:14:28.224 [TopicSeen] INFO  o.a.s.e.t.TopicCountAndReportPE - Handling
new topic [nisekoi]
11:14:28.943 [TopicSeen] INFO  o.a.s.e.t.TopicCountAndReportPE - Handling
new topic [nobullshit]
11:14:29.210 [TopicSeen] INFO  o.a.s.e.t.TopicCountAndReportPE - Handling
new topic [somethingiwillneversay]


Counter2:
11:14:28.221 [Receiver] ERROR org.apache.s4.core.Receiver - Could not find
target stream for event with appId=-1 and streamId=RawStatus
11:14:28.223 [Receiver] ERROR org.apache.s4.core.Receiver - Could not find
target stream for event with appId=-1 and streamId=RawStatus
11:14:28.226 [Receiver] ERROR org.apache.s4.core.Receiver - Could not find
target stream for event with appId=-1 and streamId=RawStatus
11:14:28.228 [Receiver] ERROR org.apache.s4.core.Receiver - Could not find
target stream for event with appId=-1 and streamId=RawStatus
11:14:28.230 [Receiver] ERROR org.apache.s4.core.Receiver - Could not find
target stream for event with appId=-1 and streamId=RawStatus
11:14:28.239 [Receiver] ERROR org.apache.s4.core.Receiver - Could not find
target stream for event with appId=-1 and streamId=RawStatus
11:14:28.299 [Receiver] ERROR org.apache.s4.core.Receiver - Could not find
target stream for event with appId=-1 and streamId=RawStatus
11:14:28.666 [Receiver] ERROR org.apache.s4.core.Receiver - Could not find
target stream for event with appId=-1 and streamId=RawStatus
11:14:28.933 [Receiver] ERROR org.apache.s4.core.Receiver - Could not find
target stream for event with appId=-1 and streamId=RawStatus
11:14:28.942 [Receiver] ERROR org.apache.s4.core.Receiver - Could not find
target stream for event with appId=-1 and streamId=RawStatus
11:14:28.943 [Receiver] ERROR org.apache.s4.core.Receiver - Could not find
target stream for event with appId=-1 and streamId=TopicSeen
11:14:28.947 [Receiver] ERROR org.apache.s4.core.Receiver - Could not find
target stream for event with appId=-1 and streamId=RawStatus
11:14:28.955 [Receiver] ERROR org.apache.s4.core.Receiver - Could not find
target stream for event with appId=-1 and streamId=RawStatus
11:14:28.990 [Receiver] ERROR org.apache.s4.core.Receiver - Could not find
target stream for event with appId=-1 and streamId=RawStatus

Adapter:
^C11:14:33.975 [Twitter4J Async Dispatcher[0]] DEBUG
twitter4j.StatusStreamImpl - Received:{"contributors":null,"text":"Antonio
Eduar....... juro que não, estou há 15 ano morando aqui e quando vou ao
Brasil para visitor tenho ataques de... http://t.co/XTNnYY6v
","geo":null,"retweeted":false,"in_reply_to_screen_name":null,"possibly_sensitive":false,"truncated":false,"entities":{"urls":[{"expanded_url":"
http://noticias.terra.com.br/mundo/noticias/0,,OI6318900-EI308,00-Judeus+protestam+em+SP+por+direito+de+Israel+se+defender.html
","indices":[120,140],"display_url":"
noticias.terra.com.br/mundo/noticias\u2026","url":"http://t.co/XTNnYY6v"}],"hashtags":[],"user_mentions":[]},"in_reply_to_status_id_str":null,"id":271089234113351680,"in_reply_to_user_id_str":null,"source":"<a
href=\"http://www.terra.com.br\" rel=\"nofollow\">Terra
Brasil<\/a>","favorited":false,"in_reply_to_status_id":null,"created_at":"Wed
Nov 21 03:14:44 +0000
2012","retweet_count":0,"in_reply_to_user_id":null,"possibly_sensitive_editable":true,"id_str":"271089234113351680","place":null,"user":{"location":"","default_profile":true,"statuses_count":205,"profile_background_tile":false,"lang":"en","profile_link_color":"0084B4","id":500403658,"following":null,"favourites_count":0,"protected":false,"profile_text_color":"333333","description":"","contributors_enabled":false,"verified":false,"name":"Tahani
Dias","profile_sidebar_border_color":"C0DEED","profile_background_color":"C0DEED","created_at":"Thu
Feb 23 03:18:38 +0000
2012","default_profile_image":true,"followers_count":0,"geo_enabled":false,"profile_image_url_https":"
https://si0.twimg.com/sticky/default_profile_images/default_profile_6_normal.png
","profile_background_image_url":"
http://a0.twimg.com/images/themes/theme1/bg.png
","profile_background_image_url_https":"
https://si0.twimg.com/images/themes/theme1/bg.png
","follow_request_sent":null,"url":null,"utc_offset":null,"time_zone":null,"notifications":null,"profile_use_background_image":true,"friends_count":1,"profile_sidebar_fill_color":"DDEEF6","screen_name":"TahaniDias","id_str":"500403658","profile_image_url":"
http://a0.twimg.com/sticky/default_profile_images/default_profile_6_normal.png
","is_translator":false,"listed_count":0},"coordinates":null}
11:14:33.975 [Twitter4J Async Dispatcher[0]] DEBUG
twitter4j.StatusStreamImpl -
Received:{"contributors":null,"text":"なんかまだまだあまちゃんだってさ!いー年してんのにさぁ~( ̄∇ ̄)オレ!!","geo":null,"retweeted":false,"in_reply_to_screen_name":null,"truncated":false,"entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_status_id_str":null,"id":271089234109149184,"source":"<a
href=\"http://twitter.com/download/android\" rel=\"nofollow\">Twitter for
Android<\/a>","in_reply_to_user_id_str":null,"favorited":false,"in_reply_to_status_id":null,"created_at":"Wed
Nov 21 03:14:44 +0000
2012","retweet_count":0,"in_reply_to_user_id":null,"id_str":"271089234109149184","place":null,"user":{"location":"","default_profile":true,"statuses_count":574,"profile_background_tile":false,"lang":"ja","profile_link_color":"0084B4","profile_banner_url":"
https://si0.twimg.com/profile_banners/589547664/1349184536","id":589547664,"following":null,"favourites_count":180,"protected":false,"profile_text_color":"333333","description":"BLとT&Bにハマった遅咲き主腐(○´∀`○)漫画・アニメ大好きです♪恋する暴君に恋して腰乃キャラに萌えて明日美子センセを知ってレオパードに埋もれ純情シリーズは王道!","contributors_enabled":false,"verified":false,"name":"にえ(∂ε∂)","profile_sidebar_border_color":"C0DEED","profile_background_color":"C0DEED","created_at":"Thu
May 24 22:14:33 +0000
2012","default_profile_image":false,"followers_count":13,"geo_enabled":false,"profile_image_url_https":"
https://si0.twimg.com/profile_images/2316208106/YJ73GkSI_normal
","profile_background_image_url":"
http://a0.twimg.com/images/themes/theme1/bg.png
","profile_background_image_url_https":"
https://si0.twimg.com/images/themes/theme1/bg.png
","follow_request_sent":null,"url":null,"utc_offset":null,"time_zone":null,"notifications":null,"profile_use_background_image":true,"friends_count":44,"profile_sidebar_fill_color":"DDEEF6","screen_name":"nienieshufoo","id_str":"589547664","profile_image_url":"
http://a0.twimg.com/profile_images/2316208106/YJ73GkSI_normal
","is_translator":false,"listed_count":0},"coordinates":null}
11:14:33.976 [Twitter4J Async Dispatcher[0]] DEBUG
twitter4j.StatusStreamImpl - Received:{"contributors":null,"text":"الصدق
منجاة","geo":null,"retweeted":false,"in_reply_to_screen_name":null,"truncated":false,"entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_status_id_str":null,"id":271089234104971264,"source":"web","in_reply_to_user_id_str":null,"favorited":false,"in_reply_to_status_id":null,"created_at":"Wed
Nov 21 03:14:44 +0000
2012","retweet_count":0,"in_reply_to_user_id":null,"id_str":"271089234104971264","place":null,"user":{"location":"مواطنون
بلا
هوية","default_profile":false,"statuses_count":4724,"profile_background_tile":false,"lang":"en","profile_link_color":"1F98C7","id":325234803,"following":null,"favourites_count":24,"protected":false,"profile_text_color":"663B12","description":"لا
تخف من مواجهة الحياة، فإن بدا عليك الخوف زادت عليك الصعاب
","contributors_enabled":false,"verified":false,"name":"فيصل
العنزي","profile_sidebar_border_color":"C6E2EE","profile_background_color":"C6E2EE","created_at":"Mon
Jun 27 23:37:02 +0000
2011","default_profile_image":false,"followers_count":1133,"geo_enabled":true,"profile_image_url_https":"
https://si0.twimg.com/profile_images/2355004472/wxcpi93w2l6iywq0own4_normal.jpeg
","profile_background_image_url":"
http://a0.twimg.com/images/themes/theme2/bg.gif
","profile_background_image_url_https":"
https://si0.twimg.com/images/themes/theme2/bg.gif
","follow_request_sent":null,"url":"http://bedoon.org/ar/
","utc_offset":-18000,"time_zone":"Quito","notifications":null,"profile_use_background_image":true,"friends_count":1935,"profile_sidebar_fill_color":"DAECF4","screen_name":"moutfael","id_str":"325234803","profile_image_url":"
http://a0.twimg.com/profile_images/2355004472/wxcpi93w2l6iywq0own4_normal.jpeg
","is_translator":false,"listed_count":0},"coordinates":null}
11:14:33.976 [Twitter4J Async Dispatcher[0]] DEBUG
twitter4j.StatusStreamImpl - Received:{"contributors":null,"text":"is Wendy
ignoring me ;n; I'm sorry, Wendy, if I made you mad.
;n;","geo":null,"retweeted":false,"in_reply_to_screen_name":null,"truncated":false,"entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_status_id_str":null,"id":271089234100764672,"source":"web","in_reply_to_user_id_str":null,"favorited":false,"in_reply_to_status_id":null,"created_at":"Wed
Nov 21 03:14:44 +0000
2012","retweet_count":0,"in_reply_to_user_id":null,"id_str":"271089234100764672","place":null,"user":{"location":"New
Mexico,
USA","default_profile":false,"statuses_count":30563,"profile_background_tile":true,"lang":"en","profile_link_color":"B40B43","profile_banner_url":"
https://si0.twimg.com/profile_banners/34846556/1349300474","id":34846556,"following":null,"favourites_count":64,"protected":false,"profile_text_color":"362720","description":"Evil
Princess. 48family. Nogizaka46. Hello!Project. Jpop. Kpop. Gravure. Super
Sentai. Animanga. Britney. No
Doubt.","contributors_enabled":false,"verified":false,"name":"Haru","profile_sidebar_border_color":"CC3366","profile_background_color":"FF6699","created_at":"Fri
Apr 24 04:24:50 +0000
2009","default_profile_image":false,"followers_count":184,"geo_enabled":true,"profile_image_url_https":"
https://si0.twimg.com/profile_images/2707610162/2b6b8c6b6e3fa9f0210e961951703946_normal.png
","profile_background_image_url":"
http://a0.twimg.com/profile_background_images/61266557/59479d9d.jpg
","profile_background_image_url_https":"
https://si0.twimg.com/profile_background_images/61266557/59479d9d.jpg
","follow_request_sent":null,"url":"http://flavors.me/romanceirane","utc_offset":-25200,"time_zone":"Mountain
Time (US &
Canada)","notifications":null,"profile_use_background_image":true,"friends_count":302,"profile_sidebar_fill_color":"E5507E","screen_name":"romanceirane","id_str":"34846556","profile_image_url":"
http://a0.twimg.com/profile_images/2707610162/2b6b8c6b6e3fa9f0210e961951703946_normal.png
","is_translator":false,"listed_count":8},"coordinates":null}


Thanks.
Yu