ERROR /opt/stack/devstack/lib/neutron_plugins/ovn_agent:174 Socket [closed]
Asked Answered
A

4

5

This is the error I got while installing DevStack on Ubuntu 20.04 VM with 7GB of Ram. How to solve this issue?

Call Trace
./stack.sh:1264:start_ovn_services
/opt/stack/devstack/lib/neutron-legacy:477:start_ovn
/opt/stack/devstack/lib/neutron_plugins/ovn_agent:691:wait_for_sock_file
/opt/stack/devstack/lib/neutron_plugins/ovn_agent:174:die
ERROR /opt/stack/devstack/lib/neutron_plugins/ovn_agent:174 Socket /var/run/openvswitch/ovnnb_db.sock not found
exit_trap: cleaning up child processes
Error on exit

Link of the Error Image https://i.sstatic.net/lcuLJ.png

Aprilette answered 16/6, 2021 at 11:8 Comment(0)
H
6

As said above by Sage Ren, When we are going to run Command $ ./stack.sh first time and the above error is encounters.

This error is solved easily by following below steps.

  1. Go to neutron_plugin folder, by default the folder is reside in the /opt/stack/devstack/lib directory.
  2. open ovn_agent file with sudo privileges.
  3. change line 116 which looks like this OVS_RUNDIR=$OVS_PREFIX/var/run/openvswitch you just have to change ovn by replacing of openvswitch. after change your line will become OVS_RUNDIR=$OVS_PREFIX/var/run/ovn now save the file.
  4. Now go to /var/run/ovn/ directory, In this you will find ovn folder over there. Just remove the folder using $sudo rm -rf ovn command
  5. Now first run ./clean.sh and then ./unstack.sh command
  6. reboot the system
  7. run ./stack.sh

Image for : ovn directory folder remove information

Hepzi answered 1/9, 2021 at 8:27 Comment(0)
D
1

Same error for me with Ubuntu 20.04, after some deep exploration without fine results, I finally decided to patch the ovn_agent file by changing the run path (ovn instead of openvswitch folder) :

OVS_RUNDIR=$OVS_PREFIX/var/run/ovn

It is not a good solution but it can help you to go further in the install process like me. Here is my compiled research if someone have a better solution with environment variables, actually it is my first time with this DevStack tool :

  • ovn-northd doc : on recent version, they change absolute path to unix path so the default path for ovn db socket might have change somewhere
  • install doc : Some option might exists to specify custom socket paths but I didn't succeeded to make it work

Finally I came into another error with cinder create volumes types process with 500 internal error response... I'm not sure the actual version is stable and each stack command take me 15-20 minutes, maybe I'm going to create an issue to find some experimented eyes on the subject.

Drab answered 18/6, 2021 at 7:33 Comment(1)
According to this issue, there might be other problem with ovn service on the current master version : https://bugs.launchpad.net/devstack/+bug/1930764?comments=allDrab
T
0

I also had the issue with master branch. As mentioned by Yann B, the problem maybe the conflict of the path between the $OVS_RUNDIR and the $OVN_RUNDIR.

The script lib/neutron_plugins/ovn_agent trys to link $OVS_RUNDIR to $OVN_RUNDIR. But for some reason, the $OVN_RUNDIR is created early. The $OVS_RUNDIR link to the subfolder of the $OVN_RUNDIR with the same command(ln -s **$OVS_RUNDIR** **$OVN_RUNDIR**). So the files created by services of ovn at $OVN_RUNDIR cannot be found.

Stop all ovs and ovn services, link the two folders manually, remove the subfolder, start the services and retry work for me. Hope it works for you too.

Tawny answered 10/7, 2021 at 7:54 Comment(0)
C
0

Uninstall all ovn packages after ./unstak and ./clean.sh

sudo apt remove -y ovn-common ovn-controller-vtep ovn-host ovn-central

After this ./stack.sh should work fine.

Chaldea answered 18/10, 2022 at 9:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.