Trouble running Twister: bfs

228 views
Skip to first unread message

Saayan

unread,
Jun 5, 2011, 1:04:53 PM6/5/11
to Twister Discussion Group
Hi,

I got Twister running successfully thanks to your help earlier. First
I tried running the wordcount example a few times.
Every try was a success.

Next I tried the bfs example. This time I was faced with a problem.

I followed the exact procedure as mentioned in the readme file under
bfs. First I built and copied the jar file into the apps
directory under the twister folder. Following is what I encountered
after that:-

*******************************************
saayan@ubuntu:~/twister-0.8/samples/bfs/bin$ ./graph_gen.sh 10000 100
graph-file
Graph Generated
MAX DIS 7
Check Connectivity true
saayan@ubuntu:~/twister-0.8/samples/bfs/bin$ ./graph_search.sh 5 10
graph-file >output
cgl.imr.base.TwisterException: cgl.imr.base.TwisterException: Could
not initialize all the nodes for this job. First error is Did not
receive a response from the worker.
at cgl.imr.client.TwisterDriver.<init>(TwisterDriver.java:221)
at cgl.imr.samples.bfs.GraphSearch.driveMapReduce(GraphSearch.java:
159)
at cgl.imr.samples.bfs.GraphSearch.main(GraphSearch.java:99)
Caused by: cgl.imr.base.TwisterException: Could not initialize all the
nodes for this job. First error is Did not receive a response from the
worker.
at cgl.imr.client.TwisterDriver.sendNewJobRequest(TwisterDriver.java:
1084)
at cgl.imr.client.TwisterDriver.<init>(TwisterDriver.java:219)
... 2 more


saayan@ubuntu:~/twister-0.8/samples/bfs/bin$
******************************************

By the way I am running Twister on a single machine under Ubuntu
10.10.

Following are the specs and details of the machine on which I am
running Twister:

Dell laptop with i3 Dual Core (4 threads) 2.27GHz under Windows 7
Twister running under Ubuntu 10.10 on VMware player with Windows 7 as
host

Java version:-
-----------------------------------------
saayan@ubuntu:~/twister-0.8/samples/bfs/bin$ java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1)
OpenJDK Client VM (build 19.0-b09, mixed mode, sharing)
saayan@ubuntu:~/twister-0.8/samples/bfs/bin$
-----------------------------------------

Thanks for your help,
Saayan

Bingjing ZHANG

unread,
Jun 5, 2011, 1:42:41 PM6/5/11
to twister-disc...@googlegroups.com
please make sure NaradaBrokering and Twister Daemons are successfully running.

Or try the newest version to see if you meet the same problem.

Saayan Bhattacharya

unread,
Jun 7, 2011, 2:49:28 AM6/7/11
to twister-disc...@googlegroups.com
Hi,

Thanks for the response - however when I try Twister 0.90 I again get the old error - this time the .bashrc has the line (suggested by you earlier) commented out as shown below.
******************************
# If not running interactively, don't do anything
#[ -z "$PS1" ] && return
******************************
******************************
saayan@ubuntu:~/twister-0.9/bin$ echo $TWISTER_HOME
/home/saayan/twister-0.9
saayan@ubuntu:~/twister-0.9/bin$ ls -l $TWISTER_HOME/bin/start_twister.sh
-rwxr-xr-x 1 saayan saayan 3913 2010-09-17 13:41 /home/saayan/twister-0.9/bin/start_twister.sh
saayan@ubuntu:~/twister-0.9/bin$ $TWISTER_HOME/bin/start_twister.sh
192.168.1.15
saayan@ubuntu:~/twister-0.9/bin$ Exception in thread "main" java.lang.NoClassDefFoundError: cgl/imr/worker/TwisterDaemon
Caused by: java.lang.ClassNotFoundException: cgl.imr.worker.TwisterDaemon
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: cgl.imr.worker.TwisterDaemon. Program will exit.
*******************************

Narada Brokering is running successfully as shown below

saayan@ubuntu:~/NaradaBrokering-4.2.2/bin$ Using NB_HOME: /home/saayan/NaradaBrokering-4.2.2

           The NaradaBrokering System
      NaradaBrokering, Version [4.2.2---06-10-2009]
    Community Grids Lab - Indiana University

Using BrokerKeyStore: /home/saayan/NaradaBrokering-4.2.2/keystore/NBSecurityTest.keys
LongTopicGenerator is initialized.
Loaded NIOTCPLinkFactory communication services
Loaded TCPLinkFactory communication services
Loaded PTCPLinkFactory communication services
Loaded UDPLinkFactory communication services
Loaded PoolTCPLinkFactory communication services
HTTP Acceptor created on port 9045
/home/saayan/NaradaBrokering-4.2.2/keystore/Broker.TRUSTSTORE
BelongsTO: PRIVATE Network(network-CGL-1)
INIT: DefaultBrokerDiscoveryRequestResponsePolicy
SessionService: Initializing services using: /home/saayan/NaradaBrokering-4.2.2//config/ServiceConfiguration.txt
Setting HOST: 192.168.1.15

Thanks for your help.
Saayan

Bingjing ZHANG

unread,
Jun 7, 2011, 8:56:15 AM6/7/11
to twister-disc...@googlegroups.com
Hi, Saayan,

We ran Twister successfully in many different environments, including ubuntu.

So I guess the problem you meet is just a small one.

The error is simple, that is the script cannot find the Twister-0.9.jar.

firstly do ant, make sure you have the jar package under $TWISTER_HOME/lib,

then start NB or ActiveMQ

After configuration, cd to $TWISTER_HOME/bin/, then execute ./start_twister.sh

see if this works.

You can also do echo in start_twister.sh to see if classpath is correct.

If it still can not work, next time you need provide me what you have
configured, what you have executed in detail.

Then I can help you to see what is happening there.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages