Topic: Install Hangs while creating database
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2 from GitHub, Commit: c19db01
- Deployed with iRedMail Easy or the downloadable installer? Download
- Linux/BSD distribution name and version: FreeBSD 12.1-RELEASE-p10 (fresh install on VM)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL (12)
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
NOTE: This is a Test/Report install from the code 1.3.2 on Github (Commit: c19db01) on FreeBSD!!!
The installation hangs while creating the database.
I tested v1.3[.1] when it came out and it had the same error. I did not bother as 1.3[.1] is not FreeBSD ready.
But now digging a bit more, this issues does not look related with the Python2/3 migration.
I am running VMWare Fusion 10.1.6 (macOS) 16Gb
VM: 1Gb memory, 20Gb disk, with 17 data/ 3 swap. // Only to test installation, not to run anything.
# = = = = = = = = = =
# bash iRedMail.sh
...
====> Compressing man pages (compress-man)
===>  Installing for logwatch-7.5.1
===>  Checking if logwatch is already installed
===>   Registering installation for logwatch-7.5.1
Installing logwatch-7.5.1...
===>  Cleaning for logwatch-7.5.1
[ INFO ] Total time of ports compiling: 3 seconds, ~= 0 minute(s)
********************************************************************
* Start iRedMail Configurations
********************************************************************
[ INFO ] Generate self-signed SSL cert (4096 bits, expire in 10 years).
[ INFO ] Generate Diffie Hellman Group with openssl, please wait.
[ INFO ] Create required system accounts.
[ INFO ] Configure PostgreSQL database server.
(( Hangs Here ))
# = = = = = = = = = =
# cat ./runtime/install.log
...
creating directory /var/db/postgres/data12 ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Australia/Victoria
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
    /usr/local/bin/pg_ctl -D /var/db/postgres/data12 -l logfile start
 + < DEBUG > Make sure PostgreSQL binds to local address: 127.0.0.1.
 + < DEBUG > Set client_min_messages to ERROR.
 + < DEBUG > Copy iRedMail SSL cert/key with strict permission.
 + < DEBUG > Start PostgreSQL server and sleep 5 seconds for initialization
pg_ctl: PID file "/var/db/postgres/data12/postmaster.pid" does not exist
Is server running?
 + < DEBUG > Setting password for PostgreSQL admin: (postgres).
ALTER ROLE
 + < DEBUG > Update pg_hba.conf to force local users to authenticate with md5.
 + < DEBUG > Restart PostgreSQL server and sleeping for 5 seconds.
 + < DEBUG > Generate /var/db/postgres/.pgpass.
 + < DEBUG > Generate sample SQL templates.
 + < DEBUG > Create roles (vmail, vmailadmin) and database: vmail.
CREATE ROLE
CREATE ROLE
CREATE DATABASE
ALTER DATABASE
 + < DEBUG > Create tables in vmail database.
(( Hangs Here ))
# = = = = = = = = = =
# ls -l /var/db/postgres/data12/postmaster.pid
-rw-------  1 postgres  postgres  89  9 Oct 15:54 /var/db/postgres/data12/postmaster.pid
# cat /var/db/postgres/data12/postmaster.pid
7323
/var/db/postgres/data12
1602219272
5432
/tmp
127.0.0.1
  5432001    458752
ready   
# = = = = = = = = = =
# cat ./runtime/install.status
...
export status_install_port_security_pyfail2ban='processing'
export status_install_port_security_pyfail2ban='DONE'  # 25 seconds, ~= 0 minute(s).
export status_install_port_sysutils_logwatch='processing'
export status_install_port_sysutils_logwatch='DONE'  # 3 seconds, ~= 0 minute(s).
export status_post_install_cleanup='DONE'
export status_generate_ssl_keys="DONE"
export status_add_user_vmail="DONE"
export status_add_user_mlmmj="DONE"
export status_add_user_iredadmin="DONE"
export status_add_user_iredapd="DONE"
export status_pgsql_initialize="DONE"
(( Hangs Here ))
# = = = = = = = = = =
# cat /var/log/messages
Oct  9 15:51:12 server pkg-static[78891]: py38-psycopg2-2.8.6 installed
Oct  9 15:51:57 server pkg-static[77117]: py38-sqlite3-3.8.6_7 installed
Oct  9 15:51:59 server pkg-static[23931]: py38-sqlalchemy10-1.0.14 installed
Oct  9 15:52:56 server pkg-static[63957]: py38-cython-0.29.15 installed
Oct  9 15:53:14 server pkg-static[4990]: py38-pycryptodome-3.9.8 installed
Oct  9 15:53:15 server pkg-static[57089]: py38-dnspython-1.16.0 installed
Oct  9 15:53:19 server pkg-static[35984]: py38-webpy-0.61 installed
Oct  9 15:53:24 server pkg-static[19996]: py38-simplejson-3.17.2 installed
Oct  9 15:53:47 server pkg-static[7589]: libinotify-20180201_2 installed
Oct  9 15:53:48 server pkg-static[71830]: py38-pyinotify-0.9.6 installed
Oct  9 15:53:49 server pkg-static[35786]: py38-fail2ban-0.11.1_1 installed
Oct  9 15:53:52 server pkg-static[67552]: logwatch-7.5.1 installed
Oct  9 15:55:37 server postgres[19844]: [6-1] 2020-10-09 15:55:37.460 AEDT [19844] FATAL:  canceling authentication due to timeout
(( Last message ))
# = = = = = = = = = =
# top
last pid: 53822;  load averages:  0.45,  0.47,  0.43                                                      up 0+08:08:55  19:58:10
48 processes:  1 running, 45 sleeping, 2 stopped
CPU:  0.0% user,  0.0% nice,  0.4% system,  0.0% interrupt, 99.6% idle
Mem: 17M Active, 972M Inact, 27M Laundry, 439M Wired, 132M Buf, 525M Free
Swap: 3072M Total, 3072M Free
  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
