Webmin broken, fails to start

I am coming from https://www.virtualmin.com/comment/reply/68208 w. the problem of the broken letsencrypt feature.
On a Debian 9 I accidently/prematurely did “cd /usr/libexec/webmin && ./update-from-repo.sh -y” as stated in above thread and now get “unable to connect” in GUI/browser:

webmin installation is broken, webmin fails to start.

Already tried “apt-get install --reinstall webmin usermin webmin-virtual-server”, which apparently worked, but didn’t solve the problem, webmin won’t start an throws the following errors:

# service webmin start
Job for webmin.service failed because the control process exited with error code.
See "systemctl status webmin.service" and "journalctl -xe" for details.
#journalctl -xe

...

Jan 15 09:15:44 io systemd[1]: Starting LSB: web-based administration interface for Unix systems...
-- Subject: Unit webmin.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit webmin.service has begun starting up.
Jan 15 09:15:44 io dovecot[24930]: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=*.*.*.*, lip=*.*.*.*, TLS: Disconnected, session=<X7mxUCmc/9ZbQ+hK>
Jan 15 09:15:44 io perl[28014]: pam_unix(webmin:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=  user=root
Jan 15 09:15:45 io dovecot[24930]: pop3-login: Disconnected (no auth attempts in 1 secs): user=<>, rip=*.*.*.*, lip=*.*.*.*, TLS: Disconnected, session=<wQezUCmcANdbQ+hK>
Jan 15 09:15:46 io systemd[1]: webmin.service: Control process exited, code=exited status=2
Jan 15 09:15:46 io systemd[1]: Failed to start LSB: web-based administration interface for Unix systems.
-- Subject: Unit webmin.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit webmin.service has failed.
-- 
-- The result is failed.
Jan 15 09:15:46 io systemd[1]: webmin.service: Unit entered failed state.
Jan 15 09:15:46 io systemd[1]: webmin.service: Failed with result 'exit-code'.
#
#
#
# systemctl status webmin.service
● webmin.service - LSB: web-based administration interface for Unix systems
   Loaded: loaded (/etc/init.d/webmin; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2020-01-15 09:15:46 CET; 2min 30s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 28013 ExecStart=/etc/init.d/webmin start (code=exited, status=2)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/webmin.service
           ├─24924 /usr/sbin/dovecot
           ├─24929 dovecot/anvil
           ├─24930 dovecot/log
           ├─27575 /usr/share/webmin/virtual-server/collectinfo.pl
           ├─28006 dovecot/config
           ├─28093 dovecot/auth
           ├─28095 dovecot/ssl-params
           ├─28096 dovecot/auth -w
           ├─28602 sh -c su -s /bin/sh *********** -c openssl\ x509\ \-in\ \\\/home\\\/***********\\\/ssl\\\.cert\ \-issuer\ \-subject\ \-enddate\ \-startdate\ \-text
           └─28643 su -s /bin/sh *********** -c openssl x509 -in \/home\/***********\/ssl\.cert -issuer -subject -enddate -startdate -text

#
#
#
## su -s /bin/sh *********** -c openssl x509 -in \/home\/***********\/ssl\.cert -issuer -subject -enddate -startdate -text
su: invalid option -- 'i'
Usage: su [options] [LOGIN]

Options:
  -c, --command COMMAND         pass COMMAND to the invoked shell
  -h, --help                    display this help message and exit
  -, -l, --login                make the shell a login shell
  -m, -p,
  --preserve-environment        do not reset environment variables, and
                                keep the same shell
  -s, --shell SHELL             use SHELL instead of the default in passwd

(clients IP’s and hostnames blanked out complying GDPR)

Any ideas to fix this?
Many thanks for your help & feedback!

pam_unix(webmin:auth): authentication failure; - see the issue in logs… read the logs!

I see, thanks, but what is causing this err? :thinking:

The pam_unix error isn’t anything. It’s not what’s preventing Webmin from starting. But, I’m not sure what is.

Look in the /var/webmin/miniserv.error log for more clues.

Thank you Joe,

now, that after a re-boot also apache2 failed to start I had to look deeper.

Apparently a conflict originated from installing Domain xyz.tld while sub.xyz.tld was aready present…
I saw, that the definitions for xyz.tld where written to /etc/apache2/sites-enabled/sub.xyz.tld.conf? Is that supposed to happen? I’d rather guess, a separate /etc/apache2/sites-enabled/xyz.tld.conf would be written? It was supposed to be a separate site, not an alias of sub.xyz.tld. I can’t tell though, whether or not this is related to the problems with letsencrypt with which all the trouble originally started a week ago…

Interestingly virtualmin still worked via command-line even without webmin being able to start, so I did a
virtualmin disable-domain --sub.xyz.tld
which didnt help, but
virtualmin delete-domain --sub.xyz.tld
apparently did the job and tadaaaa both apache and webmin start without any issues! :star_struck:

Yet, to be 200% safe, I will replace this VE w. a new one and backup/restore all hosts to the new box.
…and I wont mess w. letencrypt or add a new Domain to this box, before I safely moved stuff to a new VE :wink:

So a bigger problem generated the solution in the end, wired… :slight_smile:

P.S.
Joe, here the error log from right after it went down last week - maybe it can help you find a bug…:

:~# tail -n 20 /var/webmin/miniserv.error
Pre-loaded virtual-server/feature-ftp.pl in virtual_server
Pre-loaded virtual-server/feature-spam.pl in virtual_server
Pre-loaded virtual-server/feature-virus.pl in virtual_server
Pre-loaded virtual-server/feature-webmin.pl in virtual_server
Pre-loaded virtual-server/feature-virt.pl in virtual_server
Pre-loaded virtual-server/feature-virt6.pl in virtual_server
[08/Jan/2020:18:48:32 +0100] miniserv.pl started
[08/Jan/2020:18:48:32 +0100] Using MD5 module Digest::MD5
[08/Jan/2020:18:48:32 +0100] Using SHA512 module Crypt::SHA
[08/Jan/2020:18:48:32 +0100] PAM authentication enabled
Error: The specified administration user already exists
Use of uninitialized value $ip in concatenation (.) or string at /usr/share/webmin/system-status/system_info.pl line 39.
Failed to find mount point for /home
Failed to find mount point for /home
Use of uninitialized value $ip in concatenation (.) or string at /usr/share/webmin/system-status/system_info.pl line 39.
Failed to find mount point for /home
Use of uninitialized value $ip in concatenation (.) or string at /usr/share/webmin/system-status/system_info.pl line 39.
restarting miniserv
[08/Jan/2020:18:52:00 +0100] Restarting
Failed to open SSL key /home/******/ssl.key at /usr/share/webmin/miniserv.pl line 4420.

@Hans the point of logs is to telling you what is happening and why it is failing… so I am glad you can see your logs. - from those logs you would be able to read why - this is happening.

I was just point user to reading the log files… without providing the solution as for other reasons - we both know it would be helpful if people would read the logs or perhaps share them sometimes… @Hans said he see, so I guess he did figured out what is happening and as logs telling him why… so logs tell you a lot actually…I understand pam_unix does not tell you the thing but as I said read the logs - I mean all of them :slight_smile: