Encountered an OVS startup problem [self created :( ] and thought of
sharing this, and the solution, incase someone encounters this issue:

I was getting this error after I built / installed OVS.
The reason was that I had first built OVS using following configure
parameters:

./configure --enable-ssl --enable-Werror CC=gcc

and then:
make
sudo make install

Later, I built OVS again with follwing configure parameters:
./configure --prefix=/usr --localstatedir=/var  --sysconfdir=/etc
--enable-ssl --enable-Werror CC=gcc

and then:
make
sudo make uninstall
sudo make install

What happended as a result was that OVS binaries were now present at two
locations:
$ ls /usr/local/bin/ovs-*
/usr/local/bin/ovs-appctl  /usr/local/bin/ovs-dpctl-top
/usr/local/bin/ovs-parse-backtrace  /usr/local/bin/ovs-tcpdump
/usr/local/bin/ovs-testcontroller
/usr/local/bin/ovs-docker  /usr/local/bin/ovs-l3ping
 /usr/local/bin/ovs-pcap             /usr/local/bin/ovs-tcpundump
/usr/local/bin/ovs-vlan-test
/usr/local/bin/ovs-dpctl   /usr/local/bin/ovs-ofctl
/usr/local/bin/ovs-pki              /usr/local/bin/ovs-test
 /usr/local/bin/ovs-vsctl

$ ls /usr/bin/ovs-*
/usr/bin/ovs-appctl  /usr/bin/ovs-dpctl-top  /usr/bin/ovs-parse-backtrace
/usr/bin/ovs-tcpdump    /usr/bin/ovs-testcontroller
/usr/bin/ovs-docker  /usr/bin/ovs-l3ping     /usr/bin/ovs-pcap
 /usr/bin/ovs-tcpundump  /usr/bin/ovs-vlan-test
/usr/bin/ovs-dpctl   /usr/bin/ovs-ofctl      /usr/bin/ovs-pki
/usr/bin/ovs-test       /usr/bin/ovs-vsctl

At this point when I tried to start OVS, I got the following error:
$ sudo /usr/share/openvswitch/scripts/ovs-ctl start
 * Starting ovsdb-server
ovs-vsctl: unix:/usr/local/var/run/openvswitch/db.sock: database connection
failed (No such file or directory)

The reason being, the old version of ovs-vsctl was getting used:
$ which ovs-vsctl
/usr/local/bin/ovs-vsctl


Please note that running "sudo make uninstall" did not cleanup up the old
binaries because the OVS directories were already changed as a result of
running the second ./configure command.


Simple fix:
Change the OVS directory back to old path:
./configure --enable-ssl --enable-Werror CC=gcc
sudo make uninstall

The old binaries got cleaned up:
$ ls /usr/local/bin/ovs-*
ls: cannot access '/usr/local/bin/ovs-*': No such file or directory

Then, (stopped and) started OVS without any issue!

$ sudo /usr/share/openvswitch/scripts/ovs-ctl stop
 * ovs-vswitchd is not running
2018-02-08T01:06:46Z|00001|unixctl|WARN|failed to connect to
/var/run/openvswitch/ovsdb-server.31957.ctl
ovs-appctl: cannot connect to "/var/run/openvswitch/ovsdb-server.31957.ctl"
(No such file or directory)
2018-02-08T01:06:46Z|00001|unixctl|WARN|failed to connect to
/var/run/openvswitch/ovsdb-server.31957.ctl
ovs-appctl: cannot connect to "/var/run/openvswitch/ovsdb-server.31957.ctl"
(No such file or directory)
 * Exiting ovsdb-server (31957)
 * Killing ovsdb-server (31957)


$ sudo /usr/share/openvswitch/scripts/ovs-ctl start
 * Starting ovsdb-server
 * system ID not configured, please use --system-id
 * Configuring Open vSwitch system IDs
 * Starting ovs-vswitchd
 * Enabling remote OVSDB managers
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to