1 (edited by postmasters 2012-04-13 07:16:26)

Topic: mysql problems in debian

==== Provide required information to help troubleshoot and get quick answer ====
- iRedMail version:
- Linux/BSD distribution name and version:
- Any related log? Log is helpful for troubleshooting.
====

So I figured I should give iRedmail a shot since my exim-setup have seen better days.

Found a howto on howtoforge and the one on this site.
Worked great until I was to login and got this error:

[client 192.168.0.20] Traceback (most recent call last):
[client 192.168.0.20]   File "/usr/lib/pymodules/python2.6/web/application.py", line 242, in process
[client 192.168.0.20]     return self.handle()
[client 192.168.0.20]   File "/usr/lib/pymodules/python2.6/web/application.py", line 233, in handle
[client 192.168.0.20]     return self._delegate(fn, self.fvars, args)
[client 192.168.0.20]   File "/usr/lib/pymodules/python2.6/web/application.py", line 415, in _delegate
[client 192.168.0.20]     return handle_class(cls)
[client 192.168.0.20]   File "/usr/lib/pymodules/python2.6/web/application.py", line 390, in handle_class
[client 192.168.0.20]     return tocall(*args)
[client 192.168.0.20]   File "/usr/share/apache2/iredadmin/controllers/mysql/basic.py", line 38, in POST
[client 192.168.0.20]     auth_result = auth.auth(username=username, password=password)
[client 192.168.0.20]   File "/usr/share/apache2/iredadmin/libs/mysql/core.py", line 189, in auth
[client 192.168.0.20]     limit=1,
[client 192.168.0.20]   File "/usr/lib/pymodules/python2.6/web/db.py", line 649, in select
[client 192.168.0.20]     return self.query(qout, processed=True)
[client 192.168.0.20]   File "/usr/lib/pymodules/python2.6/web/db.py", line 611, in query
[client 192.168.0.20]     self._db_execute(db_cursor, sql_query)
[client 192.168.0.20]   File "/usr/lib/pymodules/python2.6/web/db.py", line 562, in _db_execute
[client 192.168.0.20]     out = cur.execute(sql_query.query(paramstyle), sql_query.values())
[client 192.168.0.20]   File "/usr/lib/pymodules/python2.6/MySQLdb/cursors.py", line 166, in execute
[client 192.168.0.20]     self.errorhandler(self, exc, value)
[client 192.168.0.20]   File "/usr/lib/pymodules/python2.6/MySQLdb/connections.py", line 35, in defaulterrorhandler
[client 192.168.0.20]     raise errorclass, errorvalue
[client 192.168.0.20] ProgrammingError: (1146, "Table 'vmail.admin' doesn't exist")

Some google searches hinted at how to create some vmail.log but that did not help to replicate with vmail.admin.
So is there a vmail.sql I could import or something?

Debian 6.0.4 running the latest stable code there is on debian.
Note, this happens when I try to login using the admin created adress in the script on the iredadmin-page.

Edit: removed some date stamps in the errorlog

----

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

2

Re: mysql problems in debian

postmasters wrote:

[client 192.168.0.20] ProgrammingError: (1146, "Table 'vmail.admin' doesn't exist")

You can find MySQL template shipped in iRedMail. For example: iRedMail-0.7.4/samples/iredmail.mysql:

CREATE TABLE IF NOT EXISTS admin (
    username VARCHAR(255) NOT NULL DEFAULT '', 
    password VARCHAR(255) NOT NULL DEFAULT '', 
    name VARCHAR(255) NOT NULL DEFAULT '', 
    language VARCHAR(5) NOT NULL DEFAULT 'en_US',
    passwordlastchange DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
    created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
    modified DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
    expired DATETIME NOT NULL DEFAULT '9999-12-31 00:00:00',
    active TINYINT(1) NOT NULL DEFAULT 1,
    PRIMARY KEY (username),
    INDEX (passwordlastchange),
    INDEX (expired),
    INDEX (active)
) ENGINE=MyISAM;

Confused why it was imported during iRedMail installation.

3

Re: mysql problems in debian

ZhangHuangbin wrote:
postmasters wrote:

[client 192.168.0.20] ProgrammingError: (1146, "Table 'vmail.admin' doesn't exist")

You can find MySQL template shipped in iRedMail. For example: iRedMail-0.7.4/samples/iredmail.mysql:

CREATE TABLE IF NOT EXISTS admin (
    username VARCHAR(255) NOT NULL DEFAULT '', 
    password VARCHAR(255) NOT NULL DEFAULT '', 
    name VARCHAR(255) NOT NULL DEFAULT '', 
    language VARCHAR(5) NOT NULL DEFAULT 'en_US',
    passwordlastchange DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
    created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
    modified DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
    expired DATETIME NOT NULL DEFAULT '9999-12-31 00:00:00',
    active TINYINT(1) NOT NULL DEFAULT 1,
    PRIMARY KEY (username),
    INDEX (passwordlastchange),
    INDEX (expired),
    INDEX (active)
) ENGINE=MyISAM;

Confused why it was imported during iRedMail installation.


I believe there is two db's in mysql, so where should I import it? I had to manually create the vmail-db. Strange.

4

Re: mysql problems in debian

May i know which backend you chose during iRedMail installation? OpenLDAP or MySQL?
If OpenLDAP, there's no need to create "vmail" database at all.

5

Re: mysql problems in debian

Using mysql, as off now. Might end up using ldap wink

6

Re: mysql problems in debian

Just tried it on a fresh debian setup - works just fine. No able to test it on a networked setup yet. But no problems with db's yet.