1

Topic: new install iredadmin 502 bad gateway

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.0
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: debian buster
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mariadb
- 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.
====

localhost/iredadmin

I get 502 bad gateway

localhost/mail works just fine

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: new install iredadmin 502 bad gateway

How do I check what services are running on debian?

3

Re: new install iredadmin 502 bad gateway

List of services running:

  [ + ]  acpi-fakekey
 [ + ]  acpid
 [ + ]  amavis
 [ - ]  amavis-mc
 [ - ]  amavisd-snmp-subagent
 [ - ]  anacron
 [ - ]  anydesk
 [ + ]  avahi-daemon
 [ + ]  bluetooth
 [ - ]  bootlogd
 [ - ]  bootlogs
 [ - ]  bootmisc.sh
 [ - ]  brightness
 [ + ]  cgmanager
 [ - ]  cgproxy
 [ - ]  checkfs.sh
 [ - ]  checkroot-bootclean.sh
 [ - ]  checkroot.sh
 [ + ]  clamav-daemon
 [ + ]  clamav-freshclam
 [ - ]  console-setup
 [ - ]  console-setup.dpkg-new
 [ - ]  console-setup.sh
 [ + ]  cron
 [ + ]  cups
 [ + ]  cups-browsed
 [ + ]  dbus
 [ + ]  dovecot
 [ + ]  fail2ban
 [ - ]  gpm
 [ - ]  gpm.dpkg-new
 [ + ]  haveged
 [ - ]  hddtemp
 [ - ]  hostname.sh
 [ - ]  keyboard-setup
 [ - ]  keyboard-setup.dpkg-new
 [ - ]  keyboard-setup.sh
 [ - ]  killprocs
 [ + ]  lightdm
 [ - ]  lm-sensors
 [ - ]  lm-sensors.dpkg-new
 [ - ]  mountall-bootclean.sh
 [ - ]  mountall.sh
 [ - ]  mountdevsubfs.sh
 [ - ]  mountkernfs.sh
 [ - ]  mountnfs-bootclean.sh
 [ - ]  mountnfs.sh
 [ + ]  mysql
 [ + ]  network-manager
 [ + ]  nfs-common
 [ - ]  nfs-kernel-server
 [ + ]  nginx
 [ + ]  nmbd
 [ + ]  ntp
 [ - ]  openvpn
 [ + ]  php7.3-fpm
 [ + ]  postfix
 [ - ]  procps
 [ - ]  rc.local
 [ + ]  resolvconf
 [ - ]  rmnologin
 [ + ]  rpcbind
 [ - ]  rsync
 [ + ]  rsyslog
 [ - ]  samba-ad-dc
 [ + ]  saned
 [ - ]  sendsigs
 [ - ]  smartmontools
 [ + ]  smbd
 [ - ]  spamassassin
 [ - ]  spice-vdagent
 [ - ]  stop-bootlogd
 [ - ]  stop-bootlogd-single
 [ - ]  sudo
 [ + ]  tlp
 [ + ]  udev
 [ + ]  udev.dpkg-distrib
 [ - ]  ufw
 [ - ]  umountfs
 [ - ]  umountnfs.sh
 [ - ]  umountroot
 [ - ]  unattended-upgrades
 [ - ]  urandom
 [ + ]  uwsgi
 [ - ]  virtualbox-guest-utils
 [ - ]  virtualbox-guest-utils.dpkg-new
 [ - ]  x11-common

4

Re: new install iredadmin 502 bad gateway

is service "iredadmin" running?

5

Re: new install iredadmin 502 bad gateway

from the post i made above which lists all the services and their status I don't see it in the list. How do I start it?

6

Re: new install iredadmin 502 bad gateway

Just run "service iredadmin restart", what's the output on console?

7

Re: new install iredadmin 502 bad gateway

root@mx:~# service iredadmin restart
iredadmin: unrecognized service

8

Re: new install iredadmin 502 bad gateway

Seems you didn't choose to install iRedAdmin during iRedMail installation.

9

Re: new install iredadmin 502 bad gateway

It looks like it from in this file unless i'm missing something:

Details of this iRedMail installation
Contact photo
From root@mail.dccathome.com on 2020-01-04 17:34
Details
Admin of domain dccathome.com:

    * Account: postmaster@dccathome.com
    * Password: rP[_&7]=

    You can login to iRedAdmin with this account, login name is full email address.

First mail user:
    * Username: postmaster@dccathome.com
    * Password: rP[_&7]=
    * SMTP/IMAP auth type: login
    * Connection security: STARTTLS or SSL/TLS

    You can login to webmail with this account, login name is full email address.

* Enabled services: rsyslog  postfix mysql nginx php7.3-fpm dovecot clamav-daemon amavis clamav-freshclam fail2ban cron nftables


