Updating failed ubuntu 18.04 - jitsi stable

Running apt upgrade today I have this error:

apt update
Hit:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:5 https://download.jitsi.org stable/ InRelease                                                                     
Hit:6 http://packages.prosody.im/debian bionic InRelease                                                               
Get:7 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [1725 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [321 kB]
Fetched 2298 kB in 1s (1819 kB/s)                                                       
Reading package lists... Done
Building dependency tree       
Reading state information... Done
22 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@ip-172-31-4-196:/home/ubuntu# apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-aws-5.4-headers-5.4.0-1043 linux-aws-5.4-headers-5.4.0-1045
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
  grub-common grub-pc grub-pc-bin grub2-common jicofo jitsi-meet jitsi-meet-prosody jitsi-meet-tokens
  jitsi-meet-turnserver jitsi-meet-web jitsi-meet-web-config jitsi-videobridge2 libmysqlclient20 libnss-systemd
  libpam-systemd libsystemd0 libudev1 prosody systemd systemd-sysv udev update-notifier-common
22 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 74.9 MB/75.6 MB of archives.
After this operation, 2573 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libnss-systemd amd64 237-3ubuntu10.47 [105 kB]
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsystemd0 amd64 237-3ubuntu10.47 [209 kB]
Get:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpam-systemd amd64 237-3ubuntu10.47 [107 kB]
Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 systemd amd64 237-3ubuntu10.47 [2914 kB]
Get:5 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 udev amd64 237-3ubuntu10.47 [1102 kB]   
Get:6 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libudev1 amd64 237-3ubuntu10.47 [58.2 kB]
Get:7 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 systemd-sysv amd64 237-3ubuntu10.47 [16.0 kB]
Get:8 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 update-notifier-common all 3.192.1.10 [133 kB]
Get:9 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub-pc amd64 2.02-2ubuntu8.23 [138 kB] 
Get:10 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub2-common amd64 2.02-2ubuntu8.23 [534 kB]
Get:11 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub-pc-bin amd64 2.02-2ubuntu8.23 [901 kB]
Get:12 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub-common amd64 2.02-2ubuntu8.23 [1772 kB]
Get:13 http://packages.prosody.im/debian bionic/main amd64 prosody amd64 0.11.9-1~bionic1 [291 kB]            
Get:14 https://download.jitsi.org stable/ jitsi-videobridge2 2.1-492-g5edaf7dd-1 [33.4 MB]                            
Get:15 https://download.jitsi.org stable/ jitsi-meet 2.0.5870-1 [3348 B]           
Get:16 https://download.jitsi.org stable/ jicofo 1.0-747-1 [21.8 MB]
Get:17 https://download.jitsi.org stable/ jitsi-meet-web 1.0.4985-1 [11.3 MB]
Get:18 https://download.jitsi.org stable/ jitsi-meet-web-config 1.0.4985-1 [19.1 kB]
Get:19 https://download.jitsi.org stable/ jitsi-meet-prosody 1.0.4985-1 [45.8 kB]
Get:20 https://download.jitsi.org stable/ jitsi-meet-turnserver 1.0.4985-1 [6248 B]
Get:21 https://download.jitsi.org stable/ jitsi-meet-tokens 1.0.4985-1 [4380 B]
Fetched 74.9 MB in 4s (16.9 MB/s)            
Preconfiguring packages ...
(Reading database ... 159932 files and directories currently installed.)
Preparing to unpack .../libnss-systemd_237-3ubuntu10.47_amd64.deb ...
Unpacking libnss-systemd:amd64 (237-3ubuntu10.47) over (237-3ubuntu10.46) ...
Preparing to unpack .../libsystemd0_237-3ubuntu10.47_amd64.deb ...
Unpacking libsystemd0:amd64 (237-3ubuntu10.47) over (237-3ubuntu10.46) ...
Setting up libsystemd0:amd64 (237-3ubuntu10.47) ...
(Reading database ... 159932 files and directories currently installed.)
Preparing to unpack .../libpam-systemd_237-3ubuntu10.47_amd64.deb ...
Unpacking libpam-systemd:amd64 (237-3ubuntu10.47) over (237-3ubuntu10.46) ...
Preparing to unpack .../systemd_237-3ubuntu10.47_amd64.deb ...
Unpacking systemd (237-3ubuntu10.47) over (237-3ubuntu10.46) ...
Preparing to unpack .../udev_237-3ubuntu10.47_amd64.deb ...
Unpacking udev (237-3ubuntu10.47) over (237-3ubuntu10.46) ...
Preparing to unpack .../libudev1_237-3ubuntu10.47_amd64.deb ...
Unpacking libudev1:amd64 (237-3ubuntu10.47) over (237-3ubuntu10.46) ...
Setting up libudev1:amd64 (237-3ubuntu10.47) ...
Setting up systemd (237-3ubuntu10.47) ...
(Reading database ... 159932 files and directories currently installed.)
Preparing to unpack .../systemd-sysv_237-3ubuntu10.47_amd64.deb ...
Unpacking systemd-sysv (237-3ubuntu10.47) over (237-3ubuntu10.46) ...
Preparing to unpack .../jitsi-videobridge2_2.1-492-g5edaf7dd-1_all.deb ...
Unpacking jitsi-videobridge2 (2.1-492-g5edaf7dd-1) over (2.1-478-gc6da57bd-1) ...
Setting up jitsi-videobridge2 (2.1-492-g5edaf7dd-1) ...
* Applying /etc/sysctl.d/10-console-messages.conf ...
kernel.printk = 4 4 1 7
* Applying /etc/sysctl.d/10-ipv6-privacy.conf ...
net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2
* Applying /etc/sysctl.d/10-kernel-hardening.conf ...
kernel.kptr_restrict = 1
* Applying /etc/sysctl.d/10-link-restrictions.conf ...
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
* Applying /etc/sysctl.d/10-lxd-inotify.conf ...
fs.inotify.max_user_instances = 1024
* Applying /etc/sysctl.d/10-magic-sysrq.conf ...
kernel.sysrq = 176
* Applying /etc/sysctl.d/10-network-security.conf ...
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.tcp_syncookies = 1
* Applying /etc/sysctl.d/10-ptrace.conf ...
kernel.yama.ptrace_scope = 1
* Applying /etc/sysctl.d/10-zeropage.conf ...
vm.mmap_min_addr = 65536
* Applying /etc/sysctl.d/20-jvb-udp-buffers.conf ...
net.core.rmem_max = 10485760
net.core.netdev_max_backlog = 100000
* Applying /usr/lib/sysctl.d/50-default.conf ...
net.ipv4.conf.all.promote_secondaries = 1
net.core.default_qdisc = fq_codel
* Applying /etc/sysctl.d/99-cloudimg-ipv6.conf ...
net.ipv6.conf.all.use_tempaddr = 0
net.ipv6.conf.default.use_tempaddr = 0
* Applying /etc/sysctl.d/99-sysctl.conf ...
* Applying /etc/sysctl.conf ...
(Reading database ... 159932 files and directories currently installed.)
Preparing to unpack .../0-jitsi-meet_2.0.5870-1_all.deb ...
Unpacking jitsi-meet (2.0.5870-1) over (2.0.5765-1) ...
Preparing to unpack .../1-jicofo_1.0-747-1_all.deb ...
Unpacking jicofo (1.0-747-1) over (1.0-740-1) ...
Preparing to unpack .../2-jitsi-meet-web_1.0.4985-1_all.deb ...
Unpacking jitsi-meet-web (1.0.4985-1) over (1.0.4900-1) ...
Preparing to unpack .../3-jitsi-meet-web-config_1.0.4985-1_all.deb ...
Unpacking jitsi-meet-web-config (1.0.4985-1) over (1.0.4900-1) ...
Preparing to unpack .../4-prosody_0.11.9-1~bionic1_amd64.deb ...
Unpacking prosody (0.11.9-1~bionic1) over (0.11.8-1~bionic1) ...
Preparing to unpack .../5-jitsi-meet-prosody_1.0.4985-1_all.deb ...
Unpacking jitsi-meet-prosody (1.0.4985-1) over (1.0.4900-1) ...
Preparing to unpack .../6-update-notifier-common_3.192.1.10_all.deb ...
Unpacking update-notifier-common (3.192.1.10) over (3.192.1.9) ...
Setting up jitsi-meet-web-config (1.0.4985-1) ...
----------------

You can now switch to a Let’s Encrypt certificate. To do so, execute:
/usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh

----------------
(Reading database ... 159940 files and directories currently installed.)
Preparing to unpack .../0-jitsi-meet-turnserver_1.0.4985-1_all.deb ...
Unpacking jitsi-meet-turnserver (1.0.4985-1) over (1.0.4900-1) ...
Preparing to unpack .../1-grub-pc_2.02-2ubuntu8.23_amd64.deb ...
Unpacking grub-pc (2.02-2ubuntu8.23) over (2.02-2ubuntu8.21) ...
Preparing to unpack .../2-grub2-common_2.02-2ubuntu8.23_amd64.deb ...
Unpacking grub2-common (2.02-2ubuntu8.23) over (2.02-2ubuntu8.21) ...
Preparing to unpack .../3-grub-pc-bin_2.02-2ubuntu8.23_amd64.deb ...
Unpacking grub-pc-bin (2.02-2ubuntu8.23) over (2.02-2ubuntu8.21) ...
Preparing to unpack .../4-grub-common_2.02-2ubuntu8.23_amd64.deb ...
Unpacking grub-common (2.02-2ubuntu8.23) over (2.02-2ubuntu8.21) ...
Preparing to unpack .../5-libmysqlclient20_5.7.34-0ubuntu0.18.04.1_amd64.deb ...
Unpacking libmysqlclient20:amd64 (5.7.34-0ubuntu0.18.04.1) over (5.7.33-0ubuntu0.18.04.1) ...
Preparing to unpack .../6-jitsi-meet-tokens_1.0.4985-1_all.deb ...
Unpacking jitsi-meet-tokens (1.0.4985-1) over (1.0.4900-1) ...
Setting up libnss-systemd:amd64 (237-3ubuntu10.47) ...
Setting up update-notifier-common (3.192.1.10) ...
Setting up systemd-sysv (237-3ubuntu10.47) ...
Setting up jitsi-meet-web (1.0.4985-1) ...
Setting up udev (237-3ubuntu10.47) ...
update-initramfs: deferring update (trigger activated)
Setting up grub-common (2.02-2ubuntu8.23) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up jicofo (1.0-747-1) ...
Setting up libmysqlclient20:amd64 (5.7.34-0ubuntu0.18.04.1) ...
Setting up prosody (0.11.9-1~bionic1) ...

Configuration file '/etc/prosody/prosody.cfg.lua'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** prosody.cfg.lua (Y/I/N/O/D/Z) [default=N] ? d

Configuration file '/etc/prosody/prosody.cfg.lua'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** prosody.cfg.lua (Y/I/N/O/D/Z) [default=N] ? y
Installing new version of config file /etc/prosody/prosody.cfg.lua ...
Setting up libpam-systemd:amd64 (237-3ubuntu10.47) ...
Setting up grub-pc-bin (2.02-2ubuntu8.23) ...
Setting up grub2-common (2.02-2ubuntu8.23) ...
Setting up jitsi-meet-prosody (1.0.4985-1) ...
The given hostname does not exist in the config
Component "focus.***.***.***" "client_proxy"
modulemanager       error	Unable to load module 'roster_command': /usr/lib/prosody/modules/mod_roster_command.lua:
 No such file or directory
Failed to load module 'roster_command': /usr/lib/prosody/modules/mod_roster_command.lua: No such file or directory
dpkg: error processing package jitsi-meet-prosody (--configure):
 installed jitsi-meet-prosody package post-installation script subprocess returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependen
cy problems prevent configuration of jitsi-meet-tokens:
 jitsi-meet-tokens depends on jitsi-meet-prosody; however:
  Package jitsi-meet-prosody is not configured yet.

dpkg: error processing package jitsi-meet-tokens (--configure):
 dependency problems - leaving unconfigured
Setting up grub-pc (2.02-2ubuntu8.23) ...
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-1048-aws
Found initrd image: /boot/initrd.img-5.4.0-1048-aws
Found linux image: /boot/vmlinuz-5.4.0-1047-aws
Found initrd image: /boot/initrd.img-5.4.0-1047-aws
Found linux image: /boot/vmlinuz-4.15.0-1065-aws
Found initrd image: /boot/initrd.img-4.15.0-1065-aws
done
dpkg: dependency problems prevent configuration of jitsi-meet:
 jitsi-meet depends on jitsi-meet-prosody (= 1.0.4985-1); however:
  Package jitsi-meet-prosody is not configured yet.

dpkg: error processing package jitsi-meet (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          No apport repo
rt written because MaxReports is reached already
                                                dpkg: dependency problems prevent configuration of jitsi-meet-turnserver
:
 jitsi-meet-turnserver depends on jitsi-meet-prosody; however:
  Package jitsi-meet-prosody is not configured yet.

dpkg: error processing package jitsi-meet-turnserver (--configure):
 dependency problems - leaving unconfigured
Processing triggers for systemd (237-3ubuntu10.47) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for dbus (1.12.2-1ubuntu1.2) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for install-info (6.5.0.dfsg.1-2) ...
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...
Processing triggers for initramfs-tools (0.130ubuntu3.11) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-1048-aws
Errors were encountered while processing:
 jitsi-meet-prosody
 jitsi-meet-tokens
 jitsi-meet
 jitsi-meet-turnserver
E: Sub-process /usr/bin/dpkg returned an error code (1)

Maybe this will help - [HOW TO] Upgrade to the Latest Stable Version

Not sure, I have the key and stable. The error is:

The given hostname does not exist in the config
Component "focus.***.***.***" "client_proxy"
modulemanager       error	Unable to load module 'roster_command': /usr/lib/prosody/m
odules/mod_roster_command.lua: No such file or directory

Maybe this will help?

I had to do this:
cp /usr/share/jitsi-meet/prosody-plugins/mod_roster_command.lua /usr/lib/prosody/modules/

I still have error about The given hostname does not exist in the config:

Setting up jitsi-meet-prosody (1.0.4985-1) ...
The given hostname does not exist in the config
Component "focus.meet.mydomain.com" "client_proxy"
The host 'focus.meet.mydomain.com' is not configured for this server.
Setting up jitsi-meet-tokens (1.0.4985-1) ...
Setting up jitsi-meet (2.0.5870-1) ...
Setting up jitsi-meet-turnserver (1.0.4985-1) ...
------------------------------------------------

turnserver is already configured on this machine.

------------------------------------------------
W: APT had planned for dpkg to do more than it reported back (9 vs 13).
   Affected packages: jitsi-meet-prosody:amd64

And not sure how bad it is: Affected packages: jitsi-meet-prosody:amd64

That’s interesting to me because the first line of the Prosody cfg file (/etc/prosody/conf.avail/meet.example.com.cfg.lua) should point to the plugins directory.

plugin_paths = { "/usr/share/jitsi-meet/prosody-plugins/" }

Is that not the case for you?

Also, I’m curious about your prosody.cfg.lua file:

I have it too (plugin_paths), but maybe it’s related to this error when apt update:

Setting up jitsi-meet-prosody (1.0.4985-1) …
The given hostname does not exist in the config
Component “focus.meet.mydomain.com” “client_proxy”
The host ‘focus.meet.mydomain.com’ is not configured for this server.

asap_accepted_issuers = { "jitsi", "mycie" }
asap_accepted_audiences = { "jitsi", "mycie" }
plugin_paths = { "/usr/share/jitsi-meet/prosody-plugins/" }

-- domain mapper options, must at least have domain base set to use the mapper
muc_mapper_domain_base = "meet.mydomain.com";

turncredentials_secret = "...";

turncredentials = {
  { type = "stun", host = "meet.mydomain.com", port = "4446" },
  { type = "turn", host = "meet.mydomain.com", port = "4446", transport = "udp" },
  { type = "turns", host = "meet.mydomain.com", port = "443", transport = "tcp" }
};

cross_domain_bosh = false;
consider_bosh_secure = true;

VirtualHost "meet.mydomain.com"
        authentication = "token"
        app_id="hubmyciestudio"
        app_secret="..."
        ssl = {
                key = "/etc/prosody/certs/meet.mydomain.com.key";
                certificate = "/etc/prosody/certs/meet.mydomain.com.crt";
        }
        speakerstats_component = "speakerstats.meet.mydomain.com"
        conference_duration_component = "conferenceduration.meet.mydomain.com"
        -- we need bosh
        modules_enabled = {
            "bosh";
            "pubsub";
            "ping"; -- Enable mod_ping
            "speakerstats";
            "turncredentials";
            "conference_duration";
	    "presence_identity";
        }
        c2s_require_encryption = false

Component "conference.meet.mydomain.com" "muc"
    storage = "memory"
    modules_enabled = {
        "muc_meeting_id";
        "muc_domain_mapper";
        "token_verification";
    }
    admins = { "focus@auth.meet.mydomain.com" }
    muc_room_locking = false
    muc_room_default_public_jids = true

-- internal muc component
Component "internal.auth.meet.mydomain.com" "muc"
    storage = "memory"
    modules_enabled = {
      "ping";
    }
    admins = { "focus@auth.meet.mydomain.com", "jvb@auth.meet.mydomain.com" }
    muc_room_locking = false
    muc_room_default_public_jids = true

VirtualHost "auth.meet.mydomain.com"
    ssl = {
        key = "/etc/prosody/certs/auth.meet.mydomain.com.key";
        certificate = "/etc/prosody/certs/auth.meet.mydomain.com.crt";
    }
    authentication = "internal_plain"

Component "focus.meet.mydomain.com"
    component_secret = "..."

Component "speakerstats.meet.mydomain.com" "speakerstats_component"
    muc_component = "conference.meet.mydomain.com"

Component "conferenceduration.meet.mydomain.com" "conference_duration_component"
    muc_component = "conference.meet.mydomain.com"