Can not upgrade Prosody for Jitsi from 0.11.4-1 to 0.12.3-1

Hello, I got error when upgrade prosody from 0.11.4-1 to 0.12.3-1.

The pre-produce like this:

  1. I checked version of jitsi, prosody and lua.
$ dpkg -l | grep jitsi
ii  jitsi-meet                            2.0.6726-1                        all          WebRTC JavaScript video conferences
ii  jitsi-meet-prosody                    1.0.5675-1                        all          Prosody configuration for Jitsi Meet
ii  jitsi-meet-turnserver                 1.0.7235-1                        all          Configures coturn to be used with Jitsi Meet
ii  jitsi-meet-web                        1.0.5675-1                        all          WebRTC JavaScript video conferences
ii  jitsi-meet-web-config                 1.0.5675-1                        all          Configuration for web serving of Jitsi Meet
ii  jitsi-videobridge2                    2.1-595-g3637fda4-1               all          WebRTC compatible Selective Forwarding Unit (SFU)
$ sudo apt list -a prosody
Listing... Done
prosody/focal,now 0.11.4-1 amd64 [installed,automatic]
$ dpkg -l "lua*" | egrep "^ii"
ii  lua-bitop:amd64      1.0.2-5               amd64        fast bit manipulation library for the Lua language
ii  lua-event:amd64      0.4.6-1build1         amd64        asynchronous event notification library for Lua
ii  lua-expat:amd64      1.3.0-4               amd64        libexpat bindings for the Lua language
ii  lua-filesystem:amd64 1.7.0-2-1             amd64        luafilesystem library for the Lua language
ii  lua-sec:amd64        0.9-3                 amd64        SSL socket library for the Lua language
ii  lua-socket:amd64     3.0~rc1+git+ac3201d-4 amd64        TCP/UDP socket library for the Lua language
ii  lua5.2               5.2.4-1.1build3       amd64        Simple, extensible, embeddable programming language
  1. I added again the Prosody package repository (I tried install prosody 0.12 but it said E: Package ‘prosody-0.12’ has no installation candidate)
$ echo deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list
$ wget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -
  1. Update and upgrade
$ sudo apt update -y && sudo apt upgrade -y
  1. Check version upgradable of prosody
$ sudo apt list -a prosody
Listing... Done
prosody/unknown 0.12.3-1~focal1 amd64 [upgradable from: 0.11.4-1]
prosody/focal,now 0.11.4-1 amd64 [installed,upgradable to: 0.12.3-1~focal1]
  1. Upgrade version prosody
    The pop-up shown like this and I choose yes
$ sudo apt upgrade prosody
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:
  libfwupdplugin1 libidn11 libxmlb1 linux-image-5.4.0-148-generic linux-modules-5.4.0-148-generic linux-modules-extra-5.4.0-148-generic
Use 'sudo apt autoremove' to remove them.
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
  mc mc-data
Learn more about Ubuntu Pro on AWS at https://ubuntu.com/aws/pro
The following NEW packages will be installed:
  lua-basexx lua-cjson lua-inspect lua-luaossl
The following packages will be upgraded:
  jicofo jitsi-meet jitsi-meet-prosody jitsi-meet-web jitsi-meet-web-config jitsi-videobridge2 prosody
