1 (edited by redshirt 2012-11-27 11:09:57)

Topic: Internal Server Error, new install

==== Required information ====
- iRedMail version: 0.8.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: PC-BSD 9.1-RC3, amd64, freebsd, in jail
- Related log if you're reporting an issue: /var/log/httpd-error.log
====

New install into a jail. Navigate to https://blahmail.blah.net/iredadmin/

Get: Internal Server Error

/var/log/httpd-error.log has this line:

[error] [client 192.168.0.123] OperationalError: (1130, "Host 'blahmail' is not allowed to connect to this MySQL server")


Seems like a strange error on a fresh installation! Any ideas how to proceed?

2

Re: Internal Server Error, new install

Did you install iRedMail STRICTLY by following our wiki tutorial here:
http://www.iredmail.org/wiki/index.php? … eeBSD.Jail

iRedMail-0.8.3 should grant access permissions for Jail hostname. Could you please check the permissions in "User" table of MySQL database "mysql"?

3

Re: Internal Server Error, new install

Not exactly. Bash-static was not available as a pkg, so that was built. The install command I used was simply 'bash iRedMail.sh'. postfix27 had to be built and the '.status' was manually updated. The install complained about the hosts file, but it was looking for the full server name in the local 127.0.0.1 - fixed.

phpMyAdmin does not seem to be accessible.

mysql is running, but 'show databases;' only lists the information schema and an empty 'test' database.

4 (edited by redshirt 2012-11-27 11:06:31)

Re: Internal Server Error, new install

A little more digging and there is no database at /var/lib/ (per .tips file):

root@blahmail:/var/lib # ll
total 17
drwxr-xr-x  2 vscan  vscan  3 Nov 25 23:16 dkim/
drwxr-xr-x  3 root   wheel  3 Nov 25 23:16 dovecot/

but it is here:

root@blahmail:/var/db # ll
total 110
drwxr-xr-x    2 clamav    clamav      6 Nov 27 02:20 clamav/
drwxr-x---    2 root      wheel       5 Nov 26 14:45 dovecot/
drwx------    2 operator  operator   10 Nov 27 02:55 entropy/
drwx------    2 root      wheel       2 Nov  5 21:27 freebsd-update/
drwx------    2 root      wheel       2 Nov  5 21:27 ipf/
-rw-r--r--    1 nobody    wheel       0 Nov  5 21:28 locate.database
drwxr-xr-x    5 mysql     mysql      10 Nov 26 02:19 mysql/
drwxr-xr-x  169 root      wheel     169 Nov 25 23:15 pkg/
drwxr-xr-x   40 root      wheel      40 Nov 25 20:17 ports/
drwxr-xr-x    2 root      wheel       2 Nov  5 21:27 portsnap/
drwx------    2 postfix   wheel       4 Nov 27 01:54 postfix/
drwxr-xr-x    4 root      wheel       4 Nov 25 23:19 spamassassin/

and in mysql folder...

root@blahmail:/var/db/mysql # ll
total 28752
-rw-rw----  1 mysql  mysql   5242880 Nov 26 02:19 ib_logfile0
-rw-rw----  1 mysql  mysql   5242880 Nov 25 23:15 ib_logfile1
-rw-rw----  1 mysql  mysql  18874368 Nov 26 02:19 ibdata1
-rw-rw----  1 mysql  mysql      4627 Nov 26 02:19 blahmail.blah.net.err
-rw-rw----  1 mysql  mysql         6 Nov 26 02:19 blahmail.blah.net.pid
drwx------  2 mysql  mysql        74 Nov 25 23:15 mysql/
drwx------  2 mysql  mysql        20 Nov 25 23:15 performance_schema/
drwx------  2 mysql  mysql         2 Nov 25 23:15 test/

The error log shows this:

121126 02:19:17 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
121126  2:19:17 InnoDB: The InnoDB memory heap is disabled
121126  2:19:17 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121126  2:19:17 InnoDB: Compressed tables use zlib 1.2.7
121126  2:19:17 InnoDB: Initializing buffer pool, size = 128.0M
121126  2:19:17 InnoDB: Completed initialization of buffer pool
121126  2:19:17 InnoDB: highest supported file format is Barracuda.
121126  2:19:17  InnoDB: Waiting for the background threads to start
121126  2:19:18 InnoDB: 1.1.8 started; log sequence number 1595675
121126  2:19:18 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
121126  2:19:18 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
121126  2:19:18 [Note] Server socket created on IP: '0.0.0.0'.
121126  2:19:18 [Note] Event Scheduler: Loaded 0 events
121126  2:19:18 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.5.28'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution

It would seem the bind address is empty. Can I fix that or should I reinstall with the exact command for bash?

5 (edited by redshirt 2012-11-28 10:06:24)

Re: Internal Server Error, new install

==== Required information ====
- iRedMail version: 0.8.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: PC-BSD 9.1-RC3, amd64, freebsd, in jail
- Related log if you're reporting an issue: /var/log/httpd-error.log
====

OK, install is working now. I used the exact instructions for the install script:

Jail # bash
bash # cd /root/iRedMail/
bash # LOCAL_ADDRESS='192.168.xxx.nnn' bash iRedMail.sh

where xxx.nnn are actual numbers for the jail ip address.

Also note that the change in the hostname is required in /etc/rc.conf (not hosts):

hostname="jailserver.domain.net"

For this jail 'The Warden' software is used to setup the jails. (PC-BSD specific gui for jail management.) The nice thing is it can load some default configs at setup if desired, and can assign each jail its own zfs file system (cool advanced file system).

Now all I have to do is move my old emails over to the new server.

Thank you Zhang!

PS: postfix27 installed without intervention required this time.

6

Re: Internal Server Error, new install

Thanks for your feedback, and glad to hear that it now works for you.

redshirt wrote:

Also note that the change in the hostname is required in /etc/rc.conf (not hosts):
hostname="jailserver.domain.net"

Tutorial was updated to include this fix: Add FQDN hostname in /[JAIL]/etc/rc.conf.