[Bug 1405588] Re: database connection failed (Protocol error)

Xiang Hui hui.xiang at canonical.com
Mon Jan 5 03:44:39 UTC 2015


** Description changed:

  Versions:
  root at juju-xh-machine-5:~# dpkg -l|grep openvswitch
  ii  openvswitch-common               2.0.2-0ubuntu0.14.04.1           amd64        Open vSwitch common components
  ii  openvswitch-switch               2.0.2-0ubuntu0.14.04.1           amd64        Open vSwitch switch implementations
  
  root at juju-xh-machine-5:~# uname -a
  Linux juju-precise-machine-5 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
  
  root at juju-xh-machine-5:~# cat /etc/issue
  Ubuntu 14.04.1 LTS \n \l
+ 
+ root at juju-precise-machine-5:/var/log/neutron# dpkg -l|grep neutron
+ ii  neutron-common                   1:2014.1.3-0ubuntu1.1               all          Neutron is a virtual network service for Openstack - common
+ ii  neutron-plugin-ml2               1:2014.1.3-0ubuntu1.1               all          Neutron is a virtual network service for Openstack - ML2 plugin
+ ii  neutron-plugin-openvswitch-agent 1:2014.1.3-0ubuntu1.1               all          Neutron is a virtual network service for Openstack - Open vSwitch plugin agent
+ ii  python-neutron                   1:2014.1.3-0ubuntu1.1               all          Neutron is a virutal network service for Openstack - Python 
  
  Erros:
  root at juju-xh-machine-5:~# ovs-vsctl show
  2014-12-25T09:26:56Z|00001|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (Protocol error)
  ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (Protocol error)
  
  root at juju-precise-machine-5:~# tail -f /var/log/neutron/openvswitch-agent.log
  2014-12-25 09:37:03.990 20991 ERROR neutron.agent.linux.ovsdb_monitor [-] Error received from ovsdb monitor: ovsdb-client: unix:/var/run/openvswitch/db.sock: receive failed (End of file)
  2014-12-25 09:44:53.796 20991 ERROR neutron.agent.linux.ovsdb_monitor [-] Error received from ovsdb monitor: 2014-12-25T09:44:53Z|00001|fatal_signal|WARN|terminating with signal 15 (Terminated)
  
  Workaround:
  restart openvswitch-switch
  
  But ovs-vsctl will get this error every several minutes, this caused
  neutron-plugin-openvswitch-agent keep reporting errors since ovs-vsctl
  is wrong.
+ 
+ The root cause is :
+   Neutron agent will call ovs monitor to get interfaces info, but ovs monitor process will be respawned every 'respawn_interval' minutes due to get error output 'sudo: unable to resolve host juju-precise-machine-5' when running command 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf ovsdb-client monitor Interface name,ofport --format=json', after several times the ovs db socket is reconnected for multiple times, however, some of them are not released well, and it goes to the maxim limit of socket number, which leads to connect to ovsdb server failed.
+ 
+ Currently, one possible fix in code is to add hostname to /etc/hosts
+ followed by 127.0.0.1 or localhost to avoid the error 'sudo: unable to
+ resolve host juju-precise-machine-5' in openvswitch charm.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to openvswitch in Ubuntu.
https://bugs.launchpad.net/bugs/1405588

Title:
  database connection failed (Protocol error)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1405588/+subscriptions



More information about the Ubuntu-server-bugs mailing list