7 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 78.4 MB of archives.
After this operation, 15.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 lua-luaossl amd64 20161214-1build2 [71.8 kB]
Get:2 https://download.jitsi.org stable/ jitsi-videobridge2 2.3-19-gb286dc0c-1 [41.2 MB]                                     
Get:3 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 lua-inspect all 3.1.1-1 [4964 B]
Get:4 http://packages.prosody.im/debian focal/main amd64 prosody amd64 0.12.3-1~focal1 [400 kB]                    
Get:5 https://download.jitsi.org stable/ jitsi-meet 2.0.8615-1 [3344 B]                                                                                                                                           
Get:6 https://download.jitsi.org stable/ jicofo 1.0-1027-1 [21.3 MB]                                                                                                                                              
Get:7 https://download.jitsi.org stable/ jitsi-meet-web 1.0.7235-1 [15.2 MB]                                                                                                                                      
Get:8 https://download.jitsi.org stable/ jitsi-meet-web-config 1.0.7235-1 [27.9 kB]                                                                                                                               
Get:9 https://download.jitsi.org stable/ lua-basexx 0.4.1-jitsi1 [4288 B]                                                                                                                                         
Get:10 https://download.jitsi.org stable/ lua-cjson 2.1.0.10-jitsi1 [20.1 kB]                                                                                                                                     
Get:11 https://download.jitsi.org stable/ jitsi-meet-prosody 1.0.7235-1 [82.4 kB]                                                                                                                                 
Fetched 78.4 MB in 13s (6023 kB/s)                                                                                                                                                                                
Preconfiguring packages ...
(Reading database ... 126840 files and directories currently installed.)
Preparing to unpack .../jitsi-videobridge2_2.3-19-gb286dc0c-1_all.deb ...
Unpacking jitsi-videobridge2 (2.3-19-gb286dc0c-1) over (2.1-595-g3637fda4-1) ...
Setting up jitsi-videobridge2 (2.3-19-gb286dc0c-1) ...
Installing new version of config file /etc/jitsi/videobridge/logging.properties ...
* 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-magic-sysrq.conf ...
kernel.sysrq = 176
* Applying /etc/sysctl.d/10-network-security.conf ...
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.all.rp_filter = 2
* 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.default.promote_secondaries = 1
sysctl: setting key "net.ipv4.conf.all.promote_secondaries": Invalid argument
net.ipv4.ping_group_range = 0 2147483647
net.core.default_qdisc = fq_codel
fs.protected_regular = 1
fs.protected_fifos = 1
* Applying /usr/lib/sysctl.d/50-pid-max.conf ...
kernel.pid_max = 4194304
* 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 /usr/lib/sysctl.d/protect-links.conf ...
fs.protected_fifos = 1
fs.protected_hardlinks = 1
fs.protected_regular = 2
fs.protected_symlinks = 1
* Applying /etc/sysctl.conf ...
(Reading database ... 126846 files and directories currently installed.)
Preparing to unpack .../0-jitsi-meet_2.0.8615-1_all.deb ...
Unpacking jitsi-meet (2.0.8615-1) over (2.0.6726-1) ...
Preparing to unpack .../1-jicofo_1.0-1027-1_all.deb ...
Running preinst upgrade 1.0-832-1 1.0-1027-1
Unpacking jicofo (1.0-1027-1) over (1.0-832-1) ...
Preparing to unpack .../2-jitsi-meet-web_1.0.7235-1_all.deb ...
Unpacking jitsi-meet-web (1.0.7235-1) over (1.0.5675-1) ...
Preparing to unpack .../3-jitsi-meet-web-config_1.0.7235-1_all.deb ...
Unpacking jitsi-meet-web-config (1.0.7235-1) over (1.0.5675-1) ...
Preparing to unpack .../4-prosody_0.12.3-1~focal1_amd64.deb ...
Unpacking prosody (0.12.3-1~focal1) over (0.11.4-1) ...
dpkg: warning: unable to delete old directory '/etc/prosody/conf.avail': Directory not empty
Selecting previously unselected package lua-basexx.
Preparing to unpack .../5-lua-basexx_0.4.1-jitsi1_all.deb ...
Unpacking lua-basexx (0.4.1-jitsi1) ...
Selecting previously unselected package lua-luaossl:amd64.
Preparing to unpack .../6-lua-luaossl_20161214-1build2_amd64.deb ...
Unpacking lua-luaossl:amd64 (20161214-1build2) ...
Selecting previously unselected package lua-cjson:amd64.
Preparing to unpack .../7-lua-cjson_2.1.0.10-jitsi1_amd64.deb ...
Unpacking lua-cjson:amd64 (2.1.0.10-jitsi1) ...
Selecting previously unselected package lua-inspect.
Preparing to unpack .../8-lua-inspect_3.1.1-1_all.deb ...
Unpacking lua-inspect (3.1.1-1) ...
Preparing to unpack .../9-jitsi-meet-prosody_1.0.7235-1_all.deb ...
Unpacking jitsi-meet-prosody (1.0.7235-1) over (1.0.5675-1) ...
Setting up jitsi-meet-web-config (1.0.7235-1) ...


       ;dOocd;
     .dNMM0dKO.
     lNMMMKd0K,
    .xMMMMNxkNc
     dMMMMMkxXc
     cNMMMNl..
     .kMMMX;             Interested in adding telephony to your Jitsi meetings?
      ;XMMMO'
       lNMMWO'           Sign up on https://jaas.8x8.vc/components?host=meet-staging.kienlongbank.co
        lNMMM0,                        and follow the guide in the dev console.
         lXMMMK:.
          ;KMMMNKd.  'oo,
           'xNMMMMXkkkkOKOl'
             :0WMMMMMMNOkk0Kk,
              .cdOWMMMMMWXOkOl
                 .;dKWMMMMMXc.
                    .,:cll:'


Setting up prosody (0.12.3-1~focal1) ...
Installing new version of config file /etc/init.d/prosody ...
Installing new version of config file /etc/logrotate.d/prosody ...
Installing new version of config file /etc/prosody/prosody.cfg.lua ...
Setting up jicofo (1.0-1027-1) ...
Installing new version of config file /etc/init.d/jicofo ...
Setting up lua-cjson:amd64 (2.1.0.10-jitsi1) ...
Setting up lua-basexx (0.4.1-jitsi1) ...
Setting up lua-inspect (3.1.1-1) ...
Setting up lua-luaossl:amd64 (20161214-1build2) ...
Setting up jitsi-meet-web (1.0.7235-1) ...
Setting up jitsi-meet-prosody (1.0.7235-1) ...
The given hostname does not exist in the config
modulemanager       error	Unable to load module 'roster_command': /usr/lib/prosody/modules/share/lua/5.2/mod_roster_command/mod_roster_command.lua: No such file or directory
Failed to load module 'roster_command': /usr/lib/prosody/modules/share/lua/5.2/mod_roster_command/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: dependency problems prevent configuration of jitsi-meet:
 jitsi-meet depends on jitsi-meet-prosody (= 1.0.7235-1); however:
  Package jitsi-meet-prosody is not configured yet.

dpkg: error processing package jitsi-meet (--configure):
 dependency problems - leaving unconfigured
Processing triggers for systemd (245.4-4ubuntu3.21) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Errors were encountered while processing:
 jitsi-meet-prosody
 jitsi-meet
E: Sub-process /usr/bin/dpkg returned an error code (1)
  1. Then I run dpkg configure
$ sudo dpkg --configure -a
Setting up jitsi-meet-prosody (1.0.7235-1) ...
The given hostname does not exist in the config
modulemanager       error	Unable to load module 'roster_command': /usr/lib/prosody/modules/share/lua/5.2/mod_roster_command/mod_roster_command.lua: No such file or directory
Failed to load module 'roster_command': /usr/lib/prosody/modules/share/lua/5.2/mod_roster_command/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
dpkg: dependency problems prevent configuration of jitsi-meet:
 jitsi-meet depends on jitsi-meet-prosody (= 1.0.7235-1); however:
  Package jitsi-meet-prosody is not configured yet.

dpkg: error processing package jitsi-meet (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 jitsi-meet-prosody
 jitsi-meet

Did I miss something?

This is strange. This means what is configured in prosody and what is in debconf stored differs.
But the other error for missing roster module means your prosody config is missing the plugins folder … maybe your main prosody config is missing for some reason the include for the conf.d folder. Did you overwrite the config by any chance?

Hum I see this now:

Apparently this is not a safe operation and is not handled well, I think the main include is missing. This part from the configure was not executed:

Hello, thank you for the reply. But I still not get the point, can you said clearly what should I have to do? Or do you need any infomation for the solution?

I’m saying that the upgrade command you did is not safe, not sure why you need it. It tried to delete old settings and messed up things.
You can check and try adding the Include part in the main prosody config at the end.

How I can upgrade jitsi verison as a normal way of UAT, info in this picture. You can see in the picture below the UAT server has lower version than PROD. And I am going to upgrade UAT like PROD.

IMO the best way is

  • purging the old deployment completely
  • installing a new fresh vesion
  • appling your customizations again to the new installation.