<div dir="ltr"><p>First time here, firstly to those that contributed thank you for the free software<br>I encountered an issue where dnsmasq failed to start with the error:</p><blockquote><p><code>dnsmasq[PID]: cannot open or create lease file /var/run/qemu-dnsmasq-br0.leases: Permission denied</code></p></blockquote><p>After debugging, I discovered the root cause was <strong>not</strong> a permissions issue but a <strong>missing bridge interface (<code>br0</code>)</strong> referenced in the configuration. The service was configured (likely via libvirt) to use <code>br0</code>,
which no longer existed. Which could be more of libvirts fault but I
don't remember if i removed the interface manually or via libvirt, </p><p><strong>Steps taken</strong>:</p><p><i>No issue</i><br>------------------<br>0. Created a br0 interface to be used with libvirt<br></p><p>1. Later removed br0, but the residual configuration file remained<br></p><p><i>Dnsmasq stops working</i><br>-----------------------<br></p><p>2. Error messageĀ hinted at qemu and a past br0 interface<br></p><p>3. Deleted the configuration file<br></p><p>4. Issue fixed<br><br><br></p><p>It was my fault to not take these and only these steps before all my other troubleshooting efforts. but I learned. Although from this experience I think it could be useful to differentiate between a permission issue or a nonexistent interface in the logs by checking if the interface in the file exists. <br><br>It might even make sense to not fail the whole thing since that failure wouldn't cause any other side effects, although I understand why this might be a bad idea.<br></p><p>Also adding a .bak to the end of the conf file did not make dnsmasq ignore it, made me question my sanity for a moment, deleting it fixed it.<br><br></p><p>Here is some system information:<br><br><b>libvirt.conf</b><br></p><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">strict-order<br>interface=br0<br>interface=lo<br>#no-dhcp-interface=lo<br>bind-interfaces<br>dhcp-range=192.168.122.2,192.168.122.254<br>pid-file=/var/run/qemu-dnsmasq-br0.pid<br>dhcp-leasefile=/var/run/qemu-dnsmasq-br0.leases</blockquote><p></p><p><br>Dnsmasq version 2.90 <br><br>6.12.10-arch1-1<br><br></p><p>If you see fit as well I would like to contribute code to this.<br></p><p><br>Cheers,<br><br>Mert <br></p><p><br><br></p></div>