OpenStack Neutron (virtual network service)

Error ovs-vsctl add-br br-int : connection to /var/run/openvswitch/db.sock failed: No such file or directory

Asked by Krishna K on 2012-10-03

Following these steps http://docs.openstack.org/trunk/openstack-network/admin/content/install_quantum_agent_ovs.html and hitting the below error. Appreciate suggestions:

Do I need to do any additional steps before ova-vsctl ? This link seems to have bunch of other other steps such as ovsdb etc., (http://cloudage.admin-magazine.com/Articles/Virtual-switching-with-Open-vSwitch).

Appreciate any pointers.

root@ubuntu:~# service quantum-plugin-openvswitch-agent restart
stop: Unknown instance:
quantum-plugin-openvswitch-agent start/running, process 28779
root@ubuntu:~# ovs-vsctl add-br br-int
Oct 03 07:11:08|00002|stream_unix|ERR|/tmp/stream-unix.28802.0: connection to /var/run/openvswitch/db.sock failed: No such file or directory
Oct 03 07:11:08|00003|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
Oct 03 07:11:09|00004|stream_unix|ERR|/tmp/stream-unix.28802.1: connection to /var/run/openvswitch/db.sock failed: No such file or directory
Oct 03 07:11:09|00005|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
^C
root@ubuntu:~# ^C
root@ubuntu:~# uname -a
Linux ubuntu 3.2.0-23-generic-pae #36-Ubuntu SMP Tue Apr 10 22:19:09 UTC 2012 i686 i686 i386 GNU/Linux
root@ubuntu:~#

Question information

Language:
English Edit question
Status:
Solved
For:
neutron Edit question
Assignee:
No assignee Edit question
Solved by:
Krishna K
Solved:
2012-10-03
Last query:
2012-10-03
Last reply:
2012-10-03
Aaron Rosen (arosen) said : #1

It seems openvswitch isn't running Can you try running: /etc/init.d/openvswitch-switch restart

If you use the ubuntu package it should handle all of those steps for you.

Krishna K (krishna-sunitha) said : #2

Hi Aaron,

> If you use the ubuntu package it should handle all of those steps for you.

Apologize. Iam aware on how to do that . Can you pls give me the pointer to ubuntu package/instructions (for folsom).

Is this the one ?

Step 1: http://docs.openstack.org/trunk/openstack-compute/install/apt/content/assumptions.html
On Ubuntu, enable the Cloud Archive repository by adding the following to /etc/apt/sources.list.d/folsom.list:
deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/folsom main
Ensure the operating system is up-to-date by running apt-get update and apt-get upgrade prior to the installation.

Step 2: Then follow steps from here:
http://docs.openstack.org/trunk/openstack-network/admin/content/install_ubuntu.html

Thanks.

Aaron Rosen (arosen) said : #3

kernel_version=`cat /proc/version | cut -d " " -f3`
apt-get install make fakeroot dkms openvswitch-switch openvswitch-datapath-dkms linux-headers-$kernel_version

Krishna K (krishna-sunitha) said : #4

Thanks much Aaron. It worked.

Repeated the steps few times. Worked after doing this "apt-get autoremove openvswitch-datapath-dkms" and then repeating this step:
kernel_version=`cat /proc/version | cut -d " " -f3`
apt-get install make fakeroot dkms openvswitch-switch openvswitch-datapath-dkms linux-headers-$kernel_version

session log:
root@ubuntu:~# kernel_version=`cat /proc/version | cut -d " " -f3`
root@ubuntu:~# apt-get install make fakeroot dkms openvswitch-switch openvswitch-datapath-dkms linux-headers-$kernel_version
Reading package lists... Done
Building dependency tree
Reading state information... Done
dkms is already the newest version.
dkms set to manually installed.
fakeroot is already the newest version.
fakeroot set to manually installed.
make is already the newest version.
make set to manually installed.
openvswitch-datapath-dkms is already the newest version.
openvswitch-datapath-dkms set to manually installed.
openvswitch-switch is already the newest version.
openvswitch-switch set to manually installed.
The following package was automatically installed and is no longer required:
  python-support
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-headers-3.2.0-23
The following NEW packages will be installed:
  linux-headers-3.2.0-23 linux-headers-3.2.0-23-generic-pae
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.4 MB of archives.
After this operation, 67.3 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main linux-headers-3.2.0-23 all 3.2.0-23.36 [11.4 MB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise/main linux-headers-3.2.0-23-generic-pae i386 3.2.0-23.36 [944 kB]
Fetched 12.4 MB in 23s (529 kB/s)
Selecting previously unselected package linux-headers-3.2.0-23.
(Reading database ... 66967 files and directories currently installed.)
Unpacking linux-headers-3.2.0-23 (from .../linux-headers-3.2.0-23_3.2.0-23.36_all.deb) ...
Selecting previously unselected package linux-headers-3.2.0-23-generic-pae.
Unpacking linux-headers-3.2.0-23-generic-pae (from .../linux-headers-3.2.0-23-generic-pae_3.2.0-23.36_i386.deb) ...
Setting up linux-headers-3.2.0-23 (3.2.0-23.36) ...
Setting up linux-headers-3.2.0-23-generic-pae (3.2.0-23.36) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.2.0-23-generic-pae /boot/vmlinuz-3.2.0-23-generic-pae
root@ubuntu:~# ovs-vsctl add-br br-int
Oct 03 11:11:31|00002|stream_unix|ERR|/tmp/stream-unix.29594.0: connection to /var/run/openvswitch/db.sock failed: No such file or directory
Oct 03 11:11:31|00003|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
Oct 03 11:11:32|00004|stream_unix|ERR|/tmp/stream-unix.29594.1: connection to /var/run/openvswitch/db.sock failed: No such file or directory
Oct 03 11:11:32|00005|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
Oct 03 11:11:34|00006|stream_unix|ERR|/tmp/stream-unix.29594.2: connection to /var/run/openvswitch/db.sock failed: No such file or directory
Oct 03 11:11:34|00007|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
^C
root@ubuntu:~# ^C
root@ubuntu:~# ovs-vsctl add-br br-int
Oct 03 11:12:02|00002|stream_unix|ERR|/tmp/stream-unix.29595.0: connection to /var/run/openvswitch/db.sock failed: No such file or directory
Oct 03 11:12:02|00003|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
Oct 03 11:12:03|00004|stream_unix|ERR|/tmp/stream-unix.29595.1: connection to /var/run/openvswitch/db.sock failed: No such file or directory
Oct 03 11:12:03|00005|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
^C
root@ubuntu:~# ^C
root@ubuntu:~# reboot
root@ubuntu:~#

...

root@ubuntu:~# uname -a
Linux ubuntu 3.2.0-31-generic-pae #50-Ubuntu SMP Fri Sep 7 16:39:45 UTC 2012 i686 i686 i386 GNU/Linux
root@ubuntu:~# kernel_version=`cat /proc/version | cut -d " " -f3`
root@ubuntu:~# apt-get install make fakeroot dkms openvswitch-switch openvswitch-datapath-dkms linux-headers-$kernel_version
Reading package lists... Done
Building dependency tree
Reading state information... Done
dkms is already the newest version.
fakeroot is already the newest version.
make is already the newest version.
linux-headers-3.2.0-31-generic-pae is already the newest version.
linux-headers-3.2.0-31-generic-pae set to manually installed.
openvswitch-datapath-dkms is already the newest version.
openvswitch-switch is already the newest version.
The following package was automatically installed and is no longer required:
  python-support
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ubuntu:~# /etc/init.d/openvswitch-switch restart
 * ovs-brcompatd is not running
 * ovs-vswitchd is not running
 * ovsdb-server is not running
FATAL: Module openvswitch_mod not found.
 * Inserting openvswitch module
Module has probably not been built for this kernel.
Install the openvswitch-datapath-source package, then read
/usr/share/doc/openvswitch-datapath-source/README.Debian
FATAL: Module openvswitch_mod not found.
 * Inserting openvswitch module
root@ubuntu:~# ovs-vsctl add-br br-int
Oct 03 11:16:27|00002|stream_unix|ERR|/tmp/stream-unix.1592.0: connection to /var/run/openvswitch/db.sock failed: No such file or directory
Oct 03 11:16:27|00003|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
Oct 03 11:16:28|00004|stream_unix|ERR|/tmp/stream-unix.1592.1: connection to /var/run/openvswitch/db.sock failed: No such file or directory
Oct 03 11:16:28|00005|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
Oct 03 11:16:30|00006|stream_unix|ERR|/tmp/stream-unix.1592.2: connection to /var/run/openvswitch/db.sock failed: No such file or directory
Oct 03 11:16:30|00007|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
^C

oot@ubuntu:~# apt-get autoremove openvswitch-datapath-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  openvswitch-datapath-dkms python-support
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 12.5 MB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 89257 files and directories currently installed.)
Removing openvswitch-datapath-dkms ...

------------------------------
Deleting module version: 1.4.0
completely from the DKMS tree.
------------------------------
Done.
Removing python-support ...
Processing triggers for man-db ...
root@ubuntu:~# apt-get install make fakeroot dkms openvswitch-switch openvswitch-datapath-dkms linux-headers-$kernel_version
Reading package lists... Done
Building dependency tree
Reading state information... Done
dkms is already the newest version.
fakeroot is already the newest version.
make is already the newest version.
linux-headers-3.2.0-31-generic-pae is already the newest version.
openvswitch-switch is already the newest version.
The following NEW packages will be installed:
  openvswitch-datapath-dkms
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2,004 kB of archives.
After this operation, 12.4 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Selecting previously unselected package openvswitch-datapath-dkms.
(Reading database ... 88428 files and directories currently installed.)
Unpacking openvswitch-datapath-dkms (from .../openvswitch-datapath-dkms_1.4.0-1ubuntu1.3_all.deb) ...
Setting up openvswitch-datapath-dkms (1.4.0-1ubuntu1.3) ...

Creating symlink /var/lib/dkms/openvswitch/1.4.0/source ->
                 /usr/src/openvswitch-1.4.0

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area....(bad exit status: 2)
./configure --with-linux=/usr/src/linux-headers-3.2.0-31-generic-pae ; make -C datapath/linux......
....
cleaning build area....(bad exit status: 2)

DKMS: build completed.

openvswitch_mod:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.2.0-31-generic-pae/updates/dkms/

brcompat_mod.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.2.0-31-generic-pae/updates/dkms/

depmod.......

DKMS: install completed.
root@ubuntu:~# apt-get install make fakeroot dkms openvswitch-switch openvswitch-datapath-dkms linux-headers-$kernel_version
Reading package lists... Done
Building dependency tree
Reading state information... Done
dkms is already the newest version.
fakeroot is already the newest version.
make is already the newest version.
linux-headers-3.2.0-31-generic-pae is already the newest version.
openvswitch-datapath-dkms is already the newest version.
openvswitch-switch is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ubuntu:~# /etc/init.d/openvswitch-switch restart
 * ovs-brcompatd is not running
 * ovs-vswitchd is not running
 * ovsdb-server is not running
 * Inserting openvswitch module
 * /etc/openvswitch/conf.db does not exist
 * Creating empty database /etc/openvswitch/conf.db
 * Starting ovsdb-server
 * Configuring Open vSwitch system IDs
 * Starting ovs-vswitchd
 * Enabling gre with iptables
root@ubuntu:~# ovs-vsctl add-br br-int
root@ubuntu:~#