尝试安装mininet时出现以下错误(下面的输出)。
整个问题开始于我根据http://docs.openvswitch.org/en/latest/intro/install/general/的教程尝试安装openvswitch之后,希望能使用户空间开关正常工作。
我尝试使用安装过程
> ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
,并使用通过--remote
和--unixctl
选项提供的不同路径启动ovsdb服务器。
理想的结果是,如果我可以简单地使用--switch ovsk和--switch user再次运行mininet。我意识到由于以下原因导致mininet安装失败
> /var/run/openvswitch/ovsdb-server.4301.ctl" (No such file or directory)
找不到。出于某种原因而创建了类似文件,但其名称的pid错误:
> me@my-machine:~$ ls /var/run/openvswitch/
> ovsdb-server.2493.ctl ovs-vswitchd.26682.ctl ovs-vswitchd.9499.ctl ovs-vswitchd.pid
> me@my-machine:~$ ls /usr/local/var/run/openvswitch/
> ovsdb-server.pid ovs-vswitchd.pid sock.db
尝试安装mininet时的输出:
> me@my-machine:~$ sudo apt-get install mininet
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> mininet is already the newest version (2.2.2-1).
> 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
> 2 not fully installed or removed.
> After this operation, 0 B of additional disk space will be used.
> Do you want to continue? [Y/n] y
> Setting up openvswitch-switch (2.8.1-0ubuntu0.17.10.2) ...
> update-alternatives: warning: forcing reinstallation of alternative /usr/lib/openvswitch-switch/ovs-vswitchd because link group ovs-vswitchd is broken
> update-alternatives: warning: not replacing /usr/sbin/ovs-vswitchd with a link
> A dependency job for openvswitch-switch.service failed. See 'journalctl -xe' for details.
> invoke-rc.d: initscript openvswitch-switch, action "start" failed.
> ● openvswitch-switch.service - Open vSwitch
> Loaded: loaded (/lib/systemd/system/openvswitch-switch.service; enabled; vendor preset: enabled)
> Active: inactive (dead)
>
> Dez 18 22:46:20 my-machine systemd[1]: Dependency failed for Open vSwitch.
> Dez 18 22:46:20 my-machine systemd[1]: openvswitch-switch.service: Job openvswitch-switch.service/start failed with result 'dependency'.
> Dez 18 23:02:47 my-machine systemd[1]: Dependency failed for Open vSwitch.
> Dez 18 23:02:47 my-machine systemd[1]: openvswitch-switch.service: Job openvswitch-switch.service/start failed with result 'dependency'.
> Dez 18 23:04:18 my-machine systemd[1]: Dependency failed for Open vSwitch.
> Dez 18 23:04:18 my-machine systemd[1]: openvswitch-switch.service: Job openvswitch-switch.service/start failed with result 'dependency'.
> Dez 18 23:05:53 my-machine systemd[1]: Dependency failed for Open vSwitch.
> Dez 18 23:05:53 my-machine systemd[1]: openvswitch-switch.service: Job openvswitch-switch.service/start failed with result 'dependency'.
> Dez 18 23:29:47 my-machine systemd[1]: Dependency failed for Open vSwitch.
> Dez 18 23:29:47 my-machine systemd[1]: openvswitch-switch.service: Job openvswitch-switch.service/start failed with result 'dependency'.
> dpkg: error processing package openvswitch-switch (--configure):
> subprocess installed post-installation script returned error exit status 1
> dpkg: dependency problems prevent configuration of mininet:
> mininet depends on openvswitch-switch; however:
> Package openvswitch-switch is not configured yet.
>
> dpkg: error processing package mininet (--configure):
> dependency problems - leaving unconfigured
> No apport report written because the error message indicates its a followup error from a previous failure.
> Errors were encountered while processing:
> openvswitch-switch
> mininet
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> me@my-machine:~$ journalctl -xe
> -- Support: http://www.ubuntu.com/support
> --
> -- Unit openvswitch-nonetwork.service has begun starting up.
> Dez 18 23:29:47 my-machine ovs-ctl[4280]: * Starting ovsdb-server
> Dez 18 23:29:47 my-machine ovs-vsctl[4302]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --no-wait -- init -- set Open_vSwitch . db-version=7.16.1
> Dez 18 23:29:47 my-machine ovs-vsctl[4307]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --no-wait set Open_vSwitch . ovs-version=2.10.90 "external-ids:system-id=\"32a08550-98be-4a6f-8008-ca3
> Dez 18 23:29:47 my-machine ovs-ctl[4280]: * Configuring Open vSwitch system IDs
> Dez 18 23:29:47 my-machine ovs-ctl[4280]: * ovs-vswitchd is already running
> Dez 18 23:29:47 my-machine ovs-ctl[4280]: 2018-12-18T15:29:47Z|00001|unixctl|WARN|failed to connect to /var/run/openvswitch/ovsdb-server.4301.ctl
> Dez 18 23:29:47 my-machine ovs-ctl[4280]: ovs-appctl: cannot connect to "/var/run/openvswitch/ovsdb-server.4301.ctl" (No such file or directory)
> Dez 18 23:29:47 my-machine systemd[1]: openvswitch-nonetwork.service: Main process exited, code=exited, status=1/FAILURE
> Dez 18 23:29:47 my-machine ovs-appctl[4323]: ovs|00001|unixctl|WARN|failed to connect to /var/run/openvswitch/ovsdb-server.4301.ctl
> Dez 18 23:29:47 my-machine ovs-ctl[4280]: * Enabling remote OVSDB managers
> Dez 18 23:29:47 my-machine ovs-vsctl[4322]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --no-wait set Open_vSwitch . external-ids:hostname=my-machine
> Dez 18 23:29:47 my-machine ovs-ctl[4280]: 2018-12-18T15:29:47Z|00002|fatal_signal|WARN|terminating with signal 15 (Terminated)
> Dez 18 23:29:47 my-machine systemd[1]: Failed to start Open vSwitch Internal Unit.
> -- Subject: Unit openvswitch-nonetwork.service has failed
> -- Defined-By: systemd
> -- Support: http://www.ubuntu.com/support
> --
> -- Unit openvswitch-nonetwork.service has failed.
> --
> -- The result is failed.
> Dez 18 23:29:47 my-machine ovs-vsctl[4322]: ovs|00002|fatal_signal|WARN|terminating with signal 15 (Terminated)
> Dez 18 23:29:47 my-machine systemd[1]: Dependency failed for Open vSwitch.
> -- Subject: Unit openvswitch-switch.service has failed
> -- Defined-By: systemd
> -- Support: http://www.ubuntu.com/support
> --
> -- Unit openvswitch-switch.service has failed.
> --
> -- The result is dependency.
> Dez 18 23:29:47 my-machine systemd[1]: openvswitch-switch.service: Job openvswitch-switch.service/start failed with result 'dependency'.
> Dez 18 23:29:47 my-machine systemd[1]: openvswitch-nonetwork.service: Unit entered failed state.
> Dez 18 23:29:47 my-machine systemd[1]: openvswitch-nonetwork.service: Failed with result 'exit-code'.
> Dez 18 23:29:49 my-machine sudo[4225]: pam_unix(sudo:session): session closed for user root
> Dez 18 23:29:50 my-machine ovs-vswitchd[9499]: ovs|02281|reconnect|INFO|unix:/var/run/openvswitch/db.sock: connecting...
> Dez 18 23:29:50 my-machine ovs-vswitchd[9499]: ovs|02282|reconnect|INFO|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
> Dez 18 23:29:50 my-machine ovs-vswitchd[9499]: ovs|02283|reconnect|INFO|unix:/var/run/openvswitch/db.sock: waiting 8 seconds before reconnect
> Dez 18 23:29:58 my-machine ovs-vswitchd[9499]: ovs|02284|reconnect|INFO|unix:/var/run/openvswitch/db.sock: connecting...
> Dez 18 23:29:58 my-machine ovs-vswitchd[9499]: ovs|02285|reconnect|INFO|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
> Dez 18 23:29:58 my-machine ovs-vswitchd[9499]: ovs|02286|reconnect|INFO|unix:/var/run/openvswitch/db.sock: waiting 8 seconds before reconnect
> Dez 18 23:30:06 my-machine ovs-vswitchd[9499]: ovs|02287|reconnect|INFO|unix:/var/run/openvswitch/db.sock: connecting...
> Dez 18 23:30:06 my-machine ovs-vswitchd[9499]: ovs|02288|reconnect|INFO|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
> Dez 18 23:30:06 my-machine ovs-vswitchd[9499]: ovs|02289|reconnect|INFO|unix:/var/run/openvswitch/db.sock: waiting 8 seconds before reconnect
> Dez 18 23:30:14 my-machine ovs-vswitchd[9499]: ovs|02290|reconnect|INFO|unix:/var/run/openvswitch/db.sock: connecting...
> Dez 18 23:30:14 my-machine ovs-vswitchd[9499]: ovs|02291|reconnect|INFO|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
> Dez 18 23:30:14 my-machine ovs-vswitchd[9499]: ovs|02292|reconnect|INFO|unix:/var/run/openvswitch/db.sock: waiting 8 seconds before reconnect
> Dez 18 23:30:22 my-machine ovs-vswitchd[9499]: ovs|02293|reconnect|INFO|unix:/var/run/openvswitch/db.sock: connecting...
> Dez 18 23:30:22 my-machine ovs-vswitchd[9499]: ovs|02294|reconnect|INFO|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
> Dez 18 23:30:22 my-machine ovs-vswitchd[9499]: ovs|02295|reconnect|INFO|unix:/var/run/openvswitch/db.sock: waiting 8 seconds before reconnect
答案 0 :(得分:0)
在使用命令sudo apt install mininet
安装Mininet时遇到了一些问题。我找到了安装Mininet的更好方法。
使用以下命令:
apt install git
git clone https://github.com/mininet/mininet
cd mininet/utils
./install.sh -a
如果使用参数-a
,Mininet将与POX,Cbench和Wireshark等其他有用的应用程序一起安装