ZhangHuangbin 写道:

把 loadavg=os.getloadavg(), 这行改为 loadavg=(0, 0, 0), 吧。
这个问题在后面发布的版本里已经修正了,你运行的这个版本太老了。

多谢!问题解决;请问怎么升级到最新版本?我是按照安装文档安装的,怎么是老版本呢。

ZhangHuangbin 写道:

贴一下你原来的 controllers/mysql/basic.py 文件的第 120 到 140 行的内容。

只有#120---#135:
                    web.admindb.delete('updatelog', vars=vars, where='date < $date',)

                    # Insert updating date.
                    web.admindb.insert('updatelog', date=curdate,)
            except Exception, e:
                newVersionInfo = (False, str(e))

        return web.render(
            'dashboard.html',
            version=__version_ose__,
            hostname=getfqdn(),
            uptime=iredutils.get_server_uptime(),
            loadavg=os.getloadavg(),
            netif_data=netif_data,
            newVersionInfo=newVersionInfo,
        )

谢谢

keen 写道:
ZhangHuangbin 写道:

似乎你的系统上的 python 程序无法正常获取系统负载信息。
请修改一下 /var/www/iredadmin/libs/iredutils.py 文件,找到函数 get_system_load_average(),修改为以下代码,然后重启 Apache 再试试。
https://bitbucket.org/zhb/iredadmin-ose … ult#cl-228

你好,在这个文件里面并未找到函数 get_system_load_average();然后我下载了你给我这个文件,覆盖、重启,打开还是“internal server error”。
同时也试了只是添加这个函数到原来那个文件,而不是覆盖,结果也是一样。
想问一下和系统时区有关系吗?我试了Centos和Ubuntu,发现都是这个错误。

试着改了一下时区,也是不行。

ZhangHuangbin 写道:

似乎你的系统上的 python 程序无法正常获取系统负载信息。
请修改一下 /var/www/iredadmin/libs/iredutils.py 文件,找到函数 get_system_load_average(),修改为以下代码,然后重启 Apache 再试试。
https://bitbucket.org/zhb/iredadmin-ose … ult#cl-228

你好,在这个文件里面并未找到函数 get_system_load_average();然后我下载了你给我这个文件,覆盖、重启,打开还是“internal server error”。
同时也试了只是添加这个函数到原来那个文件,而不是覆盖,结果也是一样。
想问一下和系统时区有关系吗?我试了Centos和Ubuntu,发现都是这个错误。

/var/log/httpd/error_log
[Wed Nov 19 00:32:43 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Nov 19 00:32:43 2014] [notice] Digest: generating secret for digest authentication ...
[Wed Nov 19 00:32:43 2014] [notice] Digest: done
[Wed Nov 19 00:32:43 2014] [notice] Apache/2.2.15 (Unix) DAV/2 configured -- resuming normal operations
[Wed Nov 19 00:41:18 2014] [notice] caught SIGTERM, shutting down
[Wed Nov 19 01:04:58 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Nov 19 01:04:58 2014] [notice] Digest: generating secret for digest authentication ...
[Wed Nov 19 01:04:58 2014] [notice] Digest: done
[Wed Nov 19 01:04:58 2014] [notice] Apache/2.2.15 (Unix) DAV/2 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips mod_wsgi/3.2 Python/2.6.6 configured -- resuming normal operations
[Wed Nov 19 02:46:54 2014] [error] [client 108.57.89.222] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /tmUnblock.cgi
[Wed Nov 19 14:11:24 2014] [error] [client 222.221.240.6] File does not exist: /var/www/html/manager
[Wed Nov 19 14:32:31 2014] [error] [client 24.142.39.183] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /tmUnblock.cgi
[Wed Nov 19 14:41:39 2014] [error] [client 37.187.180.168] script not found or unable to stat: /var/www/cgi-bin/php
[Wed Nov 19 14:41:39 2014] [error] [client 37.187.180.168] script not found or unable to stat: /var/www/cgi-bin/php5
[Wed Nov 19 14:41:39 2014] [error] [client 37.187.180.168] script not found or unable to stat: /var/www/cgi-bin/php-cgi
[Wed Nov 19 14:41:40 2014] [error] [client 37.187.180.168] script not found or unable to stat: /var/www/cgi-bin/php.cgi
[Wed Nov 19 14:41:40 2014] [error] [client 37.187.180.168] script not found or unable to stat: /var/www/cgi-bin/php4
[Wed Nov 19 15:37:18 2014] [error] [client 222.124.186.237] File does not exist: /var/www/html/jmx-console


/var/log/httpd/ssl_error_log
[Wed Nov 19 01:04:58 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Nov 19 01:04:58 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Nov 19 01:07:13 2014] [error] [client 27.199.112.14] File does not exist: /var/www/html/favicon.ico
[Wed Nov 19 01:07:42 2014] [error] [client 27.199.112.14] Traceback (most recent call last):
[Wed Nov 19 01:07:42 2014] [error] [client 27.199.112.14]   File "/usr/lib/python2.6/site-packages/web/application.py", line 239, in process
[Wed Nov 19 01:07:42 2014] [error] [client 27.199.112.14]     return self.handle()
[Wed Nov 19 01:07:42 2014] [error] [client 27.199.112.14]   File "/usr/lib/python2.6/site-packages/web/application.py", line 230, in handle
[Wed Nov 19 01:07:42 2014] [error] [client 27.199.112.14]     return self._delegate(fn, self.fvars, args)
[Wed Nov 19 01:07:42 2014] [error] [client 27.199.112.14]   File "/usr/lib/python2.6/site-packages/web/application.py", line 420, in _delegate
[Wed Nov 19 01:07:42 2014] [error] [client 27.199.112.14]     return handle_class(cls)
[Wed Nov 19 01:07:42 2014] [error] [client 27.199.112.14]   File "/usr/lib/python2.6/site-packages/web/application.py", line 396, in handle_class
[Wed Nov 19 01:07:42 2014] [error] [client 27.199.112.14]     return tocall(*args)
[Wed Nov 19 01:07:42 2014] [error] [client 27.199.112.14]   File "/var/www/iredadmin/controllers/decorators.py", line 11, in proxyfunc
[Wed Nov 19 01:07:42 2014] [error] [client 27.199.112.14]     return func(self, *args, **kw)
[Wed Nov 19 01:07:42 2014] [error] [client 27.199.112.14]   File "/var/www/iredadmin/controllers/mysql/basic.py", line 132, in GET
[Wed Nov 19 01:07:42 2014] [error] [client 27.199.112.14]     loadavg=os.getloadavg(),
[Wed Nov 19 01:07:42 2014] [error] [client 27.199.112.14] OSError: Load averages are unobtainable
[Wed Nov 19 01:07:42 2014] [error] [client 27.199.112.14]
[Wed Nov 19 03:27:14 2014] [error] [client 74.208.69.246] script not found or unable to stat: /var/www/cgi-bin/webcm

==== 必填信息。没有填写将不予回复 ====
- iRedMail 版本号:iRedMail-0.8.7
- 使用哪个数据库存储用户帐号(OpenLDAP,MySQL,PostgreSQL):MySQL
- 使用的 Linux/BSD 发行版名称及版本号:Centos6 X64
- 与您的问题相关的日志信息:
====

都安装好了,也可以发邮件,就是https://XXX/iredadmin/登陆后显示“internal server error”,但是如果密码不对会有提示;

谁能帮我看一下,谢谢