Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Installation

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-19-2006, 04:00 PM
Active Member
 
Posts: 32
Default Please fix your /etc/hosts file...

I get this error on upgrading from:
Release 3.1.3_GA_474.SuSEES9_20060609153405 SuSEES9 NETWORK edition

to 3.1.4. So this is a box that has been working (ok, except for the purge thing.. which led me to the upgrade).

Now the box says the /etc/hosts is broken. When I `hostname`, I get mail.xxxxxx.com. When I ping it, dig it from another server... Everything is fine with dns, from other servers. On the box itself I have no problem.

The exact error is:
HTML Code:
ERROR: Installation can not proceeed.  Please fix your /etc/hosts file
        to contain:

        <ip> <FQHN> <HN>

        Where <IP> is the ip address of the host,
        <FQHN> is the FULLY QUALIFIED host name, and
        <HN> is the (optional) hostname-only portion
Any help? my /etc/hosts looks just like that?
HTML Code:
# IP-Address  Full-Qualified-Hostname  Short-Hostname
127.0.0.1       localhost
xx.xx.xx.xx  mail.xxxxxxxxxxx.com mail
Thanks!
Reply With Quote
  #2 (permalink)  
Old 07-23-2006, 12:17 AM
Former Zimbran
 
Posts: 5,606
Default

My ideas are purely a shot in the dark, but perhaps we can filter this down.

Did you change anything else? IP address, install any new packages?

What are the permissions for the hosts file? What about IPv6? I know that it has been known to cause problems. Is SELinux off?

Is this a server with a live IP or is this all behind a NAT Firewall?

Also, Please post your /tmp/install.log.xxxx
Perhaps there will be something in there.

Thanks
john
Quote:
Originally Posted by ipguru99
I get this error on upgrading from:
Release 3.1.3_GA_474.SuSEES9_20060609153405 SuSEES9 NETWORK edition

to 3.1.4. So this is a box that has been working (ok, except for the purge thing.. which led me to the upgrade).

Now the box says the /etc/hosts is broken. When I `hostname`, I get mail.xxxxxx.com. When I ping it, dig it from another server... Everything is fine with dns, from other servers. On the box itself I have no problem.

The exact error is:
HTML Code:
ERROR: Installation can not proceeed.  Please fix your /etc/hosts file
        to contain:

          

        Where  is the ip address of the host,
         is the FULLY QUALIFIED host name, and
         is the (optional) hostname-only portion
Any help? my /etc/hosts looks just like that?
HTML Code:
# IP-Address  Full-Qualified-Hostname  Short-Hostname
127.0.0.1       localhost
xx.xx.xx.xx  mail.xxxxxxxxxxx.com mail
Thanks!
Reply With Quote
  #3 (permalink)  
Old 07-23-2006, 10:00 AM
Active Member
 
Posts: 32
Default

thanks for the ideas... I went ahead and commented out the part in utilsfunc.sh that gets called in the install.sh. It was
HTML Code:
hostname --fqdn
. The upgrade ran just fine after that... and seems to be ok (see below)

I did see a whole bunch of install.log.xxx files, but mostly they contain two lines that don't seem to have anything to do with my attempted upgrade?

I didn't look at the permissions on the hosts file... I just looked now and they are
-rw-r--r-- 1 root root 743 2006-07-22 21:55 /etc/hosts
That looks normal to me. I never thought about the ipv6 stuff until you mentioned it.. and yes, I have heard of that doing weird things (that should be promising over the next 10 years ;-). It is behind a firewall

Bad part about all of this. It broke the zmpurge script you helped me fix!!.. yeah, now all the junk is staying in the Junk folders again. I just checked this a.m. and nothing has been deleted since 2 days before I completed the upgrade (I have my spam purge at 2 days).

So, back in the root crontab until I figure out why that isn't working. BUT... the upgrade to 3.1.4 seems to have kicked the spam into gear. We are still getting too high a percentage coming through, but at least now the stuff I have tagged with "this_is_probably_spam" is getting sent directly to their junk. Funny how all of this stuff is changing, and I haven't touched anything since I configured it. I guess that is why they keep fixing stuff. I love this product, though...

Thanks for resonding!

UPDATE: just looked at the purge thing again... seems the same change just needs to be made... Sorry.

Last edited by ipguru99; 07-23-2006 at 10:03 AM..
Reply With Quote
  #4 (permalink)  
Old 07-28-2006, 04:56 AM
Elite Member
 
Posts: 371
Post /etc/hosts

Hi,

I has the same issue installing on FC5
it seems the /etc/hosts file needs 3 entries on each line i.e.

ip FQHN HN

so your /etc/hosts should look something like:

# IP-Address Full-Qualified-Hostname Short-Hostname
127.0.0.1 localhost.localdomain localhost
xx.xx.xx.xx mail.xxxxxxxxxxx.com mail

HTH,
Padraig.
Reply With Quote
  #5 (permalink)  
