ich habe nach Anleitung alle Komponenten (Proxmox, Opnsense, Ubuntu 22.04) komplett neu aufgesetzt. Aktuell scheitere ich an der Erstellung des Musterclients, da kein DHCP funktioniert.
Wenn ich linuxmust-import-subnets ausführe, bekomme ich eine Python-Fehlermeldung.
root@server:~# linuxmuster-import-subnets
Traceback (most recent call last):
File "/usr/sbin/linuxmuster-import-subnets", line 30, in <module>
skipfw = ast.literal_eval(getSetupValue('skipfw'))
File "/usr/lib/python3.10/ast.py", line 110, in literal_eval
return _convert(node_or_string)
File "/usr/lib/python3.10/ast.py", line 109, in _convert
return _convert_signed_num(node)
File "/usr/lib/python3.10/ast.py", line 83, in _convert_signed_num
return _convert_num(node)
File "/usr/lib/python3.10/ast.py", line 74, in _convert_num
_raise_malformed_node(node)
File "/usr/lib/python3.10/ast.py", line 71, in _raise_malformed_node
raise ValueError(msg + f': {node!r}')
ValueError: malformed node or string: False
root@server:~#
Dadurch ist die /etc/dhcpd/subnets.conf auch leer. Die Meldungen in /var/log/syslog scheinen das Problem zu bestätigen.
Apr 19 21:18:45 server systemd[1]: Started ISC DHCP IPv4 server.
Apr 19 21:18:45 server dhcpd[3153]: Internet Systems Consortium DHCP Server 4.4.1
Apr 19 21:18:45 server sh[3153]: Internet Systems Consortium DHCP Server 4.4.1
Apr 19 21:18:45 server sh[3153]: Copyright 2004-2018 Internet Systems Consortium.
Apr 19 21:18:45 server sh[3153]: All rights reserved.
Apr 19 21:18:45 server sh[3153]: For info, please visit https://www.isc.org/software/dhcp/
Apr 19 21:18:45 server dhcpd[3153]: Copyright 2004-2018 Internet Systems Consortium.
Apr 19 21:18:45 server dhcpd[3153]: All rights reserved.
Apr 19 21:18:45 server dhcpd[3153]: For info, please visit https://www.isc.org/software/dhcp/
Apr 19 21:18:45 server dhcpd[3153]: Config file: /etc/dhcp/dhcpd.conf
Apr 19 21:18:45 server sh[3153]: Config file: /etc/dhcp/dhcpd.conf
Apr 19 21:18:45 server sh[3153]: Database file: /var/lib/dhcp/dhcpd.leases
Apr 19 21:18:45 server sh[3153]: PID file: /run/dhcp-server/dhcpd.pid
Apr 19 21:18:45 server dhcpd[3153]: Database file: /var/lib/dhcp/dhcpd.leases
Apr 19 21:18:45 server sh[3153]: Wrote 0 deleted host decls to leases file.
Apr 19 21:18:45 server sh[3153]: Wrote 0 new dynamic host decls to leases file.
Apr 19 21:18:45 server sh[3153]: Wrote 0 leases to leases file.
Apr 19 21:18:45 server dhcpd[3153]: PID file: /run/dhcp-server/dhcpd.pid
Apr 19 21:18:45 server dhcpd[3153]: Internet Systems Consortium DHCP Server 4.4.1
Apr 19 21:18:45 server dhcpd[3153]: Copyright 2004-2018 Internet Systems Consortium.
Apr 19 21:18:45 server dhcpd[3153]: All rights reserved.
Apr 19 21:18:45 server dhcpd[3153]: For info, please visit https://www.isc.org/software/dhcp/
Apr 19 21:18:45 server dhcpd[3153]: Wrote 0 deleted host decls to leases file.
Apr 19 21:18:45 server dhcpd[3153]: Wrote 0 new dynamic host decls to leases file.
Apr 19 21:18:45 server dhcpd[3153]: Wrote 0 leases to leases file.
Apr 19 21:18:45 server dhcpd[3153]:
Apr 19 21:18:45 server sh[3153]: No subnet declaration for ens18 (10.0.0.1).
Apr 19 21:18:45 server sh[3153]: ** Ignoring requests on ens18. If this is not what
Apr 19 21:18:45 server sh[3153]: you want, please write a subnet declaration
Apr 19 21:18:45 server sh[3153]: in your dhcpd.conf file for the network segment
Apr 19 21:18:45 server sh[3153]: to which interface ens18 is attached. **
Apr 19 21:18:45 server sh[3153]: Not configured to listen on any interfaces!
Apr 19 21:18:45 server sh[3153]: If you think you have received this message due to a bug rather
Apr 19 21:18:45 server sh[3153]: than a configuration issue please read the section on submitting
Apr 19 21:18:45 server sh[3153]: bugs on either our web page at www.isc.org or in the README file
Apr 19 21:18:45 server sh[3153]: before submitting a bug. These pages explain the proper
Apr 19 21:18:45 server sh[3153]: process and the information we find helpful for debugging.
Apr 19 21:18:45 server sh[3153]: exiting.
Apr 19 21:18:45 server dhcpd[3153]: No subnet declaration for ens18 (10.0.0.1).
Apr 19 21:18:45 server dhcpd[3153]: ** Ignoring requests on ens18. If this is not what
Apr 19 21:18:45 server dhcpd[3153]: you want, please write a subnet declaration
Apr 19 21:18:45 server dhcpd[3153]: in your dhcpd.conf file for the network segment
Apr 19 21:18:45 server dhcpd[3153]: to which interface ens18 is attached. **
Apr 19 21:18:45 server dhcpd[3153]:
Apr 19 21:18:45 server dhcpd[3153]:
Apr 19 21:18:45 server dhcpd[3153]: Not configured to listen on any interfaces!
Apr 19 21:18:45 server dhcpd[3153]:
Apr 19 21:18:45 server dhcpd[3153]: If you think you have received this message due to a bug rather
Apr 19 21:18:45 server dhcpd[3153]: than a configuration issue please read the section on submitting
Apr 19 21:18:45 server dhcpd[3153]: bugs on either our web page at www.isc.org or in the README file
Apr 19 21:18:45 server dhcpd[3153]: before submitting a bug. These pages explain the proper
Apr 19 21:18:45 server dhcpd[3153]: process and the information we find helpful for debugging.
Apr 19 21:18:45 server dhcpd[3153]:
Apr 19 21:18:45 server dhcpd[3153]: exiting.
Apr 19 21:18:45 server systemd[1]: isc-dhcp-server.service: Main process exited, code=exited, status=1/FAILURE
Apr 19 21:18:45 server systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
Kann mir jemand mit der Python-Fehlermeldung helfen?
OK, du hast frisch installiert.
Wie hast du das genau gemacht?
Vanilla install? Also auf einem frisch installierten ubuntu server 22.04?
Gab es da irgend welche Fehlermeldungen?
Hast du nach Abschluss der INstallation den einmal
linuxmuster-import-devices
ausgeführt?
Weswegen hast du den
linuxmuster-import-subnets
ausgeführt?
Hast du ein segmentiertes Netz mit L3 Router?
Hast du die config Datei für subnets editiert?
An was für einem Client hast du den den dhcp getestet? War das ein virtueller unter proxmox? Ich errinnere mich da an Probleme mit dem virtuellen Proxmoxclient: such mal in ask danach… Ich habe selber kein Proxmox, deswegen weiß ich das nicht so genau.
Generell sit es nicht trivial die virtuellen und echten Netzwerke korrekt zu verbinden.
Wenn also kein dhcp ankommt, dann kann das auch an fehlenden „Netzwerkverbindungen“ liegen: es muss nicht am server liegen.
Läuft den nach der INstallation der lmn und dem laufen von
linuxmuster-setup (oder man macht das setup im Browser) der DHSP Server? Also bevor linuxmuster-import-subnets laufen gelassen wird?
ja, ich habe ein frisches ubuntu genommen. sowohl opnsense und ubuntu-server laufen virtuell auf dem proxmox. ist eine reine lab-umgebung. die opnsense hat einen uplink für internet-access.
das funktioniert auch alles so wie es soll. import-devices gibt keinen fehler.
ich habe an der subnets-datei nichts editiert. als client dient ein eine vm mit pxe-boot. die vm bekommt keine dhcp-adresse. was auch sinn ergibt, da der dhcp-dienst nicht läuft.
zum einen steht das direkt im log, zum anderen gibts keinen dhcp-prozess. (ps -A | grep dhcp)
im dhcp-log steht „No subnet declaration for ens18 (10.0.0.1)“.
ich hatte von daher die vermutung, das mit import-subnets die config für den dhcp geschrieben wird, und wollte das mal manuell ausführen. dabei kommt der python-fehler.
ich vermute, das hängt irgendwie direkt zusammen.
# /etc/dhcp/dhcpd.conf
#
# Sample configuration file for ISC dhcpd for Debian
#
# thomas@linuxmuster.net
# 20200414
#
# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
server-identifier server;
update-static-leases true;
ddns-update-style none;
# option definitions common to all supported networks...
server-name "server.DOMAIN.lan";
option domain-name "DOMAIN.lan";
option domain-name-servers 10.16.1.1;
option netbios-name-servers 10.16.1.1;
option ntp-servers 10.16.1.1;
option font-servers 10.16.1.1;
use-host-decl-names on;
default-lease-time 600;
max-lease-time 7200;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;
allow booting;
allow bootp;
# Define option 150 for the grub menu
option grubmenu code 150 = text;
option arch code 93 = unsigned integer 16; #RFC4578
# arch specific boot images
if option arch = 00:06 {
filename "boot/grub/i386-efi/core.efi";
} else if option arch = 00:07 {
filename "boot/grub/x86_64-efi/core.efi";
} else {
filename "boot/grub/i386-pc/core.0";
}
next-server 10.16.1.1;
# subnet definitions
include "/etc/dhcp/subnets.conf";
# dhcp events
include "/etc/dhcp/events.conf";
group {
# groessere lease time fuer feste ips
default-lease-time 172800;
max-lease-time 172800;
# dynamically created stuff by linuxmuster-import-devices is included
include "/etc/dhcp/devices.conf";
# put your custom stuff in this included file
include "/etc/dhcp/custom.conf";
}
mich wunder ja der Eintrag
IF -f /etc/ltsp/dhcpd.conf
Das gibt es bei mir garnicht. Vielelciht ein Tippfehler …
Aber ich kenn mich zu wenig aus: ich weiß nicht, wie das mit den startscripten im aktuellen ubuntu ist…
root@server:~# cat /etc/dhcp/dhcpd.conf
# modified by linuxmuster-setup at 20250422071856
# /etc/dhcp/dhcpd.conf
#
# Sample configuration file for ISC dhcpd for Debian
#
# thomas@linuxmuster.net
# 20200414
#
# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
server-identifier server;
update-static-leases true;
ddns-update-style none;
# option definitions common to all supported networks...
server-name "server.linuxmuster.lan";
option domain-name "linuxmuster.lan";
option domain-name-servers 10.0.0.1;
option netbios-name-servers 10.0.0.1;
option ntp-servers 10.0.0.1;
option font-servers 10.0.0.1;
use-host-decl-names on;
default-lease-time 600;
max-lease-time 7200;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;
allow booting;
allow bootp;
# Define option 150 for the grub menu
option grubmenu code 150 = text;
option arch code 93 = unsigned integer 16; #RFC4578
# arch specific boot images
if option arch = 00:06 {
filename "boot/grub/i386-efi/core.efi";
} else if option arch = 00:07 {
filename "boot/grub/x86_64-efi/core.efi";
} else {
filename "boot/grub/i386-pc/core.0";
}
next-server 10.0.0.1;
# subnet definitions
include "/etc/dhcp/subnets.conf";
# dhcp events
include "/etc/dhcp/events.conf";
group {
# groessere lease time fuer feste ips
default-lease-time 172800;
max-lease-time 172800;
# dynamically created stuff by linuxmuster-import-devices is included
include "/etc/dhcp/devices.conf";
# put your custom stuff in this included file
include "/etc/dhcp/custom.conf";
}
root@server:~# cat /etc/dhcp/subnets.conf
# modified by linuxmuster-setup at 20250422071856
# /etc/dhcp/subnets.conf
#
# configfile dummy, valid file will be created by linuxmuster-import-subnets
#
# thomas@linuxmuster.net
# 20180514
#
… das könnte der Fehler sein: da steht ja gar keines drin.
Hier die subnet.csv einer eminer Einrichtungen, die nicht gesubnettet ist:
# modified by linuxmuster-setup at 20210902122612
# /etc/linuxmuster/subnets.csv
#
# thomas@linuxmuster.net
# 20200917
#
# Network/Prefix ; Router-IP (last available IP in network) ; 1. Range-IP ; Last-Range-IP ;Namserver(use lmn server if empty);nextserver (tftp server leave empty for default; SETUP-Flag
#
# server subnet definition
#10.16.0.0/12;10.16.1.254;10.16.1.100;10.16.1.200;;;SETUP
10.16.0.0/12;10.16.1.254;;;;;SETUP
kann schon sein…beim linuxmuster-import-subnets passiert halt das:
root@server:~# linuxmuster-import-subnets
Traceback (most recent call last):
File "/usr/sbin/linuxmuster-import-subnets", line 30, in <module>
skipfw = ast.literal_eval(getSetupValue('skipfw'))
File "/usr/lib/python3.10/ast.py", line 110, in literal_eval
return _convert(node_or_string)
File "/usr/lib/python3.10/ast.py", line 109, in _convert
return _convert_signed_num(node)
File "/usr/lib/python3.10/ast.py", line 83, in _convert_signed_num
return _convert_num(node)
File "/usr/lib/python3.10/ast.py", line 74, in _convert_num
_raise_malformed_node(node)
File "/usr/lib/python3.10/ast.py", line 71, in _raise_malformed_node
raise ValueError(msg + f': {node!r}')
ValueError: malformed node or string: True
und damit schließt sich der Kreis zum vorherigen Thread wieder…
Hatte eben zufälligerweise den selben Fehler. Es liegt wohl daran, dass True und False in der setup.ini nun als boolean und nicht mehr als string gelesen werden.
Falls jemand einen schnellen Workaround braucht:
/usr/sbin/linuxmuster-import-subnets → Zeile 30 von skipfw = ast.literal_eval(getSetupValue('skipfw'))
zu
skipfw = getSetupValue('skipfw')
Die Anpassung ist nur temporär und wird durch ein Update wieder überschrieben.
Mir wäre eher an einer dauerhaften und nachhalterigen Lösung gelegen.
Innerhalb der letzten 21 Tage wurde das Paket linuxmuster-base7 viermal (!!) aktualisiert und dennoch funktioniert eine Neuinstallation immer noch nicht fehlerfrei, weil irgendwas immernoch nicht zusammen passt.