ovs-vsctl: unix:/usr/local/var/run/openvswitch/db.sock: database connection failed (no such file or

每次重启完系统后,ovs-vsctl命令都无法执行,报ovs-vsctl: unix:/usr/local/var/run/openvswitch/db.sock: database connection failed (no such file or directory). 错误。

问题原因为:

ovs-vsctl执行时需要连接到ovsdb,但是默认情况下他是关闭的。所以需要手工启动

解决方法一:

#!/bin/bash 
ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \
                     --remote=db:Open_vSwitch,Open_vSwitch,manager_options \
                     --private-key=db:Open_vSwitch,SSL,private_key \
                     --certificate=db:Open_vSwitch,certificate \
                     --bootstrap-ca-cert=db:Open_vSwitch,ca_cert \
                     --pidfile --detach
ovs-vsctl --no-wait init
ovs-vswitchd --pidfile --detach

解决方法二:

sudo /usr/share/openvswitch/scripts/ovs-ctl start

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...