SSL cert keys (size: 2048):
    - /etc/ssl/certs/iRedMail.crt
    - /etc/ssl/private/iRedMail.key

Mail Storage:
    - Mailboxes: /var/vmail/vmail1
    - Mailbox indexes:
    - Global sieve filters: /var/vmail/sieve
    - Backup scripts and backup copies: /var/vmail/backup

Nginx:
    * Configuration files:
        - /etc/nginx/nginx.conf
        - /etc/nginx/sites-available/00-default.conf
        - /etc/nginx/sites-available/00-default-ssl.conf
    * Directories:
        - /etc/nginx
        - /var/www/html
    * See also:
        - /var/www/html/index.html

php-fpm:
    * Configuration files: /etc/php/7.3/fpm/pool.d/www.conf

PHP:
    * PHP config file for Nginx:
    * Disabled functions: posix_uname,eval,pcntl_wexitstatus,posix_getpwuid,xmlrpc_entity_decode,pcntl_wifstopped,pcntl_wifexited,pcntl_wifsignaled,phpAds_XmlRpc,pcntl_strerror,ftp_exec,pcntl_wtermsig,mysql_pconnect,proc_nice,pcntl_sigtimedwait,posix_kill,pcntl_sigprocmask,fput,phpinfo,system,phpAds_remoteInfo,ftp_login,inject_code,posix_mkfifo,highlight_file,escapeshellcmd,show_source,pcntl_wifcontinued,fp,pcntl_alarm,pcntl_wait,ini_alter,posix_setpgid,parse_ini_file,ftp_raw,pcntl_waitpid,pcntl_getpriority,ftp_connect,pcntl_signal_dispatch,pcntl_wstopsig,ini_restore,ftp_put,passthru,proc_terminate,posix_setsid,pcntl_signal,pcntl_setpriority,phpAds_xmlrpcEncode,pcntl_exec,ftp_nb_fput,ftp_get,phpAds_xmlrpcDecode,pcntl_sigwaitinfo,shell_exec,pcntl_get_last_error,ftp_rawlist,pcntl_fork,posix_setuid

MySQL:
    * Root user: root, Password: "rP[_&7]=" (without quotes)
    * Bind account (read-only):
        - Username: vmail, Password: NX1KSBKu07FWfy5GPz0ehmcSWgBQ78
    * Vmail admin account (read-write):
        - Username: vmailadmin, Password: jtgheLEJgutRDHqwcr6cv9DNXSURT5
    * Config file: /etc/mysql/my.cnf
    * RC script: /etc/init.d/mysql

