Akkadius / glass-isc-dhcp

Glass - ISC DHCP Server Interface
MIT License
686 stars 143 forks source link

DHCP Config and Snapshots not working #22

Open AlexW85 opened 5 years ago

AlexW85 commented 5 years ago

I found this very beautyfull and usefull tool for my isc-dhcp-server, but i run on Ubuntu and Debian into the same issues if i want to access the configs.

In the Logs there is a Error 500 (internal server error) In Chrome i see in the logs if i press on the Save Config Button: "fs is not defined" If i click on DHCP Config Snapshots i have a greyed out screen and the error: "ENOENT: no such file or directory, scandir './config_backups'"

The npm Package fs ist installed, but i get a warning that fsevents is unsopported on amd64 platforms, i tried also other nodejs versions like 6.14 and the newest 9.11 with no success.

Read out the Config Files and the lease table and so on works fine, paths in the config are default and all correct...

If it helps: I´m able to start/stop/restart the dhcp server from the Glass UI and can save the glass settings, only the dhcp settings and snapshots won´t run

Please help! :)

AlexW85 commented 5 years ago

I get it working now, please look for the Changes in my fork. In routes/dhcp_config_save.js was var fs = require('fs') missing. Also i have changed in all files require('fs') into require('file-system') because fs seems to be deprecated...

GabrielGuntin commented 5 years ago

In my case i used Debian 9, same problem with config file. Based on AlexW85 post, I solved the problem adding just a line in dhcp_config_save.js file :

var express = require('express'); var router = express.Router(); var fs = require('fs');

Using require('file-system') in my case doesn't work... more errors...

Akkadius commented 5 years ago

Interesting, this must have slipped during the last sweep of changes, I will get this sorted and spot check other functions

Thanks guys