1

Topic: Moved index.html - now "DATABASE ERROR: CONNECTION FAILED!"

==== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Debian 7.4 - Kernal: 3.2.0-4-amd64
- Related log if you're reporting an issue:
====

I am running several small sites on my server, so I keep each site in its own directory in the var/www (i.e /var/www/123.com & /var/www/321.com)

So knowing this, it is not practical to keep the source index in the var/www root, as I am not really able to access it (hosts file auto points to the default site).

So I moved the index.html and robots.txt to /var/www/123.com/email/...

Although when I goto this in the browser, I get

DATABASE ERROR: CONNECTION FAILED!

Unable to connect to the database!
Please contact your server-administrator.

I do not think this problem will be that hard to fix, I am assuming some text file(s) that need the updated directory location..

----

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

2

Re: Moved index.html - now "DATABASE ERROR: CONNECTION FAILED!"

This error is displayed by Roundcube webmail program, not caused by moving index.html.

As clearly mentioned in iRedMail installation guide, iRedMail requires a new/clean/fresh server OS. Do you have Apache/MySQL/PHP installed on this server before installing iRedMail?

3 (edited by kyij 2014-03-19 10:30:41)

Re: Moved index.html - now "DATABASE ERROR: CONNECTION FAILED!"

ZhangHuangbin wrote:

This error is displayed by Roundcube webmail program, not caused by moving index.html.

As clearly mentioned in iRedMail installation guide, iRedMail requires a new/clean/fresh server OS. Do you have Apache/MySQL/PHP installed on this server before installing iRedMail?

Yes, I installed it on a new server. I actually wiped my old one, just to get this working.. and have been spending days to get it going again. Yet this is now happening.

Yes I had everything installed before installing iRedMail.. I even checked to make sure it was working when done (and it did).

I have installed my various other things (mainly samba, ftpd, zfs) and have worked on getting the sites back online.
At one point I deleted the whole /www/ file when I was trying to diagnose a problem. But I have made a new one, and reinstalled iRedMail..

I know your going to say that it is due to the reinstall - which I did to get the index files back - which it did, but is not working. I only did this since other people on forums said it was only thing to do, to get files back. But everything remained the same (server name, hosts, etc).

In between the old install and new install of iRedmail, I have changed the mysql password if that will make a difference in some conf file too..

I mean I could reinstall [debian] again, but I really get annoyed doing it for the 3rd time.. I do not see why iredmail has to be *so* "complex."

4

Re: Moved index.html - now "DATABASE ERROR: CONNECTION FAILED!"

kyij wrote:

I mean I could reinstall [debian] again, but I really get annoyed doing it for the 3rd time.. I do not see why iredmail has to be *so* "complex."

When a fresh server OS (e.g. Debian in your case), we can know what files a deb package will install on file system, we know the file location, parameters in config files and their format (syntax, space, etc), then a shell script can update it to what we need.

With pre-installed components, we don't know what you changed, maybe you moved some parameters to another file, you renamed a main config file, etc.

That's why we can get a fully working mail server with iRedMail in minutes. You can say it's complex, but i have to say, this is the simplest complexity.

5

Re: Moved index.html - now "DATABASE ERROR: CONNECTION FAILED!"

ZhangHuangbin wrote:
kyij wrote:

I mean I could reinstall [debian] again, but I really get annoyed doing it for the 3rd time.. I do not see why iredmail has to be *so* "complex."

When a fresh server OS (e.g. Debian in your case), we can know what files a deb package will install on file system, we know the file location, parameters in config files and their format (syntax, space, etc), then a shell script can update it to what we need.

With pre-installed components, we don't know what you changed, maybe you moved some parameters to another file, you renamed a main config file, etc.

That's why we can get a fully working mail server with iRedMail in minutes. You can say it's complex, but i have to say, this is the simplest complexity.

I do understand. I just figured it would be more like ownCloud, where you can put the install directory in one of your site files, point to the storage (vmail file) and have a few other pointer files. Although I am not in the position to complain as I do not help with code, and this is free. I just feel like it could be easier.

Is it practical to have this run on a server with such things that I have going? (zfs, web hosting, samba, ftpd, etc) as I feel this is bound to happen. Also the iredmail is preventing me from installing a ssl to my apache server.

I would really like to get this to work, as many have said good things. I just would like to keep it on one server, to keep costs and simplicity to a minimum.

6

Re: Moved index.html - now "DATABASE ERROR: CONNECTION FAILED!"

Well would it be easier to try and getting it going on this server, run iRedMail on a VM or just have another computer run it (Like the odroid U3), but it would have to connect to the site. So I can go to my domain and access the webmail.

7

Re: Moved index.html - now "DATABASE ERROR: CONNECTION FAILED!"

Just want to repeat the warning message in iRedMail installation guide:

WARNING: iRedMail is designed to be deployed on a FRESH server system, which means your server does NOT have mail related components installed, e.g. MySQL, OpenLDAP, Postfix, Dovecot, Amavisd, etc (iRedMail will install and configure them for you automatically). Otherwise it may override your existing files/configurations althought it will backup files before modifing, and it may be not working as expected.

The problem is not iRedMail cannot work with other components, but you have to be clear which components should be ready first.

For example:

*) ZFS is a file system, it's not related to any network services, so it's ok to get it ready before installing iRedMail.
*) Web hosting with Apache: iRedMail will install Apache during installation, so it's better to tune it to fit your needs after iRedMail installation.
*) Samba/FTP are not part of iRedMail components, so it's ok to install/configure them after iRedMail installation.

Personally, i suggest you spend some time to evaluate iRedMail on a VM.

8

Re: Moved index.html - now "DATABASE ERROR: CONNECTION FAILED!"

ZhangHuangbin wrote:

Personally, i suggest you spend some time to evaluate iRedMail on a VM.

IS there a good guide for installing iredmail on a VM? As I am sure there will be extra steps including opening opening ports on vm, etc.

9

Re: Moved index.html - now "DATABASE ERROR: CONNECTION FAILED!"

Official installation guides work on both VM and physical server:
http://www.iredmail.org/doc.html

No addition steps are required to open ports in VM, they all are open by iRedMail.