Virtual Users:
    - /root/iRedMail-1.0/samples/iredmail/iredmail.mysql
    - /root/iRedMail-1.0/runtime/*.sql

Backup MySQL database:
    * Script: /var/vmail/backup/backup_mysql.sh
    * See also:
        # crontab -l -u root

Postfix:
    * Configuration files:
        - /etc/postfix
        - /etc/postfix/aliases
        - /etc/postfix/main.cf
        - /etc/postfix/master.cf

    * SQL/LDAP lookup config files:
        - /etc/postfix/mysql

Dovecot:
    * Configuration files:
        - /etc/dovecot/dovecot.conf
        - /etc/dovecot/dovecot-ldap.conf (For OpenLDAP backend)
        - /etc/dovecot/dovecot-mysql.conf (For MySQL backend)
        - /etc/dovecot/dovecot-pgsql.conf (For PostgreSQL backend)
        - /etc/dovecot/dovecot-used-quota.conf (For real-time quota usage)
        - /etc/dovecot/dovecot-share-folder.conf (For IMAP sharing folder)
    * Syslog config file:
        - /etc/rsyslog.d/1-iredmail-dovecot.conf (present if rsyslog >= 8.x)
    * RC script: /etc/init.d/dovecot
    * Log files:
        - /var/log/dovecot/dovecot.log
        - /var/log/dovecot/sieve.log
        - /var/log/dovecot/lmtp.log
        - /var/log/dovecot/lda.log (present if rsyslog >= 8.x)
        - /var/log/dovecot/imap.log (present if rsyslog >= 8.x)
        - /var/log/dovecot/pop3.log (present if rsyslog >= 8.x)
        - /var/log/dovecot/sieve.log (present if rsyslog >= 8.x)
    * See also:
        - /var/vmail/sieve/dovecot.sieve
        - Logrotate config file: /etc/logrotate.d/dovecot

ClamAV:
    * Configuration files:
        - /etc/clamav/clamd.conf
        - /etc/clamav/freshclam.conf
        - /etc/logrotate.d/clamav
    * RC scripts:
            + /etc/init.d/clamav-daemon
            + /etc/init.d/clamav-freshclam

Amavisd-new:
    * Configuration files:
        - /etc/amavis/conf.d/50-user
        - /etc/postfix/master.cf
        - /etc/postfix/main.cf
    * RC script:
        - /etc/init.d/amavis
    * SQL Database:
        - Database name: amavisd
        - Database user: amavisd
        - Database password: QyZYUM7Z9TeB0asFrID1vt6T0ETrAt

DNS record for DKIM support:

; key#1 1024 bits, i=dkim, d=dccathome.com, /var/lib/dkim/dccathome.com.pem
dkim._domainkey.dccathome.com.    3600 TXT (
  "v=DKIM1; p="
  "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMB6aAb8N8TH5QhLBRgay67RPR"
  "FB3ygmWqIpfT+cuHmIs/34fflYZ5bDisnZtzHh8D2QC/0cXc/UAHErVhFNEDNN9u"
  "sgGHVhqTGoi1J5AGfMO1l1W8DezSKa/TzPdfdwrZNex9swBkgNgL8hPV/eXznNPX"
  "fNUyZzXp0NhYlfQJpQIDAQAB")
SpamAssassin:
    * Configuration files and rules:
        - /etc/mail/spamassassin
        - /etc/mail/spamassassin/local.cf

iRedAPD - Postfix Policy Server:
    * Version: 3.3
    * Listen address: 127.0.0.1, port: 7777
    * SQL database account:
        - Database name: iredapd
        - Username: iredapd
        - Password: NX1kpPJ6VqDYXCoP1TKlhxkiAaUUee
    * Configuration file:
        - /opt/iredapd/settings.py
    * Related files:
        - /opt/iRedAPD-3.3
        - /opt/iredapd (symbol link to /opt/iRedAPD-3.3

iRedAdmin - official web-based admin panel:
    * Version: 0.9.9
    * Root directory: /opt/www/iRedAdmin-0.9.9
    * Config file: /opt/www/iRedAdmin-0.9.9/settings.py
    * Web access:
        - URL: https://mail.dccathome.com/iredadmin/
        - Username: postmaster@dccathome.com
        - Password: rP[_&7]=
    * SQL database:
        - Database name: iredadmin
        - Username: iredadmin
        - Password: 62coeOMvC1YdlTNmhnNAcjgIbTAm0z

Roundcube webmail: /opt/www/roundcubemail-1.4.1
    * Config file: /opt/www/roundcubemail-1.4.1/config
    * Web access:
        - URL: http://mail.dccathome.com/mail/ (will be redirected to https:// site)
        - URL: https://mail.dccathome.com/mail/ (secure connection)
        - Username: postmaster@dccathome.com
        - Password: rP[_&7]=
    * SQL database account:
        - Database name: roundcubemail
        - Username: roundcube
        - Password: Wqhfe9xORNDeHGNtS2r0AHftucubVY
    * Cron job:
        - Command: "crontab -l -u root"

netdata (monitor):
    - Config files:
        - All config files: /opt/netdata/etc/netdata
        - Main config file: /opt/netdata/etc/netdata/netdata.conf
        - Modified modular config files:
            - /opt/netdata/etc/netdata/go.d
            - /opt/netdata/etc/netdata/python.d
    - HTTP auth file (if you need a new account to access netdata, please
      update this file with command like 'htpasswd' or edit manually):
        - /etc/nginx/netdata.users
    - Log directory: /opt/netdata/var/log/netdata
    - SQL:
        - Username: netdata
        - Password: B2MnRJA8XaSzsY78lKHEFOLZ2r3cOy
        - NOTE: No database required by netdata.

10

Re: new install iredadmin 502 bad gateway

dcihon wrote:

It looks like it from in this file unless i'm missing something:

This email is just information to tell you that you can login to iRedAdmin with this account, but it's not evidence of iRedAdmin installation.

Do you have directory /opt/www/iredadmin on your system? it's a symbol link of /opt/www/iRedAdmin-x.y.z.

11

Re: new install iredadmin 502 bad gateway

lrwxrwxrwx  1 root      root        24 Jan  4 17:34 iredadmin -> /opt/www/iRedAdmin-0.9.9
dr-xr-xr-x 11 iredadmin iredadmin 4096 Jan  4 18:01 iRedAdmin-0.9.9
lrwxrwxrwx  1 root      root        28 Jan  4 17:34 roundcubemail -> /opt/www/roundcubemail-1.4.1
drwxr-xr-x 13 root      root      4096 Nov 19 14:20 roundcubemail-1.4.1

12

Re: new install iredadmin 502 bad gateway

Try to upgrade iRedAdmin to the latest 1.0, then check whether you have "iredadmin" service and make sure it's running.
FYI: https://docs.iredmail.org/migrate.or.up … admin.html