Closed qq995002966 closed 6 years ago
Can anybody help? I'm still struggling with this problem. (╥╯^╰╥)
Did you try the VM yet? That worked for me.
This is in the VM:
p4@p4:~ $ pip list astroid (1.4.4) cffi (1.11.2) chardet (2.3.0) crcmod (1.7) defer (1.0.6) enum34 (1.1.6) futures (3.1.1) grpcio (1.7.0) ipaddr (2.1.11) lazy-object-proxy (1.2.1) logilab-common (1.1.0) mininet (2.3.0d1) nnpy (0.1) pexpect (4.0.1) pip (8.1.1) protobuf (3.4.0) psutil (3.4.2) ptyprocess (0.5) pycparser (2.18) pyflakes (1.1.0) pygobject (3.20.0) pylint (1.5.2) pysqlite (2.7.0) python-apt (1.1.0b1) python-debian (0.1.27) pyxdg (0.25) scapy (2.2.0) setuptools (20.7.0) six (1.10.0) thrift (0.9.2) wrapt (1.8.0) You are using pip version 8.1.1, however version 9.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. p4@p4:~ $ locate p4runtime_pb2 /home/vagrant/PI/proto/py_out/p4/p4runtime_pb2.py /home/vagrant/PI/proto/py_out/p4/p4runtime_pb2_grpc.py /home/vagrant/p4c/build/control-plane/p4/p4runtime_pb2.py /usr/local/lib/python2.7/dist-packages/p4/p4runtime_pb2.py /usr/local/lib/python2.7/dist-packages/p4/p4runtime_pb2.pyc /usr/local/lib/python2.7/dist-packages/p4/p4runtime_pb2.pyo p4@p4:~ $
It seems like you were missing the grpc python plugin at the time that p4runtime_pb.py
was generated. You may still be missing it. You can try re-running make && sudo make install && sudo ldconfig
inside your PI directory.
You might also want to bring up the tutorial VM via Vagrant, and then compare your environment to the VM environment.
I stick on the same problem for a few days. I “solved” it by using tutorial VM via Vagrant.
@tomyhu1995 hi tomyhu
I also move to the VM
following /P4D2_2017_Fall/exercises/README
. May I ask you how to
Log in with username
p4
and passwordp4
and issue the commandsudo shutdown -r now
?
I mean after vagrant up
I got a virtualbox window, then I enter p4
, p4
but got Login incorrect
like the picture show.
@qq995002966 Hi
It is weird. I can log in by using username p4
and password p4
.
BUT, I got the same problem when I opened the VM at the very first time. After a few hours, I could log in with username p4
and password p4
. WEIRD!!
I don't know the reason why I can log in after waiting a few hours. But it proves that username and password are all correct.
Hope that my experience can help you.
User p4
is added in root-bootstrap.sh
useradd -m -d /home/p4 -s /bin/bash p4
echo "p4:p4" | chpasswd
echo "p4 ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/99_p4
chmod 440 /etc/sudoers.d/99_p4
usermod -aG vboxsf p4
So bacause of the vagrant provision failure, I cannot login in vm with user p4
.
Solution for vagrant provision failure:
I'm not familar with virtualbox, so I create a new ubuntu 16.04 server
using Vmware. To access ubuntu archives from chain, I installed shadowsocks
and proxychains-ng
(because of some f***king government policy). After that, I run root-bootstrap.sh
and user-bootstrap.sh
manually.
If you are in chain too and don't want to install shadowsocks
for the extra work and low network speed, you could contact me to get a packaged vm image.
Thanks guys.
Followed
P4D2_2017_Fall/exercises/p4runtime/README
, I tried to run./mycontroller.py
while got follow error messagehere is my pip list show
and here is
locate p4runtime_pb2
showdo I miss some prerequisites ?