Error with the Lan Manager service

Hello,

I’ve been following this great project for a very long time and have always had an instance running in a corner.
I’ve started migrating my setup to Gladys but I’m encountering an issue with the Lan Manager service that I can’t resolve.

My instance runs in Docker on a Debian VM (host Proxmox)
When I start discovery the scan runs for a while then times out, in the logs I have:

lan-manager.scan.js:58 (NmapScan.onError) LANManager fails to discover devices over network - Over scan timeout 30000

However, when running the command nmap -sn 192.168.0.112/24 from the container I can see my devices discovered in about 15s

I have quite a few other stacks running on this VM so multiple network interfaces appear in the Lan Manager config; I only kept the CIDR 192.168**** enabled

I thought it might be a DNS issue but apparently not (AdGuard).

I’m stumped…
Has anyone experienced this or have any ideas on where to look?

Thanks in advance to those who take the time to respond.

Hi @s7evinLN and welcome to Gladys :slight_smile:

I only kept the CIDR 192.168**** enabled

Is this how the IPs of your local network are exposed in your VM?

When you run nmap, is it from inside the Gladys container?

Is your Gladys set to network=host?

For info, in Gladys we use the lib GitHub - FalHuor/node-sudo-nmap: NPM package for interfacing with local NMAP installation to perform the scan, and the scan code is here: Gladys/server/services/lan-manager/lib/lan-manager.scan.js at master · GladysAssistant/Gladys · GitHub

So you need to set the same configuration in Gladys that you can use with nmap locally.

Yes my IP addresses are indeed on that network, I have the Hue and Broadlink integrations that correctly find the bridges on that same network.
The nmap command I ran is executed from the container, not the VM.
Yes also for the network type in Docker, I copy/pasted your Docker Compose example without changing anything except the port

Can you send a screenshot of your settings page?

Of course

Ok, that looks good.. I’m not a networking expert though :grinning_face_with_smiling_eyes:

What’s strange is that apparently the service worked one day, since I have a registered device (certainly following a test on another version a long time ago).
Maybe in my case the timeout added via a PR is too short, nmap in the container reports 31 devices up

That’s strange, because you tell me nmap discovers everything in 15 seconds, and the timeout here is 30 seconds!

I also find …

To be on the safe side, I also tested by disabling the CIDR 192.168*** to test on others (one at a time), same result: LANManager fails to discover devices over the network

Weird, what did you want to use LAN Manager for?

Manage presence by detecting my smartphone on the network

Ok, heads up, this isn’t necessarily a very reliable way to detect presence, your phone goes into Wi‑Fi sleep quite regularly I think, and you’ll be marked as absent ^^

Yes, I saw that info on another post, it was to test before possibly buying Bluetooth key fobs. Is it still the

What do you want to use presence detection for? What equipment do you have at home? :slight_smile:

Mainly for managing the lights when I’m away. I have Lidl Zigbee bulbs that don’t remember the last state like Hue bulbs do, so with each power cut (which happens regularly where I live) the whole house is lit. When I’m on vacation or at work it’s a pain having to connect to the house via VPN to turn everything off.

I had thought of creating a scene to turn the lights off when absent for a certain amount of time.

If you don’t have many bulbs, switch to IKEA Zigbee bulbs, they’re €9 and they handle returning to the previous state :slight_smile:

Otherwise, indeed you can use OwnTracks in zone mode

Are you on iPhone or Android? Otherwise on iPhone you can use Shortcuts to make automations (or even, if you have an Apple TV, you can use HomeKit to indicate

Thanks for the Ikea info, I didn’t know they handled that feature.
I also note your ideas about presence.

Besides presence, I would still have liked to get this plugin working to monitor my Proxmox hosts or other devices on the network.

Is it possible to make the timeout delay configurable in a future version?

Are there other options to monitor machines and display their status in a Gladys dashboard?

This is currently not possible but there is a request for that:

Do you mean the scan’s timeout delay? Do you think that’s the issue on your end? I’m really not sure — as you said, on your system, in 15 seconds nmap found everything in the CLI, and it’s exactly the same thing executed by Gladys, so I’m not convinced!