Running Pyresonance Task
Closed this issue · 14 comments
Hello Dears,
when i tried the tutorial on running existing pyresonance task i have two issues
1- when running pyresonance it gives me Error: pox not found in PYTHONPATH
2- when sending a json event it gives me ImportError: No module named pyretic.pyresonance.globals
any help would be appreciated
Quick question: are you running your own system, or the VM we provided?
If it's your own system, check below.
On 12/19/2013 01:24 PM, ahmedabobakr wrote:
1- when running pyresonance it gives me Error: pox not found in PYTHONPATH
Your PYTHONPATH env variable should have the path to the directory where
POX resides. For example, the VM we provide has POX in
"home/mininet/pox". Not only for POX, but it should also include path to
pyretic and mininet.
Please run a command similar to this before you run Pyresonance:
export
PYTHONPATH=/home/mininet/pyretic:/home/mininet/mininet:/home/mininet/pox
The directory names will be different if you are running your own
system. For the provided VM, this is unnecessary because it's already done.
2- when sending a json event it gives me ImportError: No module named
pyretic.pyresonance.globals
This should be solved if your PYTHONPATH is set correctly, as above. If
things don't work, please give me the output of "echo $PYTHONPATH", and
the directories where mininet, pyretic, and pox are installed.
Thanks,
Joon
—
Reply to this email directly or view it on GitHub
#11.
-Joon
Thank you Joon for ur reply..
but it didnot work.
i am using ubuntu not VM here are the directories
1- output of echo $PYTHONPATH
/home/ahmed/pyretic:/home/ahmed/mininet/:/home/ahmed/pox
2- Mininet directory
/home/ahmed/mininet
3- Pyretic directory
/home/ahmed/pyretic
4- pox
/home/ahmed/pox
Hi,
No problem.
Is it giving you the same error? Before Pyresonance, can you run any
Pyretic module successfully?
You can refer here for running Pyretic:
https://github.com/frenetic-lang/pyretic/wiki/running-pyretic
Please give me your exact command, and where you are executing the
command. FYI, don't use "sudo" when running Pyresonance or Pyretic
controller.
BTW, to make PYTHONPATH permanent add below two lines to your ~/.bashrc
PYTHONPATH=$PYTHONPATH:/home/ahmed/pox
export PYTHONPATH
-Joon
On 12/19/2013 7:19 PM, ahmedabobakr wrote:
Thank you Joon for ur reply..
but it didnot work. here is the directories
1- output of echo $PYTHONPATH
/home/ahmed/pyretic:/home/ahmed/mininet/:/home/ahmed/pox2- Mininet directory
/home/ahmed/mininet3- Pyretic directory
/home/ahmed/pyretic4- pox
/home/ahmed/pox—
Reply to this email directly or view it on GitHub
#11 (comment).
still not working ... i have traced back everything
1- created a topolgy with a remote controller using the command
ahmed@ahmed-hp:~$ sudo mn --topo single,3 --mac --arp --controller=remote
2- mininet>h1 ping h2 no ping and no output..
3- running the pox controller with forwarding.l2_learning module using the command
ahmed@ahmed-hp:~$ /home/ahmed/pox/pox.py forwarding.l2_learning
4- again mininet> h1 ping h2 works well, so the pox controller is exist and working well.
5- stop pox controller
6- try to run pyretic.py using the command
ahmed@ahmed-hp:~$ /home/ahmed/pyretic/pyretic.py -m p0 pyretic.modules.mac_learner
gives ->> Error: pox not found in PYTHONPATH
According to the Pyretic code:
https://github.com/frenetic-lang/pyretic/blob/master/pyretic.py#L176
"Error: pox not found in PYTHONPATH" is printed when PYTHONPATH does not
contain the POX directory. As your "echo $PYTHONPATH" shows that it DOES
contain the POX directory, I'm not sure what's happening.
One thing I would suggest is to run this:
export PATH=$PATH:/home/ahmed/pyretic:/home/ahmed/pox
and try again, just in case. Apologies that I cannot come up with better
suggestions.
If you have PYTHONPATH (and maybe PATH) set up correctly, running
"pox.py forwarding.l2_learning" in any directory should execute without
any error. (i.e., don't give full path to pox.py, like
"/home/ahmed/pox/pox.py forwarding.l2_learning", just "pox.py
forwarding.l2_learning".)
Printout of "which pox.py" and "which pyretic.py" can give you some idea
whether your path env variables are correct. If any of them gives you
blank, something is not right.
Pyretic running without any problem is a prerequisite for running
PyResonance. Again, importing and using the provided VM with Virtualbox
is the best option if you want to try PyResonance out with minimal trouble.
32-bit VM:
http://resonance.noise.gatech.edu/data/PyResonance_0.2.0_32bit.ova
64-bit VM:
http://resonance.noise.gatech.edu/data/PyResonance_0.2.0_64bit.ova
VirtualBox: https://www.virtualbox.org/
-Joon
On 12/20/2013 01:40 PM, ahmedabobakr wrote:
still not working ... i have traced back everything
1- created a topolgy with a remote controller using the command
ahmed@ahmed-hp:~$ sudo mn --topo single,3 --mac --arp --controller=remote
2- mininet>h1 ping h2 no ping and no output..
3- running the pox controller with forwarding.l2_learning module using
the commandahmed@ahmed-hp:~$ /home/ahmed/pox/pox.py forwarding.l2_learning
4- again mininet> h1 ping h2 works well, so the pox controller is
exist and working well.5- stop pox controller
6- try to run pyretic.py using the command
ahmed@ahmed-hp:~$ /home/ahmed/pyretic/pyretic.py -m p0
pyretic.modules.mac_learnergives ->> Error: pox not found in PYTHONPATH
—
Reply to this email directly or view it on GitHub
#11 (comment).
-Joon
Just to chime in, Ahmed, you tested
ahmed@ahmed-hp:~$ /home/ahmed/pox/pox.py forwarding.l2_learning
instead try running
ahmed@ahmed-hp:~$ pox.py forwarding.l2_learning
from your home directory and see if it works. My guess is that it won't (until you've followed Joon's advice and set your PYTHONPATH properly.
-Josh
On Dec 20, 2013, at 6:10 PM, Hyojoon Kim notifications@github.com wrote:
/home/ahmed/pox/pox.py
i am trying setting my PYTHONPATH using command
export PYTHONPATH=/home/ahmed/mininet:/home/ahmed/pox
and try running pox.py forwarding.l2_learning gives me pox.py: command not found
i dont know what i am doing wrong !!!!!!!!
Have you set your PATH correctly as well?
try these:
export PATH=$PATH:$HOME/pyretic:$HOME/pox
export PYTHONPATH=$HOME/pyretic:$HOME/mininet:$HOME/pox
for more info see https://github.com/frenetic-lang/pyretic/wiki/Building-the-Pyretic-VM, step #7 in particular
-Josh
On Dec 26, 2013, at 2:58 PM, ahmedabobakr notifications@github.com wrote:
i am trying setting my PYTHONPATH using command
export PYTHONPATH=/home/ahmed/mininet:/home/ahmed/poxand try running pox.py forwarding.l2_learning gives me pox.py: command not found
i dont know what i am doing wrong !!!!!!!!
—
Reply to this email directly or view it on GitHub.
yes i tried that ways but also not working
Thanks Josh!
In addition to doing above, also make sure that you have checked out (and using) the "carp" branch of POX.
Thanks,
Joon
Please copy and paste all the commands you ran, including error messages.
On Dec 26, 2013, at 6:43 PM, ahmedabobakr notifications@github.com wrote:
yes i tried that ways but also not working
—
Reply to this email directly or view it on GitHub.
Shouldn't matter that much, but some information about your Linux
distribution (e.g., ubuntu, debian), version, and shell type (e.g.,
bash) may help as well.
-Joon
On 12/26/2013 05:47 PM, Joshua Reich wrote:
Please copy and paste all the commands you ran, including error messages.
On Dec 26, 2013, at 6:43 PM, ahmedabobakr notifications@github.com
wrote:yes i tried that ways but also not working
—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHub
#11 (comment).
-Joon
Thank you Dears for your great efforts, problem solved :)
The solution that worked with me is to make the PYTHONPATH and PATH permanent by appending the export commands
export PATH=$PATH:$HOME/pyretic:$HOME/pox
export PYTHONPATH=$HOME/pyretic:$HOME/mininet:$HOME/pox
in the end of the files ~/.bashrc and ~/.profile because that files are loaded once the terminal is opened.
Yes, that way you will have the same outcome from every terminal.
Glad it worked out! I will close this issue then :-)
-Joon
On 12/26/2013 07:48 PM, ahmedabobakr wrote:
Thank you Dears for your great efforts, problem solved :)
The solution that worked with me is to make the PYTHONPATH and PATH
permanent by appending the export commandsexport PATH=$PATH:$HOME/pyretic:$HOME/pox
export PYTHONPATH=$HOME/pyretic:$HOME/mininet:$HOME/pox
in the end of the files ~/.bashrc and ~/.profile because that files
are loaded once the terminal is opened.—
Reply to this email directly or view it on GitHub
#11 (comment).
-Joon