kimchi
kimchi copied to clipboard
Unable to create bridge virbr0: File already exists
On CentOS 7, latest kimchi trunk:
src/kimchid
Loaded plugins: fastestmirror libvirt: error : Unable to create bridge virbr0: Failas jau egzistuoja (it translates as "File already exists", I was unable to get English message with both LANG=C and LC_ALL=C).
Hi Nerijus,
could you please describe more the scenario. Did you run a bare metal or a VM? Before running, default network was already created?
I updated to svn trunk and do not get this error on CentOS 7 anymore, but do get it on Fedora 21. It's bare metal, a few VM's created with virt-manager. I run kimchi on the host. ifconfig shows virbr0 interface up, it is probably created by virt-manager/libvirt.
After the host reboot I got this error on CentOS 7 again too.
Hi, Nerijus I met the same problem, the error occurred while start the 'nat' type network. I found it can be solved in this way:
- start firewall service (systemctl start firewalld)
- let the port through (firewall-cmd --zone=public --add-port=8000(8001)/tcp --permanent)
I cannot start firewalld, because I use another firewall (shorewall). I have 8001 tcp port opened from outside. I added 8000 too, but it did not help.
Is it possible for kimchid to not try to start networks? Because I use libvirt, and everything (including VMs) is started by libvirtd when the host boots.
Could you please post your networks xml.
Also put the output of brctl show
/etc/libvirt/qemu/networks/default.xml:
<network>
<name>default</name>
<uuid>ee499638-e505-4fcc-8722-26b78ac69fb1</uuid>
<bridge name="virbr0"/>
<mac address='52:54:00:DB:F7:A0'/>
<forward/>
<ip address="192.168.122.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.122.2" end="192.168.122.254"/>
</dhcp>
</ip>
</network>
brctl show
bridge name bridge id STP enabled interfaces
br0 8000.549f350629ca no em2
vnet0
vnet1
vnet2
virbr0 8000.525400dbf7a0 yes virbr0-nic
Hi, i reproduce this error on Fedora 19. I run two tests:
Fedora 19 x86 No default network No virbr0 bridge
Results: default network created: worked fine
Fedora 19 x86 No default network virbr0 bridge created (brctl addbr virbr0)
Results: Fail:
libvirt: Network Driver error : Network not found: no network with matching name 'default' libvirt: error : Unable to create bridge virbr0: File exists
Seems to be a libvirt issue(since kimchi does not specify virbr0 when creates the bridge). I will take a look.
Hi @nerijus,
i proposed a solution at the mailing list:
http://lists.ovirt.org/pipermail/kimchi-devel/2015-February/009777.html
Tested here in my laptop. Everytime a virbr0 exists, the fix makes kimchi to create default network using virbr1 or a next number available
Why to create additional virbr at all?
I applied the patch in http://lists.ovirt.org/pipermail/kimchi-devel/2015-February/009779.html to 1.4.1, but still the same error: Unable to create bridge virbr0: File already exists
I am using the following patch for now:
--- a/src/kimchi/model/networks.py
+++ b/src/kimchi/model/networks.py
@@ -79,7 +79,7 @@
else:
kimchi_log.error("Fatal: Cannot activate default network "
"because of %s, exit kimchid", e.message)
- sys.exit(1)
+ #sys.exit(1)
def create(self, params):
conn = self.conn.get()
Hi Nerijus, we are trying to fix the problem on libvirt. I will notify you if we have news
Can anyone explain me, what this problem is about at all? Why kimchi cannot use the existing virbr0 and insists on creating a new interface?
Hi, I see the same issue with wok branch.. Steps followed - Environment: x86 Operating system: Fedora Browser: Google Chrome Steps performed:
- Installed WOK without any plugins (https://github.com/kimchi-project/kimchi/tree/wok)
- Started wokd daemon
- Installed kimchi-wok plugin
- Restarted wokd daemon. It fails with the below error
systemctl status wokd
● wokd.service - Wok - Webserver Originated from Kimchi Loaded: loaded (/usr/lib/systemd/system/wokd.service; disabled) Active: failed (Result: exit-code) since Wed 2015-07-22 12:31:36 IST; 1min 41s ago Process: 13062 ExecStop=/bin/kill -TERM $MAINPID (code=exited, status=1/FAILURE) Process: 13051 ExecStart=/usr/bin/wokd (code=exited, status=1/FAILURE) Main PID: 13051 (code=exited, status=1/FAILURE)
Jul 22 12:31:36 localhost.localdomain wokd[13051]: nginx: [emerg] bind() to 0.0.0.0:8001 failed (98: Address already in use) Jul 22 12:31:36 localhost.localdomain wokd[13051]: nginx: [emerg] bind() to 0.0.0.0:8000 failed (98: Address already in use) Jul 22 12:31:36 localhost.localdomain wokd[13051]: nginx: [emerg] still could not bind() Jul 22 12:31:36 localhost.localdomain wokd[13051]: libvirt: error : Unable to create bridge virbr0: File exists Jul 22 12:31:36 localhost.localdomain wokd[13051]: WARNING: no 'numpy' module, HyBi protocol will be slower Jul 22 12:31:36 localhost.localdomain systemd[1]: wokd.service: main process exited, code=exited, status=1/FAILURE Jul 22 12:31:36 localhost.localdomain kill[13062]: kill: not enough arguments Jul 22 12:31:36 localhost.localdomain systemd[1]: wokd.service: control process exited, code=exited status=1 Jul 22 12:31:36 localhost.localdomain systemd[1]: Unit wokd.service entered failed state. Jul 22 12:31:36 localhost.localdomain systemd[1]: wokd.service failed.
output from brctl -
brctl show
bridge name bridge id STP enabled interfaces virbr0 8000.000000000000 yes
Fatal: Unable to activate network default.
Details: error creating bridge interface virbr0: File exists
Failed to import plugin plugins.kimchi.Kimchi, error: Network default does not exist or is not active. Please, check the configuration in /etc/kimchi/template.conf to ensure it lists only valid networks.
I have the same error with 2.5.0 release. Any fix for this?