53822 root          1  20    0    13M  3828K RUN      0:00   0.03% top
27034 sysadmin      1  20    0    20M  6968K select   0:02   0.02% sshd
62262 ntpd          1  20    0    16M    16M select   0:02   0.00% ntpd
17008 root          1  20    0    11M  2648K select   0:00   0.00% syslogd
91763 sysadmin      1  20    0    20M  6972K select   1:25   0.00% sshd
75450 root          1  20    0    11M  2324K piperd   0:03   0.00% tee
 7323 postgres      1  20    0   172M    29M select   0:01   0.00% postgres
75263 root          1  52    0    15M  5908K wait     0:00   0.00% bash
 8665 postgres      1  20    0    30M    19M select   0:00   0.00% postgres
27997 root          1  20    0    13M  3848K pause    0:00   0.00% csh
 7726 postgres      1  20    0   172M    29M select   0:00   0.00% postgres
 8239 postgres      1  20    0   173M    30M select   0:00   0.00% postgres
 7747 postgres      1  20    0   172M    29M select   0:00   0.00% postgres
# = = = = = = = = = =
# ps aux
USER       PID  %CPU %MEM    VSZ   RSS TT  STAT STARTED      TIME COMMAND
. . .
postgres  7323   0.0  1.5 176356 30124  -  Ss   15:54     0:00.54 /usr/local/bin/postgres -D /var/db/postgres/data12
postgres  7457   0.0  1.5 176388 30408  -  Is   15:54     0:00.02 postgres: checkpointer    (postgres)
postgres  7726   0.0  1.5 176356 30132  -  Ss   15:54     0:00.14 postgres: background writer    (postgres)
postgres  7747   0.0  1.5 176356 30132  -  Ss   15:54     0:00.12 postgres: walwriter    (postgres)
postgres  8239   0.0  1.5 176868 30436  -  Ss   15:54     0:00.12 postgres: autovacuum launcher    (postgres)
postgres  8665   0.0  0.9  30780 19124  -  Ss   15:54     0:00.16 postgres: stats collector    (postgres)
postgres  9040   0.0  1.5 176756 30328  -  Is   15:54     0:00.02 postgres: logical replication launcher    (postgres)
root     17008   0.0  0.1  11400  2648  -  Ss   11:49     0:00.08 /usr/sbin/syslogd -ss
postgres 19743   0.0  1.5 177288 31264  -  Is   15:54     0:00.00 postgres: postgres template1 [local]  (postgres)
ntpd     62262   0.0  0.8  16600 16676  -  Ss   11:49     0:01.56 /usr/sbin/ntpd -p /var/db/ntp/ntpd.pid -c /etc/ntp.conf -f /var
root     71111   0.0  0.1  11400  2724  -  Is   11:49     0:00.10 /usr/sbin/cron -s
root     18710   0.0  0.2  12084  3384  0  T+   15:54     0:00.00 su - postgres -c psql -d template1 -f /var/db/postgres/data12/i
postgres 19077   0.0  0.4  17496  7504  0  T    15:54     0:00.00 psql -d template1 -f /var/db/postgres/data12/iredmail.sql
root     75263   0.0  0.3  15640  5908  0  I+   12:44     0:00.36 bash iRedMail.sh
root     23119   0.0  0.1  10780  2376  1  I+   12:45     0:00.01 tail -f install.log
root     23061   0.0  0.1  10780  2376  2  I+   12:45     0:00.00 tail -f install.status
root     54504   0.0  0.2  11900  3268  3  R+   19:58     0:00.00 ps aux
# = = = = = = = = = =
# pkg info | grep -E "(python|post)"
postfix-3.5.7,1                Secure alternative to widely-used Sendmail
postgresql12-client-12.4       PostgreSQL database (client)
postgresql12-contrib-12.4      The contrib utilities from the PostgreSQL distribution
postgresql12-server-12.4_1     PostgreSQL is the most advanced open-source database available anywhere
python38-3.8.6                 Interpreted object-oriented programming language
# = = = = = = = = = =
# uname -a
12.1-RELEASE-p10 FreeBSD 12.1-RELEASE-p10 GENERIC  amd64
# ulimit -a
cpu time               (seconds, -t)  unlimited
file size           (512-blocks, -f)  unlimited
data seg size           (kbytes, -d)  33554432
stack size              (kbytes, -s)  524288
core file size      (512-blocks, -c)  unlimited
max memory size         (kbytes, -m)  unlimited
locked memory           (kbytes, -l)  unlimited
max user processes              (-u)  6656
open files                      (-n)  57852
virtual mem size        (kbytes, -v)  unlimited
swap limit              (kbytes, -w)  unlimited
socket buffer size       (bytes, -b)  unlimited
pseudo-terminals                (-p)  unlimited
kqueues                         (-k)  unlimited
umtx shared locks               (-o)  unlimitedStay safe. Cheers
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.


