After upgrade to Ubuntu 20.04, external storages SMB can't connect to shares

Version info

Nextcloud version (eg, 18.0.2): 20.0.5
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.41 (Ubuntu)
PHP version (eg, 7.1):

~# php -v
PHP 7.4.3 (cli) (built: Oct  6 2020 15:47:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

I think I am using mod_php and not fpm because I don’t have fpm installed, but I am a novice with php and web servers so I can’t be totally sure.

My problem

After upgrading to Ubuntu 20.04, I found that my SMB External Storage was not connected. The External Storage directories are highlighted red in the web gui. Also, there are red exclamation icons on the External Storages admin page.

I did some research and found that php’s smbclient module was removed in Ubuntu 20.04. A PPA is available, but I like to avoid third party PPAs for security reasons. Instead, I learned about PECL and installed it that way with something like:
pecl install smbclient

I also added a line in the php configs /etc/php/7.4/apache2/php.ini and /etc/php/7.4/cli/php.ini to specify the module:
extension=smbclient.so

I made sure the regular, non-php smbclient was installed:

~# apt install smbclient
Reading package lists... Done
Building dependency tree
Reading state information... Done
smbclient is already the newest version (2:4.11.6+dfsg-0ubuntu1.6).
0 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.

The smb module appears to be installed because php -m yields the line libsmbclient.

A phpinfo.php page I created has a section called libsmbclient, has “smb” as a “Registered PHP Stream” and has these other details that may be relevant:

Still, the problem is not fixed.

This line is completely filling my Nextcloud log in Admin > Logging:

Fatal	webdav	Sabre\DAV\Exception\ServiceUnavailable: Storage is temporarily not available

Are there any obvious problems or things to look into why nextcloud can’t connect to SMB shares?

Other requested details

The output of config.php.

<?php
$CONFIG = array (
  'instanceid' => 'snip',
  'passwordsalt' => 'snip',
  'secret' => 'snip',
  'trusted_domains' =>
  array (
    0 => 'snipped_IP',
    1 => 'snipped_domain',
  ),
  'trusted_proxies' =>
  array (
    0 => 'snipped_IP',
  ),
  'forwarded_for_headers' =>
  array (
    snip
  ),
  'datadirectory' => 'snip',
  'overwrite.cli.url' => 'https://snipped_IP',
  'htaccess.RewriteBase' => '/',
  'dbtype' => 'mysql',
  'version' => '20.0.5.2',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'snip',
  'dbpassword' => 'snip',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'snip',
  'mail_domain' => 'snip',
  'mail_smtphost' => 'snip',
  'mail_smtpport' => '25',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 3,
  'updater.release.channel' => 'stable',
);

The apache error logs don’t seem to contain anything related.

Did your issue appear after upgrading to Ubuntu 20? Are your logs showing the same message as mine? If neither, they are not likely related.