Topics

vpp region init fail Couldn't connect to vpe, exiting...


jkzcristiano
 

Hi all,

This is the first time I write to this group and I am completely novel to vpp, so sorry if I write in the wrong list. I will share with you the following issue so you might guess what is happening.

I am starting a virtual machine (VM) in OpenStack using cloud trusty Ubuntu image (http://cloud-images.ubuntu.com/).

This VM is a packet generator so let us named it as 'vPG VM'.

During VM initiallization, the following bash scripts are also executed:

'v_vpacketgen_install.sh' which calls  'v_vpacketgen_init.sh'


For instance, this is exactly where vpp appears in the scripts

# Start VPP
start vpp
sleep 1

# Configure VPP
IPADDR1=$(ifconfig eth1 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
HWADDR1=$(ifconfig eth1 | grep HWaddr | tr -s ' ' | cut -d' ' -f5)
FAKE_HWADDR1=$(echo -n 00; dd bs=1 count=5 if=/dev/urandom 2>/dev/null | hexdump -v -e '/1 ":%02X"') # Generate a random MAC
PROTECTED_NET_CIDR=$(cat /opt/config/protected_net_cidr.txt)
FW_IPADDR=$(cat /opt/config/fw_ipaddr.txt)
SINK_IPADDR=$(cat /opt/config/sink_ipaddr.txt)

IPADDR1_MASK=$(ifconfig eth1 | grep "Mask" | awk '{print $4}' | awk -F ":" '{print $2}')
IPADDR1_CIDR=$(mask2cidr $IPADDR1_MASK)

ifconfig eth1 down # Needed to change the MAC
ifconfig eth1 hw ether $FAKE_HWADDR1 # Change eth1 MAC with the random MAC
ip addr flush dev eth1 # Remove all IP information of an interface
ifconfig eth1 up
vppctl tap connect tap111 hwaddr $HWADDR1 # In this sentence, the error occurs
vppctl set int ip address tap-0 $IPADDR1"/"$IPADDR1_CIDR # Again, in this sentence, the error occurs
vppctl set int state tap-0 up # Again, in this sentence, the error occurs
brctl addbr br0
brctl addif br0 tap111
brctl addif br0 eth1
ifconfig br0 up
vppctl ip route add $PROTECTED_NET_CIDR via $FW_IPADDR # Again, in this sentence, the error occurs
sleep 1

The following error appears in the logs of the VM every time a vppctl sentence is executed

vl_map_shmem:381: region init fail
connect_to_vlib_internal:123: vl_client_api map rv -2
Couldn't connect to vpe, exiting...

I attached with you the OpenStack log of the VM when is created.

Once the VM completes the initialization process, if I ssh into the VM and try to execute any vpp command (e.g., vppctl show hardware) the console waits for long and then outputs the same above error.


Do you have any guess of what is happening?

Kind regards,

Xoan


Florin Coras
 

Probably the right list would be vpp-dev@...

As for your question, is vpp actually up and running? What does ps -ef | grep vpp show?

Florin

On Aug 1, 2018, at 10:40 AM, jkzcristiano <jkzcristiano@...> wrote:

Hi all,

This is the first time I write to this group and I am completely novel to vpp, so sorry if I write in the wrong list. I will share with you the following issue so you might guess what is happening.

I am starting a virtual machine (VM) in OpenStack using cloud trusty Ubuntu image (http://cloud-images.ubuntu.com/).

This VM is a packet generator so let us named it as 'vPG VM'.

During VM initiallization, the following bash scripts are also executed:

'v_vpacketgen_install.sh' which calls  'v_vpacketgen_init.sh'


For instance, this is exactly where vpp appears in the scripts

# Start VPP
start vpp
sleep 1

# Configure VPP
IPADDR1=$(ifconfig eth1 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
HWADDR1=$(ifconfig eth1 | grep HWaddr | tr -s ' ' | cut -d' ' -f5)
FAKE_HWADDR1=$(echo -n 00; dd bs=1 count=5 if=/dev/urandom 2>/dev/null | hexdump -v -e '/1 ":%02X"') # Generate a random MAC
PROTECTED_NET_CIDR=$(cat /opt/config/protected_net_cidr.txt)
FW_IPADDR=$(cat /opt/config/fw_ipaddr.txt)
SINK_IPADDR=$(cat /opt/config/sink_ipaddr.txt)

IPADDR1_MASK=$(ifconfig eth1 | grep "Mask" | awk '{print $4}' | awk -F ":" '{print $2}')
IPADDR1_CIDR=$(mask2cidr $IPADDR1_MASK)

ifconfig eth1 down # Needed to change the MAC
ifconfig eth1 hw ether $FAKE_HWADDR1 # Change eth1 MAC with the random MAC
ip addr flush dev eth1 # Remove all IP information of an interface
ifconfig eth1 up
vppctl tap connect tap111 hwaddr $HWADDR1 # In this sentence, the error occurs
vppctl set int ip address tap-0 $IPADDR1"/"$IPADDR1_CIDR # Again, in this sentence, the error occurs
vppctl set int state tap-0 up # Again, in this sentence, the error occurs
brctl addbr br0
brctl addif br0 tap111
brctl addif br0 eth1
ifconfig br0 up
vppctl ip route add $PROTECTED_NET_CIDR via $FW_IPADDR # Again, in this sentence, the error occurs
sleep 1

The following error appears in the logs of the VM every time a vppctl sentence is executed

vl_map_shmem:381: region init fail
connect_to_vlib_internal:123: vl_client_api map rv -2
Couldn't connect to vpe, exiting...

I attached with you the OpenStack log of the VM when is created.

Once the VM completes the initialization process, if I ssh into the VM and try to execute any vpp command (e.g., vppctl show hardware) the console waits for long and then outputs the same above error.


Do you have any guess of what is happening?

Kind regards,

Xoan
<vpg_logs.txt>-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#530): https://lists.fd.io/g/discuss/message/530
Mute This Topic: https://lists.fd.io/mt/24050397/675152
Group Owner: discuss+owner@...
Unsubscribe: https://lists.fd.io/g/discuss/unsub  [fcoras.lists@...]
-=-=-=-=-=-=-=-=-=-=-=-


Dave Barach
 

The logs in question are full of vpp-16.09 references. That release is almost two years old. If at all possible, switch to 18.04 (or 18.07) and try again...

 

D.


Michael S. Pedersen
 

Hi Xoan,
 
You can have a look here: https://github.com/cncf/cnfs/tree/master/comparison/box-by-box-kvm-docker
We have been creating VMs and containers based on the scripts you reference above. You can have a look at the vDNSgen folder, which works similar to the vpacketgen mentioned.
 
- Michael


Multanen, Eric W
 

Xoan,

 

Per Dave’s earlier comment on the vpp version being quite old – a quick glance at the cncf work Michael points to looks like newer Ubuntu and vpp versions are being used there – so that may help.

 

(I’m familiar with the ONAP vCPE VPP VMs,  but not the vFW ones.  I have not encountered the error you are seeing.)

It looks like the vFW use case is still using the older vpp version. 

You should also note that the latest ONAP builds of the demo repo (vFW, vCPE, etc.) are no longer going to ‘raw’

e.g. https://nexus.onap.org/content/sites/raw/org.onap.demo/vnfs/vfw/1.2.1/

 

Snapshot builds of vFW (for example) are landing here:  https://nexus.onap.org/content/repositories/snapshots/org/onap/demo/vnf/vfw/vfw-scripts/1.3.0-SNAPSHOT/

You can check the scripts in the zip files there to see the latest versions of the onap vfw scripts (which may not have changed much from what you’re currently using).

 

Eric

 

 

From: discuss@... [mailto:discuss@...] On Behalf Of Michael S. Pedersen
Sent: Thursday, August 2, 2018 8:23 AM
To: discuss@...
Subject: Re: [discuss] vpp region init fail Couldn't connect to vpe, exiting...

 

Hi Xoan,

 

We have been creating VMs and containers based on the scripts you reference above. You can have a look at the vDNSgen folder, which works similar to the vpacketgen mentioned.

 

- Michael