After changing from Centos 8 to Centos 8 Stream Webmin "asked" to update the detected OS. From then on the Bootup and Shutdown page only shows Error: Failed to read systemd units.
Followed by what seems a random text like "BindIPv6Only=default Backlog=128 TimeoutUSec=1min 30s SocketMode=0666 DirectoryMode=0755 Accept=no FlushPending=no Writable=no KeepAlive=no KeepAliveTimeUSec=0 KeepAliveIntervalUSec=0 KeepAliveProbes=0 DeferAcceptUSec=0 NoDelay=no Priority=-1 ReceiveBuffer=0 SendBuffer=0 IPTOS=-1 IPTTL=-1 PipeSize=0 FreeBind=no Transparent=no Broadcast=no PassCredentials=no PassSecurity=no" etc.
When restarting Webmin and/or the OS the information is different, the error the same.
Can you post the /etc/webmin/config file from your system, so I can see what the detected OS is?
Thank you for the quick reply.
Here is the content of the config file:
deftab=webmin
lang=en.UTF-8
referers_none=1
find_pid_command=ps auwwwx | grep NAME | grep -v grep | awk '{ print $2 }'
hostnamemode=0
dateformat=dd/mon/yyyy
showlogin=0
notabs=0
realname_administrator=removed
passwd_uindex=0
os_type=redhat-linux
product=webmin
gotomodule=
nohostname=0
lang_administrator=en
nowebminup=
md5pass=1
help_height=
gotoone=0
real_os_type=CentOS Linux
nomoduleup=
path=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
passwd_pindex=1
webprefix=
ld_env=LD_LIBRARY_PATH
tempdelete_days=7
log=1
passwd_file=/etc/shadow
help_width=
passwd_mindex=4
nofeedbackcc=2
showhost=0
acceptlang=0
by_view=0
webprefixnoredir=1
passwd_cindex=2
sysinfo=0
theme=authentic-theme
hostnamedisplay=
realname_root=removed
os_version=16
real_os_version=8
feedback_to=
logsched=1
logemail=
logtime=168
logsyslog=1
logfullfiles=0
logmodulesemail=
logperms=
logusers=
logmodules=
logclear=1
logfiles=0
Jamie, I have given it deeper tests and it works for me on the clean CentOS 8 install, however there are some other issues I discovered.
When virtualmin config-system -i MySQL is run it doesn't work correctly if service is disabled upon boot because command
init::action_status("mariadb")always returns 0 (service doesn't exist), because code here checks for UnitFileState, which actually doesn't even exist:Example output on CentOS Stream 8:
.. while CentOS 8 returns:
Last edit: Ilia 2021-01-22
Did CentOS Stream 8 rename the MariaDB bootup action to something else?
The problem is not solely related to MariaDB service but it's rather seems like a systemd change. The only change I could find when enabling/disabling the service are created/removed symlinks. On the other hand previous versions of systemd really changed unit property for UnitFileState, which now just does't exist.
The right way, as I see it, would be doing the following:
I have made a patch, please have a look. It works for me.
https://github.com/webmin/webmin/commit/23adcc8bc0b6b7d64616f6a95a327676fd3c33ab
Last edit: Ilia 2021-01-23
replaced init/init-lib.pl with the one from github, same problem..
Failed to read systemd units : Id=initrd-fs.target Names=initrd-fs.target WantedBy=initrd-switch-root.target initrd.target Conflicts=shutdown.target Before=initrd-cleanup.service initrd.target initrd-switch-root.target After=initrd-parse-etc.service OnFailure=emergency.target Documentation=man:systemd.special(7) Description=Initrd File Systems LoadState=loaded ActiveState=inactive FreezerState=running SubState=dead FragmentPath=/usr/lib/systemd/system/initrd-fs.target UnitFileState=static UnitFilePreset=disabled StateChangeTimestamp=Sat 2021-01-23 10:59:00 CET StateChangeTimestampMonotonic=19810425 InactiveExitTimestamp=Sat 2021-01-23 10:58:47 CET InactiveExitTimestampMonotonic=7540436 ActiveEnterTimestamp=Sat 2021-01-23 10:58:47 CET ActiveEnterTimestampMonotonic=7540436 etc etc
Looking at this issue again on CentOS Stream 8 I can see that they have fixed it. Perhaps it was their bug.
I moved away from CentOS to RedHat. Besides this problem there where to many issues using CentOS Stream.
Using RH this problem is solved.