Unable to start mininet

I want to install mininet for my labs. I have been using garuda for a while and possibly don’t want to switch to ubuntu for just one application. Whenever I start mininet I get the following error.

sudo mn
[sudo] password for chhatra:
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2
*** Adding switches:
ovs-vsctl: unix:/run/openvswitch/db.sock: database connection failed (No such file or directory)
ovs-vsctl exited with code 1
*** Error connecting to ovs-db with ovs-vsctl
Make sure that Open vSwitch is installed, that ovsdb-server is running, and that
"ovs-vsctl show" works correctly.
You may wish to try "service openvswitch-switch start".

I tried the suggestions showing in the eror .

sudo ovs-vsctl show

[sudo] password for chhatra:
ovs-vsctl: unix:/run/openvswitch/db.sock: database connection failed (No such file or directory)

systemctl start openvswitch-switch

OUTPUT

Failed to start openvswitch-switch.service: Unit openvswitch-switch.service not found.

Is there a way to fix this error or run mininet on garuda

garuda-inxi

System:
Kernel: 6.6.8-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
clocksource: tsc available: acpi_pm
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=dbe445f2-c588-4b84-9636-d61caba2af46 rw rootflags=subvol=@
quiet quiet rd.udev.log_priority=3 vt.global_cursor_default=0
resume=UUID=1f76b6a7-3e79-40ec-8b7c-0be9583e09e7 loglevel=3 ibt=off
Desktop: KDE Plasma v: 5.27.10 tk: Qt v: 5.15.11 wm: kwin_x11 vt: 2
dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Laptop System: HP product: HP Laptop 15-dy1xxx v: N/A
serial: <superuser required> Chassis: type: 10 serial: <superuser required>
Mobo: HP model: 86C9 v: 56.33 serial: <superuser required> UEFI: AMI
v: F.25 date: 03/09/2022
Battery:
ID-1: BAT0 charge: 31.9 Wh (100.9%) condition: 31.6/31.6 Wh (100.0%)
volts: 13.0 min: 11.6 model: HP Primary type: Li-ion serial: N/A
status: full
CPU:
Info: model: Intel Core i7-1065G7 bits: 64 type: MT MCP arch: Ice Lake
gen: core 10 level: v4 note: check built: 2019-21 process: Intel 10nm
family: 6 model-id: 0x7E (126) stepping: 5 microcode: 0xC2
Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
L1: 320 KiB desc: d-4x48 KiB; i-4x32 KiB L2: 2 MiB desc: 4x512 KiB L3: 8 MiB
desc: 1x8 MiB
Speed (MHz): avg: 977 high: 1295 min/max: 400/3900 scaling:
driver: intel_pstate governor: powersave cores: 1: 996 2: 625 3: 1140
4: 1201 5: 400 6: 1171 7: 1295 8: 993 bogomips: 23961
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities: <filter>
Graphics:
Device-1: Intel Iris Plus Graphics G7 vendor: Hewlett-Packard driver: i915
v: kernel arch: Gen-11 process: Intel 10nm built: 2019-21 ports:
active: eDP-1 empty: HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:8a52
class-ID: 0300
Device-2: Quanta HP TrueVision HD Camera driver: uvcvideo type: USB
rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-3:2 chip-ID: 0408:5365
class-ID: 0e02
Display: x11 server: X.Org v: 21.1.10 with: Xwayland v: 23.2.3
compositor: kwin_x11 driver: X: loaded: modesetting
alternate: fbdev,intel,vesa dri: iris gpu: i915 display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
s-diag: 582mm (22.93")
Monitor-1: eDP-1 model: AU Optronics 0x61ed built: 2018 res: 1920x1080
hz: 60 dpi: 142 gamma: 1.2 size: 344x194mm (13.54x7.64") diag: 395mm (15.5")
ratio: 16:9 modes: 1920x1080
API: EGL v: 1.5 hw: drv: intel iris platforms: device: 0 drv: iris
device: 1 drv: swrast surfaceless: drv: iris x11: drv: iris
inactive: gbm,wayland
API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 23.3.1-arch1.1
glx-v: 1.4 direct-render: yes renderer: Mesa Intel Iris Plus Graphics (ICL
GT2) device-ID: 8086:8a52 memory: 7.28 GiB unified: yes
API: Vulkan v: 1.3.274 layers: 3 device: 0 type: integrated-gpu name: Intel
Iris Plus Graphics (ICL GT2) driver: mesa intel v: 23.3.1-arch1.1
device-ID: 8086:8a52 surfaces: xcb,xlib device: 1 type: cpu name: llvmpipe
(LLVM 16.0.6 256 bits) driver: mesa llvmpipe v: 23.3.1-arch1.1 (LLVM
16.0.6) device-ID: 10005:0000 surfaces: xcb,xlib
Audio:
Device-1: Intel Ice Lake-LP Smart Sound Audio vendor: Hewlett-Packard
driver: snd_hda_intel v: kernel alternate: snd_sof_pci_intel_icl
bus-ID: 00:1f.3 chip-ID: 8086:34c8 class-ID: 0403
API: ALSA v: k6.6.8-zen1-1-zen status: kernel-api tools: N/A
Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter
vendor: Hewlett-Packard driver: rtw_8821ce v: N/A modules: rtw88_8821ce
pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 01:00.0
chip-ID: 10ec:c821 class-ID: 0280
IF: wlo1 state: up mac: <filter>
IF-ID-1: docker0 state: down mac: <filter>
RAID:
Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
v: 3.0 port: 4060 bus-ID: 00:17.0 chip-ID: 8086:282a rev: N/A class-ID: 0104
Drives:
Local Storage: total: 238.47 GiB used: 188.26 GiB (78.9%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Micron
model: MTFDHBA256TCK-1AS1AABHA size: 238.47 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
fw-rev: HPS0V23 temp: 24.9 C scheme: GPT
Partition:
ID-1: / raw-size: 229.37 GiB size: 229.37 GiB (100.00%)
used: 188.26 GiB (82.1%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 584 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 229.37 GiB size: 229.37 GiB (100.00%)
used: 188.26 GiB (82.1%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-4: /var/log raw-size: 229.37 GiB size: 229.37 GiB (100.00%)
used: 188.26 GiB (82.1%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-5: /var/tmp raw-size: 229.37 GiB size: 229.37 GiB (100.00%)
used: 188.26 GiB (82.1%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
ID-1: swap-1 type: zram size: 7.45 GiB used: 1.65 GiB (22.2%)
priority: 100 comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 8
dev: /dev/zram0
ID-2: swap-2 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2
dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
System Temperatures: cpu: 48.0 C mobo: N/A
Fan Speeds (rpm): N/A
Info:
Processes: 382 Uptime: 2h 55m wakeups: 1 Memory: total: 8 GiB note: est.
available: 7.45 GiB used: 3.88 GiB (52.0%) Init: systemd v: 255
default: graphical tool: systemctl Compilers: gcc: 13.2.1 Packages: 1472
pm: pacman pkgs: 1416 libs: 406 tools: octopi,paru,yay pm: flatpak pkgs: 56
Shell: fish v: 3.6.4 default: Bash v: 5.2.21 running-in: konsole
inxi: 3.3.31
Garuda (2.6.21-1):
System install date:     2023-04-24
Last full system update: 2024-01-01
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut
Windows dual boot:       Probably (Run as root to verify)
Failed units:            httpd.service mongodb.service squid.service

paru mininet

aur/mininet-git-python2 2.3.0d6.r22.gbfc42f6-1 [+0 ~0.00] [Orphaned]
Emulator for rapid prototyping of Software Defined Networks (Python 2 version)
5 aur/mininet-git 2.3.1b4.r13.g6eb8973-1 [+0 ~0.00]
Emulator for rapid prototyping of Software Defined Networks
4 aur/mini-ndn-git v0.5.0.r2.gea2d5d6-1 [+0 ~0.00]
Lightweight networking emulation tool that enables testing, experimentation, and research on the NDN
platform based on Mininet
3 aur/mini-ndn 0.5.0-1 [+0 ~0.00] [Out-of-date: 2022-02-09] [Orphaned]
Lightweight networking emulation tool that enables testing, experimentation, and research on the NDN
platform based on Mininet
2 aur/containernet-git 3.1.r416.g31eeb75-1 [+0 ~0.00]
Mininet fork adding support for container-based emulated hosts
1 aur/mininet 2.3.0-2 [+15 ~0.00] [Installed]
Emulator for rapid prototyping of Software Defined Networks
:: Packages to install (eg: 1 2 3, 1-3):
::
there is nothing to do

paru openvswitch

3 aur/openvswitch-git 1:2.10.1.r64.gd612a4961-1 [+1 ~0.00]
Production Quality, Multilayer Open Virtual Switch
2 aur/openvswitch-dpdk 3.2.0-1 [+1 ~0.00]
Production Quality, Multilayer Open Virtual Switch, with DPDK feature
1 extra/openvswitch 3.2.0-1 [0 B 17.49 MiB] [Installed]
Production Quality, Multilayer Open Virtual Switch
:: Packages to install (eg: 1 2 3, 1-3):
::
there is nothing to do

Did you do this?

2 Likes

Please always provide your garuda-inxi, as required by the template.
Also specify how you installed the package (e.g. from AUR) and which package (mininet or mininet-git).
If installed from source, maybe you could reinstall it from AUR, with:

paru <package name>
2 Likes

how did you install mininet?

Also, how did you install openvswitch?

The Arch version of openvswitch contains two services, ovs-vswitchd.service and ovsdb-server.service

2 Likes

Do you know the correct order of installing it ? if please do tell I will reinstall it

I installed openvswitch using pacman

service openvswitch-switch start
find-the-command: "service" is not found locally, searching in repositories...
find-the-command: "service" may be found in package "chaotic-aur/pm-utils"
warning: pm-utils-1.4.1-8.2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) pm-utils-1.4.1-8.2

Total Installed Size:  0.17 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring                                    [------------------------------------] 100%
(1/1) checking package integrity                                  [------------------------------------] 100%
(1/1) loading package files                                       [------------------------------------] 100%
(1/1) checking for file conflicts                                 [------------------------------------] 100%
(1/1) checking available disk space                               [------------------------------------] 100%
:: Running pre-transaction hooks...
(1/1) Performing snapper pre snapshots for the following configurations...
==> root: 247
:: Processing package changes...
(1/1) reinstalling pm-utils                                       [------------------------------------] 100%
:: Running post-transaction hooks...
(1/6) Arming ConditionNeedsUpdate...
(2/6) Foreign/AUR package notification
mininet 2.3.0-2
mongodb-compass 1.40.4-1
mongodb42-bin 4.2.24-1
packettracer 8.2.1-1
snapd 2.59.5-1
umlet 15.1-1
(3/6) Orphaned package notification...
python-psycopg2 2.9.9-1
(4/6) Checking for .pacnew and .pacsave files...
.pac* files found:
/etc/shells.pacnew
/etc/pacman.conf.pacnew
/etc/pacman.d/mirrorlist.pacnew
/etc/plymouth/plymouthd.conf.pacnew
Please check and merge
(5/6) Performing snapper post snapshots for the following configurations...
==> root: 248
(6/6) Syncing all file systems...

and the proces repeats I try again and it says service not found locally now matter how many time i try. Does the service command even exits in arch??

The service command is for systems using sysv as init rather than systemd. You were using the correct command.

1 Like

I am asking how you installed it? Did you use the AUR package, did you install it manually somehow?

Either way, I listed the two services used by the Arch version of openvswitch above, I suspect you need to use

systemctl start ovsdb-server.service
3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.