[P4-dev] BMV2 in custom Dockercontainer - no thrift port

Antonin Bas antonin at barefootnetworks.com
Tue Jul 3 12:40:15 EDT 2018


Hi,

You didn't do ldconfig after installing Thrift so that may be the issue.
Maybe the bmv2 configure logs can shed more light as to why Thrift is not
detected.
If you do not want to use the Ubuntu-based docker container we provide, I
still recommend that you copy this Dockerfile to install all dependencies:
https://github.com/p4lang/third-party. You should be able to change the
base Docker image from Ubuntu to Debian in the FROM statement.

On Tue, Jul 3, 2018 at 7:16 AM, cs.lev <cs.lev at gmx.com> wrote:

> Hi All,
>
> I need behavioral-model to be working in a debian:latest based docker
> container (the container build from the Dockerfile in https://github.co
> m/p4lang/behavioral-model was not working for me).
>
> I have installed everything once on a bare-metal server and everything
> was working. Now, I have repeated all steps with no errors on the same
> server but in a container.
>
> My problem is that when I start simple_switch application it indeed
> prints out that Thrift server was started but I neither am able to
> connect to it, nor netstat would print that something is listening on
> 9090.
>
> What I found as a problem, or at least the reason that when I run only
> simple_switch --help, it does print out command line argument --thrift-
> port on the bare metal server (right above the command line argument --
> device-id), but in my container this argument is missing.
>
> thrift was installed as follows on both the bare-metal and the
> container:
>
> cd behavioral-model/travis/
>
> wget http://archive.apache.org/dist/thrift/0.9.2/thrift-0.9.2.tar.gz
>
> tar -xzvf thrift-0.9.2.tar.gz
>
> cd thrift-0.9.2
>
> #this was needed because of an error: (SSLv3_method was not declared in
> this scope) - as suggested here (https://github.com/ptrkrysik/gr-gsm/is
> sues/155) I have modified it
> sed -i "s/SSLv3_method/SSLv23_method/"
> lib/cpp/src/thrift/transport/TSSLSocket.cpp
>
> ./configure --without=java
>
> make -j2 && sudo make install
>
> cd lib/py
>
> sudo python setup.py install
>
>
> Then behavioral-switch was compiled as follows (again, in both cases):
> cd behaviroral-model/
>
> ./autogen.sh
>
> ./configure --with-thrift=/home/csikor/p4/behavioral-
> model/travis/thrift-0.9.2/lib/
>
> make
>
> sudo make install
>
> sudo ldconfig
>
>
> What could be wrong?
>
> Thank you,
> cs.lev
>
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>



-- 
Antonin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20180703/41b089f5/attachment.html>


More information about the P4-dev mailing list