Undefined subroutine &webmin::request_letsencrypt_cert

When running collectinfo.pl I get the following error:

# /etc/webmin/virtual-server/collectinfo.pl Undefined subroutine &webmin::request_letsencrypt_cert called at /usr/share/webmin/virtual-server/feature-ssl.pl line 1979.

Does anyone know how to solve this / what is going wrong?

Anyone an idea on how to get this solved?

Nobody having the same issue? Or are very little already using the builtin Let’s Encrypt functionality?

Works on our version (file /etc/webmin/virtual-server/collected seems to be created after it runs).

Webmin version 1.801
Virtualmin version 5.03

is it defined in webmin/letsencrypt-lib.pl ?

sub request_letsencrypt_cert

The error only occurs when a virtual server with a let’s encrypt SSL certificate is due for renewing. Otherwise it runs fine.

# ag 'sub request_letsencrypt_cert' /usr/share/webmin/ --perl /usr/share/webmin/webmin/letsencrypt-lib.pl 45:sub request_letsencrypt_cert

An example:

# cat /etc/webmin/virtual-server/domains/14604458534030 | grep letsencrypt_last= letsencrypt_last=1468321618 # /etc/webmin/virtual-server/collectinfo.pl # sed -i 's/letsencrypt_last=.*/letsencrypt_last=0000/g' /etc/webmin/virtual-server/domains/14604458534030 # /etc/webmin/virtual-server/collectinfo.pl Undefined subroutine &webmin::request_letsencrypt_cert called at /usr/share/webmin/virtual-server/feature-ssl.pl line 1979.

Ok, this worked:


if (&get_webmin_version() >= 1.782) { ($ok, $cert, $key, $chain) = &webmin::request_letsencrypt_cert( \@dnames, $phd, $d->{'emailto'}); }


&foreign_require('webmin'); if (&get_webmin_version() >= 1.782) { ($ok, $cert, $key, $chain) = &webmin::request_letsencrypt_cert( \@dnames, $phd, $d->{'emailto'}); }


I’ve filed a bugreport: https://www.virtualmin.com/node/41455

Thanks for the bug report, Jamie will take a look at that.