Install Zimbra, can't use current hosts file
Solution 1
Use a dedicated line to define your FQDN.
192.168.10.9 mail.mydomain.com mail
Remove it from the 127.0.0.1 line.
Solution 2
Define the server in /etc/hosts
138.68.159.74 mail.domain.com mail
127.0.0.1 localhost
ensure the hostname is set to mail or whatever
hostname mail
Solution 3
In all of your examples you are showing an IP of 127.x.x.x. You need to use a real IP. Here's what my hosts file looks like:
[root@zimbra ~]# cat /etc/hosts
1.2.3.4 zimbra.mydomain.com zimbra
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Solution 4
I had same problem.
I set my own hostname in /etc/hosts. e.g.
192.168.4.10 mail.tslonlinestuff.com mail
127.0.0.1 localhost
and no need to reboot just execute below command:
hostnamectl set-hostname mail.tslonlinestuff.com
Solution 5
I've also encountered this issue when installing on Ubuntu 14.04. There is a bug in their detection script for this. The script pulls only the first line that contains:
localhost
or
localhost.localdomain
in any position, like ipv6-localhost. All other lines are ignored. Ubuntu places the IPv6 loopback as the first line, so even if you have the suggested line:
127.0.0.1 localhost.localdomain localhost
The script never detects that you've corrected the problem.
Solution: Make sure you specify the 127.0.0.1 line ABOVE any IPv6 configuration and the script will succeed.
Related videos on Youtube
Icy Creature
Updated on September 18, 2022Comments
-
Icy Creature almost 2 years
I'm trying to install zimbra on a linux server. I downloaded the Ubuntu 12.04 LTS version of zimbra, unpacked and tried to run install.sh. But after I have approved the license I get this problem.
ERROR: Installation can not proceeed. Please fix your /etc/hosts file to contain:
127.0.0.1 localhost.localdomain localhost
Zimbra install grants mysql permissions only to localhost and
localhost.localdomain users. But Fedora/RH installs leave lines such as these in /etc/hosts:127.0.0.1 myhost.mydomain.com myhost localhost.localdomain localhost
This causes MySQL to reject users coming from 127.0.0.1 as users from myhost.mydomain.com. You can read more details at:
The hosts file now looks like this.
127.0.1.1 localhost.localdomain localhost 127.0.1.1 linux-server-test localhost 127.0.1.1 mail.mydomain.com mail # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
I Change it to this
127.0.0.1 localhost.localdomain localhost 127.0.0.1 linux-server-test localhost 127.0.0.1 mail.mydomain.com mail # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
I then run the script again and this time i get this problem.
ERROR: Installation can not proceeed. Please fix your /etc/hosts file to contain:
ip FQHN HN
Where is the ip address of the host, is the FULLY QUALIFIED host name, and is the (optional) hostname-only portion
I try a last time and remove the lines about localhost and linux-server-test yet the same result. I have config the dns to be able to handle email so that should not be a problem.
dig mydomain.com mx ; <<>> DiG 9.9.2-P1 <<>> mydomain.com mx ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15967 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;mydomain.com. IN MX ;; ANSWER SECTION: mydomain.com. 600 IN MX 30 mail.mydomain.com. ;; Query time: 17 msec ;; SERVER: 127.0.1.1#53(127.0.1.1) ;; WHEN: Mon Aug 12 16:08:17 2013 ;; MSG SIZE rcvd: 66
So what I'm i doing wrong? (I Replaced all the domain entries in this post to mydomain.com instead of my real domain)
-
Icy Creature almost 11 yearsDid you check the host files i posted, used I hade a dedicated line for the domain.
-
ewwhite almost 11 yearsHost files are read top-to-bottom, and I know your mail server's IP address is not 127.0.0.1. Change the 127.0.0.1 on the FQDN line to the server's real IP address.
-
Icy Creature almost 11 yearsI tried that both the external ip and the ip inside of the local network got the the same error as i posted. (the second)
-
GioMac almost 11 yearsNo. You didn't :) Sorry.
-
HadiRj over 6 yearsensure the hostname is set to mail or whatever this was the answer for me