1 (edited by roshanjonah 2016-02-02 16:03:19)

Topic: Not able to access domain profiles and lot of other pages

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 2.3.1
- Linux/BSD distribution name and version: Ubuntu
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====

I am unable to access a lot of pages in iRedAdmin after upgrade including domain profiles...users page and so on.

When I access them, it says "Internal Server Error" - http://snag.gy/3VHHe.jpg

I checked Nginx log and this is what it says...

ubuntu@ip-172-31-7-104:/var/log/nginx$ tail error.log
2016/02/01 15:02:14 [error] 2279#0: *4557 open() "/var/www/rom-0" failed (2: No such file or directory), client: 46.101.194.4, server: _, request: "GET /rom-0 HTTP/1.1", host: "52.23.148.244"
2016/02/01 16:55:39 [error] 2279#0: *4560 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 5.254.160.135, server: _, request: "GET /start/lt.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.socket:", host: "www.sendtrack.co"
2016/02/01 17:09:57 [error] 2279#0: *4562 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 65.49.9.11, server: _, request: "GET /start/lt.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.socket:", host: "www.sendtrack.co"
2016/02/01 18:30:18 [error] 2279#0: *4565 open() "/var/www/manager/html" failed (2: No such file or directory), client: 171.8.63.71, server: _, request: "GET /manager/html HTTP/1.1", host: "52.23.148.244:80"
2016/02/01 19:22:00 [error] 2279#0: *4566 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 208.52.161.99, server: _, request: "GET /phpmyadmin/scripts/setup.php HTTP/1.0", upstream: "fastcgi://unix:/var/run/php-fpm.socket:"
2016/02/02 00:53:10 [error] 2279#0: *4574 open() "/var/www/clientaccesspolicy.xml" failed (2: No such file or directory), client: 54.161.51.139, server: _, request: "GET /clientaccesspolicy.xml HTTP/1.1", host: "52.23.148.244"
2016/02/02 01:52:15 [error] 2279#0: *4577 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 209.147.123.5, server: _, request: "GET /start/lt.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.socket:", host: "www.sendtrack.co"
2016/02/02 04:05:49 [error] 2279#0: *4581 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 67.224.79.5, server: _, request: "GET /start/lt.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.socket:", host: "www.sendtrack.co"
2016/02/02 06:14:22 [error] 2279#0: *4584 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 208.52.154.243, server: _, request: "GET /sqlmanager/scripts/setup.php HTTP/1.0", upstream: "fastcgi://unix:/var/run/php-fpm.socket:"
2016/02/02 06:52:46 [error] 2279#0: *4593 open() "/var/www/favicon.ico" failed (2: No such file or directory), client: 183.82.70.71, server: _, request: "GET /favicon.ico HTTP/1.1", host: "m.checkmail.nz", referrer: "https://m.checkmail.nz/iredadmin/login? … ON_EXPIRED"

I am not sure what to do.

----

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

2

Re: Not able to access domain profiles and lot of other pages

Any related error in uwsgi log file (/var/log/uwsgi*)?

3

Re: Not able to access domain profiles and lot of other pages

Here is the tail...

root@ip-172-31-7-104:/var/log/uwsgi/app# tail --lines=20 iredadmin.log
    return self.handle()
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 420, in _delegate
    return handle_class(cls)
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 396, in handle_class
    return tocall(*args)
  File "/opt/www/iRedAdmin-Pro-SQL-2.3.1/libs/sqllib/decorators.py", line 26, in proxyfunc
    return func(*args, **kw)
  File "/opt/www/iRedAdmin-Pro-SQL-2.3.1/controllers/sql/domain.py", line 156, in GET
    qr = iredapd_greylist.get_greylist_setting_and_whitelists(account='@' + self.domain)
  File "/opt/www/iRedAdmin-Pro-SQL-2.3.1/libs/iredapd/greylist.py", line 10, in get_greylist_setting_and_whitelists
    gl = Greylisting()
  File "/opt/www/iRedAdmin-Pro-SQL-2.3.1/libs/iredapd/__init__.py", line 44, in __init__
    self.db.supports_multiple_insert = True
AttributeError: 'Greylisting' object has no attribute 'db'

m.checkmail.nz [pid: 2745|app: 0|req: 7/14] 183.82.70.71 () {52 vars in 1183 bytes} [Tue Feb  2 08:02:45 2016] GET /iredadmin/profile/domain/general/angelsfashion.co.nz => generated 21 bytes in 6 msecs (HTTP/1.1 500) 2 headers in 165 bytes (2 switches on core 0)
m.checkmail.nz [pid: 2746|app: 0|req: 8/15] 52.90.128.17 () {44 vars in 553 bytes} [Tue Feb  2 08:03:16 2016] GET /iredadmin/login => generated 4937 bytes in 219 msecs (HTTP/1.1 200) 1 headers in 121 bytes (3 switches on core 0)
m.checkmail.nz [pid: 2745|app: 0|req: 8/16] 52.90.128.17 () {44 vars in 553 bytes} [Tue Feb  2 12:09:11 2016] GET /iredadmin/login => generated 4937 bytes in 209 msecs (HTTP/1.1 200) 1 headers in 121 bytes (3 switches on core 0)

4

Re: Not able to access domain profiles and lot of other pages

*) Remove all "policyd_" settings in iRedAdmin-Pro config file.
*) Make sure you have "iredapd_*" settings in iRedAdmin-Pro config file, like this:

iredapd_enabled = True
iredapd_db_host = '127.0.0.1'
iredapd_db_port = '3306'
iredapd_db_name = 'iredapd'
iredapd_db_user = 'iredapd'
iredapd_db_password = 'password'

*) Restart uwsgi service.

5

Re: Not able to access domain profiles and lot of other pages

Where exactly is the iRedAdmin-Pro config file? As in the location...

And what is the command to restart uwsgi service in Ubuntu?

Thank you!
RJ

6

Re: Not able to access domain profiles and lot of other pages

roshanjonah wrote:

Where exactly is the iRedAdmin-Pro config file? As in the location...

You can find it here:
http://www.iredmail.org/docs/file.locat … #iredadmin

roshanjonah wrote:

And what is the command to restart uwsgi service in Ubuntu?

run "service uwsgi restart".

7

Re: Not able to access domain profiles and lot of other pages

I changed all "policyd_" to "iredapd_" and restarted the uwsgi service. I am still getting the internal server error when browsing domain profiles, unfortunately

8

Re: Not able to access domain profiles and lot of other pages

roshanjonah wrote:

I changed all "policyd_" to "iredapd_"

d you have correct sql username and password for iRedAPD database?

9

Re: Not able to access domain profiles and lot of other pages

I don't think I have iRedAPD database...I am not sure where to get those details from either.

10

Re: Not able to access domain profiles and lot of other pages

You should upgrade iRedAPD-1.8.0 first, the upgrade script will create required sql database.

11

Re: Not able to access domain profiles and lot of other pages

I only use iredadmin as far as I know. I don't think I have ever installed iRedAPD. This problem is when I login to my iredadmin panel and try to click on one of the domain profiles.

12

Re: Not able to access domain profiles and lot of other pages

*) iRedAPD is a postfix policy server used for white/blacklisting, greylisting, throttling.
*) The latest iRedAPD is 1.8.0, if you're running an old iRedAPD release, please upgrade it by following our tutorial here:
http://www.iredmail.org/docs/upgrade.iredapd.html

13

Re: Not able to access domain profiles and lot of other pages

That makes sense.

So how do I know which version I'm running. And every time there is an upgrade available...do I need to update this as well?

14

Re: Not able to access domain profiles and lot of other pages

iRedAPD was installed under /opt, you can check it there.

15

Re: Not able to access domain profiles and lot of other pages

I just upgraded iRedAPD to 1.8.0 but still getting the internal server error. Please help

16

Re: Not able to access domain profiles and lot of other pages

ZhangHuangbin wrote:

iRedAPD was installed under /opt, you can check it there.

Can you please help? I upgraded but still the same issue.

17

Re: Not able to access domain profiles and lot of other pages

Fixed on @roshanjonah's server, caused due to not upgrade iRedMail (from 0.9.2) to the latest release -- some new sql columns were missing.