Error when starting dnsmask and jail

Hello
I am using version 24.10.02, and when starting dnsmask, I get the following error:

Sun Jul 6 16:18:28 2025 user.err : jail: failed to create mount target /tmp/ujail-JgnaIp/var/run/ubus/ubus.sock: No such file or directory
Sun Jul 6 16:18:28 2025 user.err : jail: mount_all() failed
Sun Jul 6 16:18:28 2025 user.err : jail: failed to build jail fs

Any idea how to fix this or what is causing the error?

P.S.
After removing the procd-ujail package dnsmasq started successfully. But this is not a solution.
Any ideas how to figure out what is wrong?

Have you installed any adblock stuff?

Fix what? OpenWrt is not supported in containers. You can edit away jail stuff from /etc/init.d/dnsmasq.

1 Like

I have not installed any ad blocking applications.
There is additional software installed such as mwan, nginx, keepalived, contractd.

I do not use containers but kvm virtualization. I saw that there is a jail configuration in /etc/init.d/dnsmasq. I downloaded the new image. And there is procd-ujail installed there. Apparently something is conflicting, but I can't figure out what or where. And I can't remember how to track it down.

I think stuff may be be getting created in /tmp/dnsmasq.x.d that’s breaking dnsmasq on startup.

I'll look into it and if I don't find it, I'll try it cleanly to see what it is.
Thanks for the idea anyway.

I need to check but iirc you can disable that in the init scripts.
I need to run multiple dnsmasq processes and got these jail errors too, but memory is fuzzy what it actually fixed it. I can check my system at Monday night...

Post the output of

cat /etc/config/dhcp

You're welcome,
I tried adding a log file, but dnsmasq doesn't even get there.

 config dnsmasq
             option domainneeded '1'
             option localise_queries '1'
             option rebind_protection '1'
             option rebind_localhost '1'
             option local '/lan/'
             option domain 'domain.com'
             option expandhosts '1'
             option cachesize '1000'
             option authoritative '1'
             option readethers '1'
             option leasefile '/tmp/dhcp.leases'
             option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
             option localservice '1'
             option ednspacket_max '1232'
             option allservers '1'
             list rebind_domain 'domain1.com'
             list rebind_domain 'domain2.com'
             option logqueries '1'
             option quietdhcp '1'
             option enable_tftp '1'
             option tftp_root '/'
             option dhcp_boot 'pxelinux.0,pxe,192.168.1.7'
             option logfacility '/tmp/dnsmasq.log'
 
 config odhcpd 'odhcpd'
         option maindhcp '0'
         option leasefile '/tmp/hosts/odhcpd'
         option leasetrigger '/usr/sbin/odhcpd-update'
         option loglevel '4'
 
 config dhcp 'lan'
         option interface 'lan'
         option start '100'
         option limit '150'
         option leasetime '24h'
         option force '1'
         list dhcp_option ' 3,192.168.1.254'
         list dhcp_option '6,192.168.1.254'
         list dhcp_option '42,192.168.1.254'

......

Hello,

I discovered by accident what was confusing dnsmasq, the tftp and pxe parameters.
After removing the parameters, dnsmasq works normally as expected.

Thanks for the support.

2 Likes

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