Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Respondance of certain websites are extremely slow
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
xiaweitang
Apprentice
Apprentice


Joined: 26 Feb 2010
Posts: 152

PostPosted: Mon Mar 01, 2010 6:23 am    Post subject: [SOLVED]Respondance of certain websites are extremely slow Reply with quote

This happens on both my FreeBSD install and Gentoo install. And it happens for mostly Chinese websites (no matter the sever is on China or not), and on firefox, but no on links (links doesn't show Chinese characters anyway). After I type the address of those websites, it directs there immediately, but the loading is very slow compared to my experiences, and after loading complete, the scrolling is also very irresponsive. According to ArchWiki, the problem could be originated from /etc/hosts. Here is my /etc/hosts:
Code:

127.0.0.1   tux
::1      localhost

Is there anything wrong with it?


Last edited by xiaweitang on Wed Mar 03, 2010 7:58 am; edited 1 time in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7447

PostPosted: Mon Mar 01, 2010 11:01 am    Post subject: Reply with quote

127.0.0.1 localhost tux

else your localhost don't point to 127.0.0.1
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Mon Mar 01, 2010 12:34 pm    Post subject: Reply with quote

The ::1 line should be, I believe:
Code:
::1     localhost6.localdomain6 localhost6

I forget which distro I copied that from :( I don't even use ipv6, anyway.
Back to top
View user's profile Send private message
xiaweitang
Apprentice
Apprentice


Joined: 26 Feb 2010
Posts: 152

PostPosted: Mon Mar 01, 2010 5:05 pm    Post subject: Reply with quote

krinn wrote:
127.0.0.1 localhost tux

else your localhost don't point to 127.0.0.1


I made the change and reboot, but the situation is the same.
Back to top
View user's profile Send private message
whiteghost
Guru
Guru


Joined: 26 Jul 2009
Posts: 374
Location: north dakota

PostPosted: Mon Mar 01, 2010 5:26 pm    Post subject: Reply with quote

Quote:
Code:

127.0.0.1 tux
::1 localhost

Is there anything wrong with it?

yes.
amazing how many differences on web.

from
Code:

man hosts
127.0.0.1       localhost
       192.168.1.10    foo.mydomain.org       foo
       192.168.1.13    bar.mydomain.org       bar
       146.82.138.7    master.debian.org      master
       209.237.226.90  www.opensource.org


a trusted source on these forums said this was correct:
Code:
 # $FreeBSD$
#
#
# Host Database
#
# This file should contain the addresses and aliases for local hosts that
# share this file.  Replace 'my.domain' below with the domainname of your
# machine.
#
# In the presence of the domain name service or NIS, this file may
# not be consulted at all; see /etc/nsswitch.conf for the resolution order.
#
#
::1         localhost localhost.my.domain
127.0.0.1       localhost localhost.my.domain
#
# Imaginary network.
#10.0.0.2       myname.my.domain myname
#10.0.0.3       myfriend.my.domain myfriend
#
# According to RFC 1918, you can use the following IP networks for
# private nets which will never be connected to the Internet:
#
#   10.0.0.0    -   10.255.255.255
#   172.16.0.0  -   172.31.255.255
#   192.168.0.0 -   192.168.255.255
#
# In case you want to be able to connect to the Internet, you need
# real official assigned numbers.  Do not try to invent your own network
# numbers but instead get one from your network provider (if any) or
# from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.)


from a debian discussion:
http://lists.debian.org/debian-devel/2005/10/msg00387.html
Quote:
This has been mentioned before, but I'll say it again. This is solely
because the Debian /etc/hosts reads:
127.0.0.1 localhost.localdomain localhost

Code:
 
"localhost.localdomain" and "localhost" must be swapped.  The first
entry in the list of hosts *must* be "localhost".


Just as a sanity check, Solaris ships with:
127.0.0.1 localhost loghost

FreeBSD ships with:
127.0.0.1 localhost localhost.my.domain myname.my.domain

_________________
www.informationclearinghouse.info
May you re-discover what the poor in 18th century France discovered, that rich people's heads can be mechanically separated from their shoulders if they refuse to listen to reason.
Back to top
View user's profile Send private message
xiaweitang
Apprentice
Apprentice


Joined: 26 Feb 2010
Posts: 152

PostPosted: Mon Mar 01, 2010 6:00 pm    Post subject: Reply with quote

I installed Chinese fonts, and the problem is gone. So I think both versions of my /etc/hosts are okay.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum