Virtualmin fail to install in Oracle Linux 8

Hello Virtualmin Team,

I have an Oracle Linux 7 server, which is on Oracle's cloud, using Virtualmin for over a year. Now I need to migrate this server to version 8 of the operating system and I am doing a local installation to check the operation and I stopped with the following problem:

[4/23] Configuring ClamAV [✔]
[5/23] Configuring Dovecot ▒▒▒▒▒▒▒Error: Missing file to read at dovecot :: / usr / libexec / webmin / dovecot / dovecot-lib.pl line 276
█▒▒▒▒▒▒Error
-----
Missing file to read at dovecot :: / usr / libexec / webmin / dovecot / dovecot-lib.pl line 276
-----
▣▣▣ Cleaning up

[WARNING] The following errors occurred during installation:

  ◉ Postinstall configuration returned an error.
[root @ we██▒▒▒▒▒

Content of /etc/dovecot/ directory:

Complete!
[root@web3 ~]# tree /etc/dovecot/
/etc/dovecot/
├── conf.d
│   ├── 10-auth.conf
│   ├── 10-director.conf
│   ├── 10-logging.conf
│   ├── 10-mail.conf
│   ├── 10-master.conf
│   ├── 10-ssl.conf
│   ├── 15-lda.conf
│   ├── 15-mailboxes.conf
│   ├── 20-imap.conf
│   ├── 20-lmtp.conf
│   ├── 20-pop3.conf
│   ├── 20-submission.conf
│   ├── 90-acl.conf
│   ├── 90-plugin.conf
│   ├── 90-quota.conf
│   ├── auth-checkpassword.conf.ext
│   ├── auth-deny.conf.ext
│   ├── auth-dict.conf.ext
│   ├── auth-ldap.conf.ext
│   ├── auth-master.conf.ext
│   ├── auth-passwdfile.conf.ext
│   ├── auth-sql.conf.ext
│   ├── auth-static.conf.ext
│   ├── auth-system.conf.ext
│   └── auth-vpopmail.conf.ext
└── dovecot.conf

1 directory, 26 files

I know that Oracle Linux is not CEntOS or Red Hat, but it is binary compatible, I even made a comparison of packages and has practically the same, a few have a different version between red hat 8 and oracle linux 8. I did tests with CEntOS 8 and Red Hat 8 and did not have the same problem, but I need to use Oracle Linux 8 to use the OCFS2 file system supported by Oracle.

I did the test using a local virtual machine via vagrant / virtualbox that you can use to reproduce the error: https://yum.oracle.com/boxes/

Is it possible for you to verify this problem and identify the reason / guide a solution?

Status: 
Fixed (pending)
Virtualmin version: 
6.0
Webmin version: 
1.962

Comments

Ilia's picture
Submitted by Ilia on Fri, 01/22/2021 - 12:36

Hi,

I don't think we officially support Oracle Linux yet.

Is it possible for you to verify this problem and identify the reason / guide a solution?

Yes, though just not right now.

If you run the following command, what output do you get?

systemctl status dovecot
brunno's picture
Submitted by brunno on Fri, 01/22/2021 - 12:50 Pro Licensee

Hi Ilia,

Running this get this return:

Last login: Fri Jan 22 17:43:08 2021 from 10.0.2.2
[vagrant@web3 ~]$ sudo -i
[root@web3 ~]# systemctl status dovecot
● dovecot.service - Dovecot IMAP/POP3 email server
   Loaded: loaded (/usr/lib/systemd/system/dovecot.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:dovecot(1)
           http://wiki2.dovecot.org/
[root@web3 ~]# 

If you run "service dovecot restart", do you then see any errors appearing at the end of either /var/log/messages, /var/log/maillog, or /var/log/secure?

If so, what error message shows up?

I saw the error mentioned in your initial post, though I'm wondering if the log files will show more specific information about the cause of the issue.

It looks like there may be some sort of file Dovecot is trying to load that's failing.

brunno's picture
Submitted by brunno on Fri, 01/22/2021 - 13:53 Pro Licensee

[root@web3 ~]# systemctl restart dovecot
[root@web3 ~]# systemctl status dovecot
● dovecot.service - Dovecot IMAP/POP3 email server
   Loaded: loaded (/usr/lib/systemd/system/dovecot.service; disabled; vendor preset: disabled)
   Active: active (running) since Fri 2021-01-22 19:49:50 UTC; 3s ago
     Docs: man:dovecot(1)
           http://wiki2.dovecot.org/
  Process: 46329 ExecStartPre=/usr/libexec/dovecot/prestartscript (code=exited, status=0/SUCCESS)
 Main PID: 46336 (dovecot)
    Tasks: 4 (limit: 2769)
   Memory: 8.5M
   CGroup: /system.slice/dovecot.service
           ├─46336 /usr/sbin/dovecot -F
           ├─46338 dovecot/anvil
           ├─46339 dovecot/log
           └─46340 dovecot/config

Jan 22 19:49:50 web3.macbook.local systemd[1]: Starting Dovecot IMAP/POP3 email server...
Jan 22 19:49:50 web3.macbook.local systemd[1]: Started Dovecot IMAP/POP3 email server.
Jan 22 19:49:50 web3.macbook.local dovecot[46336]: master: Dovecot v2.3.8 (9df20d2db) starting up for imap, pop3, lmtp
[root@web3 ~]# tail -n20 /var/log/messages /var/log/maillog /var/log/secure
==> /var/log/messages <==
Jan 22 18:24:10 web3 systemd-logind[695]: Session 5 logged out. Waiting for processes to exit.
Jan 22 18:48:10 web3 systemd-logind[695]: New session 7 of user vagrant.
Jan 22 18:48:10 web3 systemd[1]: Started Session 7 of user vagrant.
Jan 22 19:11:43 web3 systemd[1]: Starting dnf makecache...
Jan 22 19:11:44 web3 dnf[46310]: Metadata cache refreshed recently.
Jan 22 19:11:44 web3 systemd[1]: dnf-makecache.service: Succeeded.
Jan 22 19:11:44 web3 systemd[1]: Started dnf makecache.
Jan 22 19:45:23 web3 kernel: hrtimer: interrupt took 10977381 ns
Jan 22 19:49:49 web3 systemd[1]: Starting One-time Dovecot init service...
Jan 22 19:49:49 web3 sh[46322]: Generating a RSA private key
Jan 22 19:49:49 web3 sh[46322]: ..........++++
Jan 22 19:49:50 web3 sh[46322]: ..............................................................................................................................................................++++
Jan 22 19:49:50 web3 sh[46322]: writing new private key to '/etc/pki/dovecot//private/dovecot.pem'
Jan 22 19:49:50 web3 sh[46322]: -----
Jan 22 19:49:50 web3 sh[46322]: subject=OU = IMAP server, CN = imap.example.com, emailAddress = postmaster@example.com
Jan 22 19:49:50 web3 sh[46322]: SHA1 Fingerprint=80:9E:CE:AF:2E:7A:BB:C2:8B:21:BA:FD:13:98:9F:70:48:37:7E:49
Jan 22 19:49:50 web3 systemd[1]: dovecot-init.service: Succeeded.
Jan 22 19:49:50 web3 systemd[1]: Started One-time Dovecot init service.
Jan 22 19:49:50 web3 systemd[1]: Starting Dovecot IMAP/POP3 email server...
Jan 22 19:49:50 web3 systemd[1]: Started Dovecot IMAP/POP3 email server.

==> /var/log/maillog <==
Jan 22 19:49:50 web3 dovecot[46336]: master: Dovecot v2.3.8 (9df20d2db) starting up for imap, pop3, lmtp

==> /var/log/secure <==
Jan 22 17:59:17 web3 useradd[33833]: new user: name=clamscan, UID=986, GID=980, home=/, shell=/sbin/nologin
Jan 22 17:59:18 web3 usermod[33857]: add 'clamscan' to group 'virusgroup'
Jan 22 17:59:18 web3 usermod[33857]: add 'clamscan' to shadow group 'virusgroup'
Jan 22 17:59:19 web3 groupadd[33900]: group added to /etc/group: name=named, GID=25
Jan 22 17:59:19 web3 groupadd[33900]: group added to /etc/gshadow: name=named
Jan 22 17:59:19 web3 groupadd[33900]: new group: name=named, GID=25
Jan 22 17:59:20 web3 useradd[33918]: new user: name=named, UID=25, GID=25, home=/var/named, shell=/bin/false
Jan 22 17:59:21 web3 groupadd[33961]: group added to /etc/group: name=saslauth, GID=76
Jan 22 17:59:21 web3 groupadd[33961]: group added to /etc/gshadow: name=saslauth
Jan 22 17:59:21 web3 groupadd[33961]: new group: name=saslauth, GID=76
Jan 22 17:59:22 web3 useradd[33980]: new user: name=saslauth, UID=985, GID=76, home=/run/saslauthd, shell=/sbin/nologin
Jan 22 18:24:09 web3 sudo[5185]: pam_unix(sudo-i:session): session closed for user root
Jan 22 18:24:10 web3 sshd[5134]: Received disconnect from 10.0.2.2 port 49320:11: disconnected by user
Jan 22 18:24:10 web3 sshd[5134]: Disconnected from user vagrant 10.0.2.2 port 49320
Jan 22 18:24:10 web3 sshd[5118]: pam_unix(sshd:session): session closed for user vagrant
Jan 22 18:48:10 web3 sshd[46232]: Accepted publickey for vagrant from 10.0.2.2 port 51159 ssh2: RSA SHA256:0CcSnDzn/azS3lyJ9o/B9Ahslwa6CQ8tV7zfPEcd0G0
Jan 22 18:48:10 web3 sshd[46232]: pam_unix(sshd:session): session opened for user vagrant by (uid=0)
Jan 22 18:48:13 web3 sudo[46262]: vagrant : TTY=pts/0 ; PWD=/home/vagrant ; USER=root ; COMMAND=/bin/bash
Jan 22 18:48:13 web3 sudo[46262]: pam_systemd(sudo-i:session): Cannot create session: Already running in a session or user slice
Jan 22 18:48:13 web3 sudo[46262]: pam_unix(sudo-i:session): session opened for user root by vagrant(uid=0)
[root@web3 ~]# 
Ilia's picture
Submitted by Ilia on Fri, 01/22/2021 - 14:43

Can you please try:

systemctl enable dovecot
virtualmin config-system -b LAMP
brunno's picture
Submitted by brunno on Fri, 01/22/2021 - 14:46 Pro Licensee

Same error:

[root@web3 ~]# systemctl enable dovecot 
Created symlink /etc/systemd/system/multi-user.target.wants/dovecot.service → /usr/lib/systemd/system/dovecot.service.
[root@web3 ~]# virtualmin config-system -b LAMP
[1/23] Configuring AWStats                                              [  ✔  ]
[2/23] Configuring Apache                                               [  ✔  ]
[3/23] Configuring Bind                                                 [  ✔  ]
[4/23] Configuring ClamAV                                               [  ✔  ]
[5/23] Configuring Dovecot                                              ▒▒▒▒▒▒▒Error: Missing file to read at dovecot::/usr/libexec/webmin/dovecot/dovecot-lib.pl line 276
Error
-----
Missing file to read at dovecot::/usr/libexec/webmin/dovecot/dovecot-lib.pl line 276
-----
[root@wesystemctl status dovecot
● dovecot.service - Dovecot IMAP/POP3 email server
   Loaded: loaded (/usr/lib/systemd/system/dovecot.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2021-01-22 19:49:50 UTC; 55min ago
     Docs: man:dovecot(1)
           http://wiki2.dovecot.org/
 Main PID: 46336 (dovecot)
    Tasks: 4 (limit: 2769)
   Memory: 8.3M
   CGroup: /system.slice/dovecot.service
           ├─46336 /usr/sbin/dovecot -F
           ├─46338 dovecot/anvil
           ├─46339 dovecot/log
           └─46340 dovecot/config

Jan 22 19:49:50 web3.macbook.local systemd[1]: Starting Dovecot IMAP/POP3 email server...
Jan 22 19:49:50 web3.macbook.local systemd[1]: Started Dovecot IMAP/POP3 email server.
Jan 22 19:49:50 web3.macbook.local dovecot[46336]: master: Dovecot v2.3.8 (9df20d2db) starting up for imap, pop3, lmtp
[root@web3 ~]# 
Ilia's picture
Submitted by Ilia on Fri, 01/22/2021 - 14:52

Ahh, okay. I see now.

What are the outputs of:

cat /etc/webmin/dovecot/config
cat /etc/os-release
cat /etc/redhat-release

I think the fix for you would be to adjust dovecot_config option from /etc/webmin/dovecot/config file.

Your OS is not detected correctly, most likely. I will fix that tomorrow, after you provide needed data.

Additionally, what is the output of:

cat /etc/webmin/config
brunno's picture
Submitted by brunno on Fri, 01/22/2021 - 15:00 Pro Licensee

Ilia,

This is the output:
[root@web3 ~]# cat /etc/webmin/dovecot/config
init_script=
dovecot=/usr/local/sbin/dovecot
pid_file=/usr/local/var/run/dovecot/master.pid
dovecot_config=/usr/local/etc/dovecot.conf
[root@web3 ~]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="8.3"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.3"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.3"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:8:3:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"
ORACLE_BUGZILLA_PRODUCT_VERSION=8.3
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=8.3
[root@web3 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.3 (Ootpa)
Another thing, the repo "codeready" or "PowerTools" in Oracle Linux is "ol8_codeready_builder", maybe it is also simple to adjust too, i found this in some oracle linux blog and checked the content of repos (it is the same content, only rebranded): 
root@web3 ~]# dnf repolist
repo id                                                                                    repo name
codeready-builder-for-rhel-8-x86_64-rpms                                                   Oracle Linux 8 CodeReady Builder (x86_64) - Unsupported
epel                                                                                       Extra Packages for Enterprise Linux 8 - x86_64
epel-modular                                                                               Extra Packages for Enterprise Linux Modular 8 - x86_64
extras                                                                                     CentOS Linux 8 - Extras
ol8_UEKR6                                                                                  Latest Unbreakable Enterprise Kernel Release 6 for Oracle Linux 8 (x86_64)
ol8_appstream                                                                              Oracle Linux 8 Application Stream (x86_64)
ol8_baseos_latest                                                                          Oracle Linux 8 BaseOS Latest (x86_64)
ol8_codeready_builder                                                                      Oracle Linux 8 CodeReady Builder (x86_64) - Unsupported
ol8_developer_EPEL                                                                         Oracle Linux 8 EPEL Packages for Development (x86_64)
powertools                                                                                 CentOS Linux 8 - PowerTools
virtualmin                                                                                 RHEL/CentOS 8 - x86_64 - Virtualmin
virtualmin-universal                                                                       Virtualmin Distribution Neutral Packages
[root@web3 ~]# 
brunno's picture
Submitted by brunno on Fri, 01/22/2021 - 15:28 Pro Licensee

Hi again Ilia,

Worked with this:

[root@web3 ~]# virtualmin config-system -b LAMP
[1/23] Configuring AWStats                                              [  ✔  ]
[2/23] Configuring Apache                                               [  ✔  ]
[3/23] Configuring Bind                                                 [  ✔  ]
[4/23] Configuring ClamAV                                               [  ✔  ]
[5/23] Configuring Dovecot                                              [  ✔  ]
[6/23] Configuring Firewalld                                            [  ✔  ]
[7/23] Configuring MySQL                                                [  ✔  ]
[8/23] Configuring NTP                                                  [  ✔  ]
[9/23] Configuring Net                                                  [  ✔  ]
[10/23] Configuring ProFTPd                                             [  ✔  ]
[11/23] Configuring Procmail                                            [  ✔  ]
[12/23] Configuring Quotas                                                     
The filesystem / could not be remounted with quotas enabled.
You will need to reboot your system to enable quotas.                   [  ⚠  ]
[13/23] Configuring SASL                                                [  ✔  ]
[14/23] Configuring Shells                                              [  ✔  ]
[15/23] Configuring SpamAssassin                                        [  ✔  ]
[16/23] Configuring Status                                              [  ✔  ]
[17/23] Configuring Upgrade                                             [  ✔  ]
[18/23] Configuring Usermin                                             [  ✔  ]
[19/23] Configuring Webalizer                                           [  ✔  ]
[20/23] Configuring Webmin                                              [  ✔  ]
[21/23] Configuring Fail2banFirewalld                                   [  ✔  ]
[22/23] Configuring Postfix                                             [  ✔  ]
[23/23] Configuring Virtualmin                                          [  ✔  ]
[root@web3 ~]# cat /etc/webmin/dovecot/config 

pid_file=/var/run/dovecot/master.pid
dovecot_config=/etc/dovecot/dovecot.conf /etc/dovecot.conf
dovecot=/usr/sbin/dovecot
init_script=dovecot
[root@web3 ~]# 
Ilia's picture
Submitted by Ilia on Sun, 01/24/2021 - 10:47

Oracle Linux Server detection will work fine with next Webmin release.

Thanks for reporting.