Unable to add node through API

Before posting something, READ the changelog, WATCH the videos, howto and provide following:
Your install is: Bare metal, ESXi, what CPU model, RAM, HD, what EVE version you have, output of the uname -a and any other info that might help us faster.

Moderator: mike

Post Reply
Posts: 1
Joined: Fri Nov 08, 2019 3:35 pm

Unable to add node through API

Post by lberkheiser » Fri Nov 08, 2019 3:58 pm


I am running EVE-NG Community Edition, with the latest version 2.0.3-95. I am running it on ESXi 6.0.0 Update 3. I used the OVA template to deploy EVE-NG.

I have been playing around with EVE-NG and created a decent lab, but I want to take things a step further and automate the deployment of the lab which recreates my production network. To that end, I started looking at the API, using a small Python script to test various tasks (using the requests library).

Creating a new lab works fine, but when I try to add a node to it, I get an error. I am trying to add a qemu node for a Cisco CSR 1000V. I can even list the template details through an API call and that works fine.

When I only specify some mandatory parameters in my request (type, template, image), I get the error: Failed to lock the lab (60061)
According to the FAQ, that error is fixed by using command "find /opt/unetlab/labs/ -name '*.lock' -exec rm {} \;". I did that, the file gets deleted, but when I run the script again, the error occurs again and the *.lock file is back.

I then tried specifying all parameters in my API call, even optional ones. Now I get the error: Max nodes reached ( 128 )
According to various posts, this is usually due to having too many nodes or having a full disk.
This is a brand new lab, with 0 nodes inside.
I tried checking if my HDD was full with "df -h", I have plenty of room:
root@eve-ng-2:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 799M 14M 785M 2% /run
/dev/mapper/eve--ng--vg-root 31G 3.2G 27G 11% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 472M 83M 365M 19% /boot

I was wondering if that max nodes limit was not only per lab, but as a whole, as I have two other (non-running) labs. To exclude that, I deployed a new EVE-NG machine from scratch. I have no labs in it, and I attempted to create a new lab and add one node to it. I am still getting the same error.

I don't know what else to try. I have 0 nodes in my whole EVE-NG instance and I still get this error when trying to create a node through the API.

Does anyone know what I can do to fix this error?


Post Reply