Old 07-31-2006, 11:39 AM
Active Member
 
Posts: 32
Default

thanks... I did all of those, and even tried to make sure there weren't any whitespaces before the file started... something the zimbra people told me.

In the end, since I knew the hostname was correct, I just commented out the part of utilfunc.sh (called from install.sh) that asked for the hostname. It worked fine and the upgrade is running well (doing a much better job with spam anyway).

I know this isn't ideal, but the error didn't make any sense.. the box was running just fine with the /etc/hosts it had?

Thanks everyone for the suggestions. Zimbra is supposedly looking into it, and it was on SuSE 9... which I guess is still really beta (or was..).
Reply With Quote
  #6 (permalink)  
Old 06-06-2011, 08:22 AM
Starter Member
 
Posts: 1
Default

Had this one today, fixed it by doing:

Checking hostname using the command: hostname --fqdn

the output should match the fqdn in the hosts file, or it wont work.
Reply With Quote
  #7 (permalink)  
Old 08-10-2011, 02:28 AM
Starter Member
 
Posts: 1
Default

Quote:
Originally Posted by mohz View Post
Had this one today, fixed it by doing:

Checking hostname using the command: hostname --fqdn

the output should match the fqdn in the hosts file, or it wont work.
the same here ! on debian you can change your hostname by editing /etc/hostname
Reply With Quote
  #8 (permalink)  
Old 08-31-2011, 10:51 AM
Active Member
 
Posts: 38
Default

For anyone with this problem in the future.

Your hostname is taken from your network script, which may vary on your OS.

I use RedHat, and Fedora. My host name is not set it /etc/hosts. That is what is used for a reference from IPs to logical names.

Fedora and RedHat users, your host name can be changed in /etc/sysconfig/network.

Then to change it for now without taking down your network:
# hostname name.domain.suffix

I do not know what network manager will do to this host name, if anything. I do not use network manager myself.

Before continuing don't forget to shutdown sendmail, and apache 'httpd'.
Reply With Quote
  #9 (permalink)  
Old 01-30-2012, 03:33 PM
Active Member
 
Posts: 38
Default

trying to install 6.0.15 on ubuntu 10.4. WTH!!?

Code:
# cat /etc/hosts
127.0.0.1	localhost.localdomain	localhost
127.0.1.1 vmubuntu.eao.drsk.ru vmubuntu
172.21.122.149 vm09.eao.drsk.ru
# The following lines are desirable for IPv6 capable hosts
::1     localhost.localdomain ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
#127.0.0.1	localhost.localdomain	localhost
Code:
# grep `hostname --fqdn` /etc/hosts
127.0.1.1 vmubuntu.eao.drsk.ru vmubuntu
Code:
# grep `hostname` /etc/hosts
127.0.1.1 vmubuntu.eao.drsk.ru vmubuntu
what else does your script looks for? it still requires "fqdn"

the solution I found: add one single character in regexp:

if perl -e "while (<>) { next if /^#|^127.0/; exit 1 if /\s+$HOSTNAME\s+/; }" /etc/hosts; then

with

if perl -e "while (<>) { next if /^#|^127.0/; exit 1 if /\s+\$HOSTNAME\s+/; }" /etc/hosts; then

to "Quote the next metacharacter" (perlre - perldoc.perl.org)

To check that I'm not wrong, I executed this command as regular ciommand from console:

Code:
$ perl -e "while (<>) { print 1; next if /^#|^127.0/; print 2 if /\s+\$HOSTNAME\s+/; }" /etc/hosts
11111211111
but what about older command? lets see:

Code:
$ perl -e "while (<>) { print 1; next if /^#|^127.0/; print 2 if /\s+$HOSTNAME\s+/; }" /etc/hosts
1111111111
So, the original command does not locate hostname at all, while corrected one locates exactly one occurrence. Lets do some more checks. Adding another fqdn into /etc/hosts:

Code:
$ cat /etc/hosts
127.0.0.1	localhost.localdomain	localhost
127.0.1.1 vmubuntu.eao.drsk.ru vmubuntu
172.21.122.149 vm09.eao.drsk.ru
172.21.122.149 vmubuntu.eao.drsk.ru vmubuntu
# The following lines are desirable for IPv6 capable hosts
::1     localhost.localdomain ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
#127.0.0.1	localhost.localdomain	localhost
WTH again:

Code:
$ perl -e "while (<>) { print 1; next if /^#|^127.0/; print 2 if /\s+\$HOSTNAME\s+/; }" /etc/hosts
111111211111
$perl -e "while (<>) { print 1; next if /^#|^127.0/; print 2 if /\s+$HOSTNAME\s+/; }" /etc/hosts
111121111111
something mystical: both commands locate the hostname now!

Conclusion: the install script looks for "fqdn with address not starting with 127.0". But it is no one's business.
__________________
Regards,
Sergei from Siberia

The word "traitor" is the antonym to the word "patriot".
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.