Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#4085 - dnsmasq: cannot open or create lease file /tmp/dhcp.leases: Read-only file system #9064

Open
openwrt-bot opened this issue Oct 14, 2021 · 1 comment
Labels

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Oct 14, 2021

bittorf:

with a selfcompiled r17753 with mipsel ramips/mt7621 on 'TP-LINK Archer C6U'
It was working without these issues with r17560

Thu Oct 14 18:32:38 2021 user.err : jail: creat(/tmp/ujail-lhNbFK/tmp/dhcp.leases) failed: Read-only file system Thu Oct 14 18:32:38 2021 daemon.crit dnsmasq[1]: cannot open or create lease file /tmp/dhcp.leases: Read-only file system Thu Oct 14 18:32:38 2021 daemon.crit dnsmasq[1]: FAILED to start up Thu Oct 14 18:32:43 2021 user.err : jail: creat(/tmp/ujail-FlhCEP/tmp/dhcp.leases) failed: Read-only file system Thu Oct 14 18:32:43 2021 daemon.crit dnsmasq[1]: cannot open or create lease file /tmp/dhcp.leases: Read-only file system Thu Oct 14 18:32:43 2021 daemon.crit dnsmasq[1]: FAILED to start up Thu Oct 14 18:32:49 2021 user.err : jail: creat(/tmp/ujail-fHEJCC/tmp/dhcp.leases) failed: Read-only file system Thu Oct 14 18:32:49 2021 daemon.crit dnsmasq[1]: cannot open or create lease file /tmp/dhcp.leases: Read-only file system Thu Oct 14 18:32:49 2021 daemon.crit dnsmasq[1]: FAILED to start up Thu Oct 14 18:32:50 2021 daemon.alert kalua: /usr/sbin/cron.monitorin: curl_it() [ERR] returning 4 after fetching 'http://intercity-vpn.de/networ...' Thu Oct 14 18:32:54 2021 user.err : jail: creat(/tmp/ujail-jGfjpp/tmp/dhcp.leases) failed: Read-only file system Thu Oct 14 18:32:54 2021 daemon.crit dnsmasq[1]: cannot open or create lease file /tmp/dhcp.leases: Read-only file system Thu Oct 14 18:32:54 2021 daemon.crit dnsmasq[1]: FAILED to start up Thu Oct 14 18:32:59 2021 user.err : jail: creat(/tmp/ujail-knefoG/tmp/dhcp.leases) failed: Read-only file system Thu Oct 14 18:32:59 2021 daemon.crit dnsmasq[1]: cannot open or create lease file /tmp/dhcp.leases: Read-only file system Thu Oct 14 18:32:59 2021 daemon.crit dnsmasq[1]: FAILED to start up Thu Oct 14 18:33:02 2021 daemon.alert kalua: /usr/sbin/cron.monitorin: curl_it() [ERR] returning 4 after fetching 'http://intercity-vpn.de/networ...' Thu Oct 14 18:33:04 2021 user.err : jail: creat(/tmp/ujail-jneGLN/tmp/dhcp.leases) failed: Read-only file system Thu Oct 14 18:33:04 2021 daemon.crit dnsmasq[1]: cannot open or create lease file /tmp/dhcp.leases: Read-only file system Thu Oct 14 18:33:04 2021 daemon.crit dnsmasq[1]: FAILED to start up Thu Oct 14 18:33:04 2021 daemon.info procd: Instance dnsmasq::cfg01411c s in a crash loop 6 crashes, 0 seconds since last crash

The filesystem looks normal:

root@box:~ :) df -h Filesystem Size Used Available Use% Mounted on /dev/root 5.5M 5.5M 0 100% /rom tmpfs 59.4M 1.3M 58.1M 2% /tmp /dev/mtdblock4 7.4M 476.0K 7.0M 6% /overlay overlayfs:/overlay 7.4M 476.0K 7.0M 6% / tmpfs 512.0K 0 512.0K 0% /dev

root@liszt28-hybrid--37:~ :) echo foo >/tmp/dhcp.leases.txt

root@liszt28-hybrid--37:~ :) ls -l /tmp/dhcp.leases.txt
-rw-r--r-- 1 root root 4 Oct 14 18:37 /tmp/dhcp.leases.txt

root@liszt28-hybrid--37:~ :) ps | grep jail
3898 root 2616 S {hostapd} /sbin/ujail -n hostapd -U network -G network -C /etc/capabilities/wpad.json -c -- /usr/sbin/hostapd -s -g /var/run/hostapd/global
3899 root 2616 S {wpa_supplicant} /sbin/ujail -n wpa_supplicant -U network -G network -C /etc/capabilities/wpad.json -c -- /usr/sbin/wpa_supplicant -n -s -g /var/run/wpa_supplican
4489 root 1280 S grep jail

root@liszt28-hybrid--37:~ :) pidof dnsmasq || echo BAD
BAD

root@liszt28-hybrid--37:~ :) uci show dhcp
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].logqueries='0'
dhcp.@dnsmasq[0].domainneeded='0'
dhcp.@dnsmasq[0].boguspriv='1'
dhcp.@dnsmasq[0].filterwin2k='0'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='0'
dhcp.@dnsmasq[0].rebind_localhost='0'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].nonegcache='0'
dhcp.@dnsmasq[0].authoritative='1'
dhcp.@dnsmasq[0].readethers='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.auto'
dhcp.@dnsmasq[0].addnhosts='/var/run/hosts_olsr' '/etc/local.hosts'
dhcp.@dnsmasq[0].server='8.8.8.8'
dhcp.@dnsmasq[0].notinterface='wan' 'wlan' 'wlanRADIO1'
dhcp.@dnsmasq[0].dhcpscript='/etc/dhcp-script.d/10dhcpscript'
dhcp.@dnsmasq[0].cachesize='1000'
dhcp.@dnsmasq[0].local='/internet/'
dhcp.@dnsmasq[0].domain='internet'
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='34'
dhcp.lan.limit='13'
dhcp.lan.force='1'
dhcp.lan.ignore='0'
dhcp.lan.leasetime='48h'
dhcp.wlan=dhcp
dhcp.wlan.force='1'
dhcp.wlan.ignore='0'
dhcp.wlan.interface='mastergate'
dhcp.wlan.dhcp_option='3,100.64.0.1' '6,100.64.0.1'
dhcp.wlan.leasetime='12h'
dhcp.wlan.start='100.65.35.2'
dhcp.wlan.limit='253'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.ignore='1'
dhcp.@host[0]=host
dhcp.@host[0].ip='127.0.0.2'
dhcp.@host[0].mac='00:00:00:00:00:00'
dhcp.@host[0].name='lo-alias'
dhcp.@dhcp[3]=dhcp
dhcp.@dhcp[3].interface='loopback'
dhcp.@dhcp[3].start='2'
dhcp.@dhcp[3].limit='2'
dhcp.@dhcp[3].leasetime='1h'
dhcp.@dhcp[3].force='1'
dhcp.@dhcp[3].ignore='0'

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Oct 14, 2021

bittorf:

reverting this commit fixes it for me:

commit 44f694ba1bca1417d24e851c637c284f9f78c06d Author: Daniel Golle Date: Wed Oct 21 15:04:17 2020 +0100
build: select procd-ujail if !SMALL_FLASH

Add procd-ujail to DEFAULT_PACKAGES if not building for
space-constraint (FEATURES:=small_flash) targets.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant