What's new

384.13 Static Address DHCP- Failed To Write File

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

GHammer

Very Senior Member
I added a device today and this entry appeared in the log.
Code:
Sep  3 08:43:47 dnsmasq-dhcp[25362]: failed to write /var/lib/misc/dnsmasq.leases: No space left on device (retry in 12s)

NVRAM usage 65718 / 131072 bytes
JFFS 2.46 / 48.00 MB

This is the 19th device assigned a static IP.
 

skeal

Part of the Furniture
I added a device today and this entry appeared in the log.
Code:
Sep  3 08:43:47 dnsmasq-dhcp[25362]: failed to write /var/lib/misc/dnsmasq.leases: No space left on device (retry in 12s)

NVRAM usage 65718 / 131072 bytes
JFFS 2.46 / 48.00 MB

This is the 19th device assigned a static IP.
On the 86U there are a finite amount of characters allowed for addressing and host naming. If you run out of characters this sort of thing can happen. I forget how to check this stat maybe someone else can chime in here.
 

ColinTaylor

Part of the Furniture
If you search the forums you will see this is an error message that has been reported for years. Unfortunately the message only indicates that there is a lack of available memory and not the cause.

I did some experiments in this thread. The only conclusion I could come to is to set up a swap file if you haven't already.
 

GHammer

Very Senior Member
Hmmm, I know that some work has been done on DHCP.

Note for developers, the dhcp_staticlist format was changed to revert back to the same format as stock firmware (for AiMesh compatibility). The hostname field was moved to a separate variable, dhcp_hostnames. Note that this variable will be stored in a jffs file on the RT-AC86U and RT-AX88U due to limitations on variable length for their HND platform. That means that a backed up config file will not restore these hostnames when restored (but using a JFFS backup will).

I run nothing on the router. I see that others have as high as 43 DHCP devices, though unclear if they are static.

I see that @Xentrk was doing something with DHCP on the HND platform.
I knew that there is a finite length for the names of DHCP devices. Could be that I'll have to resort to some other method of entering them.
 

Xentrk

Part of the Furniture
Hmmm, I know that some work has been done on DHCP.



I run nothing on the router. I see that others have as high as 43 DHCP devices, though unclear if they are static.

I see that @Xentrk was doing something with DHCP on the HND platform.
I knew that there is a finite length for the names of DHCP devices. Could be that I'll have to resort to some other method of entering them.
I already have the code written as part of the x3mRouting project. I need to update my dhcpstaticlist.sh utility script for the change though. Give me a few days as I’m traveling.
 

RMerlin

Asuswrt-Merlin dev
Be warned that the dhcp_staticlist format will change again in the near future, as Asus added a new field to it (and that change started to appear in recent public releases).

That was one of the reasons that made me revert back to the stock firmware layout for that parameter, to avoid a conflict between our two formats.

Anyway, the OP problem was caused by lack of RAM, it has nothing to do with nvram or the dhcp_staticlist layout.
 

GHammer

Very Senior Member
Anyway, the OP problem was caused by lack of RAM, it has nothing to do with nvram or the dhcp_staticlist layout.

Lack of RAM, from? As I said, I don't run any scripts, VPN, etc. Just two port forwards and the static DHCP list, now at 19 entries.

The odd thing is, I just rebooted the router and the static DHCP entry is present.
So, that error, while it seems to indicate a failure, isn't.
 

dave14305

Part of the Furniture
So, that error, while it seems to indicate a failure, isn't.
It does say it will retry in 12 seconds. So it must have succeeded eventually.
Code:
Sep 3 08:43:47 dnsmasq-dhcp[25362]: failed to write /var/lib/misc/dnsmasq.leases: No space left on device (retry in 12s)
 

ColinTaylor

Part of the Furniture
The odd thing is, I just rebooted the router and the static DHCP entry is present.
So, that error, while it seems to indicate a failure, isn't.
You are talking about two different things, the dnsmasq lease file (/var/lib/misc/dnsmasq.leases) and the dhcp_staticlist variable stored in nvram.
 

GHammer

Very Senior Member
You are talking about two different things, the dnsmasq lease file (/var/lib/misc/dnsmasq.leases) and the dhcp_staticlist variable stored in nvram.

That is when I saw the error, after creating a new static DHCP entry. It wasn't a random error.
 

Xentrk

Part of the Furniture
Close to being done with the update to the dhcpstaticlist.sh script for the changes made in the 384.13 release

Code:
Use this utility to save or restore dhcp_staticlist and dhcp_hostnames nvram values

[1] - Save nvram dhcp_staticlist and dhcp_hostnames to /opt/tmp/
[2] - Restore nvram dhcp_staticlist and dhcp_hostnames from /opt/tmp/
[3] - Preview DHCP Static List in dnsmasq format
[4] - Append DHCP Static List to dnsmasq.conf.add & Disable DHCP Manual Assignment
[5] - Disable DHCP Manual Assignment
[6] - Enable DHCP Manual Assignment
[7] - Backup nvram dhcp_staticlist and dhcp_hostnames to /opt/tmp/ and clear nvram values
[8] - Display character size of dhcp_staticlist (2999 is the limit)
[e] - Exit

==>
 

EventPhotoMan

Very Senior Member

Xentrk

Part of the Furniture
I’d like to see a you tube video of this install. Just so I can follow.

One part I don’t understand thou, why the limitation is making a status up for MAC address?

I would think the script could use a database approach, such that, if Mac matches, aassign this IP address, but hold the data base outside the routers’ memory.

Not possible?
To install, highlight the text in the dhcpstaticlist.sh Installation code snippet and press ctrl-C to copy to the clip board. In an ssh session, right click on the mouse and select paste. Press enter.

The script was only intended as a simple method to backup nvram values for dhcp leases to prevent having to reenter after a factory reset. It writes the values to a file. A forum member had reached the nvram limit so I added the other functions to write the the leases in dnsmasq.conf and clear the nvram values. Definitely a fringe use case. For most people, they will use only use the backup function.
 

EventPhotoMan

Very Senior Member
To install, highlight the text in the dhcpstaticlist.sh Installation code snippet and press ctrl-C to copy to the clip board. In an ssh session, right click on the mouse and select paste. Press enter.

The script was only intended as a simple method to backup nvram values for dhcp leases to prevent having to reenter after a factory reset. It writes the values to a file. A forum member had reached the nvram limit so I added the other functions to write the the leases in dnsmasq.conf and clear the nvram values. Definitely a fringe use case. For most people, they will use only use the backup function.
I’ve definitely reached the limit. I’m looking for ways around it.

Even ssh is not that familiar to me.
 

EventPhotoMan

Very Senior Member
Lack of RAM, from? As I said, I don't run any scripts, VPN, etc. Just two port forwards and the static DHCP list, now at 19 entries.
Now a days it now hard to go over 100, with all the smart devices. I’m way over 150 now, so the dhcp lease is kept short.

Thou, I like to keep devices together for clarity
 

Xentrk

Part of the Furniture
I’ve definitely reached the limit. I’m looking for ways around it.

Even ssh is not that familiar to me.
SSH is a command line interface to linux. Similar to command prompt in Windows.

There are many ssh clients. Many use putty or WinSCP. I use MobaXterm. Type "best ssh clients" in search engine to get reviews.
 
Last edited:

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top