You are not logged in.

#1 2012-12-14 16:15:18

undead toaster
Member
Registered: 2012-12-14
Posts: 12

[SOLVED]can't connect to some websites

I dual boot Arch and Windows 7 and I have a wireless internet connection. Web browsing is generally faster in Windows than in Arch, for example sites like Facebook (only when I'm logged in) or Youtube videos (again it tends to be faster when I'm logged out) and sometimes other sites do not load in Arch (even Google searches will sometimes take almost a minute). I had to post this in Windows because it would not submit in Arch. My internet connection strength is roughly the same in both, and I tried pinging Google and Facebook and for each one, Linux was slightly faster (only 5 ms but still a bit faster). It happens both in chromium and firefox and I tried disabling ipv6 from the kernel line in grub and also in about:config in Firefox, neither of which made a difference. Disabling my extensions did not work either (the only one I could see making a difference is adblock plus) Also, sometimes using Chrome's incognito mode will speed it up a bit, but not much usually. I have this problem on my laptop running Arch and now Ubuntu as well. I saw an old thread on this from last year so it seems I'm not the only one, but it didn't help me... My wifi card is a Rosewill RNX-N150PCe and I think it uses the ath9k driver. I don't know what other information would be helpful so please tell me if there is something I can post. Thanks.
Edit: I saw some threads I did not notice before and I will try opendns...

Last edited by undead toaster (2012-12-15 21:00:34)

Offline

#2 2012-12-14 16:48:01

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [SOLVED]can't connect to some websites

I don't think the problem is on your browsers.

Try this:

download using wget a file on linux to check your speed:

wget http://cachefly.cachefly.net/10mb.test

Reboot on windows, install wget for windows, and try the same command there.

If you still notice a big difference on speed and linux is slower, you can be 100% sure is not a firefox or chromium problem.

Then, if you can, try to connect via wire both on linux and windows, and do the same test.

If this time you get the same speed both on windows and linux, then it means the problem is related to your wireless device. Maybe is not compatible enough with linux, buy a new one.

If even on wire the speed is different, maybe you have some weird rule of iptables or a qdisc limiting your speed... (I think this is the less likely option)


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#3 2012-12-14 17:14:20

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: [SOLVED]can't connect to some websites

Please post your /etc/hosts file.

Offline

#4 2012-12-14 17:37:20

undead toaster
Member
Registered: 2012-12-14
Posts: 12

Re: [SOLVED]can't connect to some websites

chris_l wrote:

I don't think the problem is on your browsers.

Try this:

download using wget a file on linux to check your speed:

wget http://cachefly.cachefly.net/10mb.test

Reboot on windows, install wget for windows, and try the same command there.

If you still notice a big difference on speed and linux is slower, you can be 100% sure is not a firefox or chromium problem.

Then, if you can, try to connect via wire both on linux and windows, and do the same test.

If this time you get the same speed both on windows and linux, then it means the problem is related to your wireless device. Maybe is not compatible enough with linux, buy a new one.

If even on wire the speed is different, maybe you have some weird rule of iptables or a qdisc limiting your speed... (I think this is the less likely option)

Thanks. It took exactly the same amount of time/dowload rate on both operating systems. This may be ignorant, but if those are the same speeds, than using a different DNS server wouldn't help, correct?

And my /etc/hosts:

#
# /etc/hosts: static lookup table for host names
#

#<ip-address>	<hostname.domain.org>	<hostname>
127.0.0.1	localhost.localdomain	localhost
::1		localhost.localdomain	localhost

# End of file

Last edited by undead toaster (2012-12-14 17:40:42)

Offline

#5 2012-12-14 17:40:12

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [SOLVED]can't connect to some websites

It took exactly the same speed on wireless or on wire?

If you mean on wireless, then the idea of changing the nameserver sounds good.

Edit: is a good idea to change the nameservers if you have the same speed on wireless, because the problem can be it has a hard time finding the domains, and that is the slow part, your actual download speed is ok.

Last edited by chris_l (2012-12-14 17:45:53)


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#6 2012-12-14 18:01:39

undead toaster
Member
Registered: 2012-12-14
Posts: 12

Re: [SOLVED]can't connect to some websites

Yes, it is the same speed on wireless. Following the wiki I changed the nameservers and that greatly increased the speed of the dig example it used (dig www5.yahoo.com), but it does not solve my problem.

Offline

#7 2012-12-14 19:04:22

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [SOLVED]can't connect to some websites

Then is dns related.

Install namebench.py and use it to find the best nameserver for you and use it as default.


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#8 2012-12-14 20:11:18

AndrzejL
Member
Registered: 2012-12-07
Posts: 160

Re: [SOLVED]can't connect to some websites

Since I posted by accident and there is no "Remove Post" button I might as well try to suggest something... altho I am not sure will this work.

I would try disabling IPV6 by adding those two lines:

#disable ipv6
net.ipv6.conf.all.disable_ipv6=1

as a last two lines in the:

/etc/sysctl.conf

(do not forget to leave one - last line - empty) as root and then saving the file and rebooting.

Regards.

AndrzejL

Last edited by AndrzejL (2012-12-14 22:05:17)


The worst thing about censorship is ██████ ██ ████ ████████████ and ██████ ███████ ███ ███████████.

Offline

#9 2012-12-14 21:25:15

undead toaster
Member
Registered: 2012-12-14
Posts: 12

Re: [SOLVED]can't connect to some websites

I put my top  results from namebench.py into /etc/resolv.conf, but it makes no difference. I also tried using the Comodo Secure DNS nameservers that I use on Windows 7, but it didn't help either. Changes in resolv.conf take affect right away like the wiki said, correct? Or do I have to reboot/reconnect (which also rewrites the file)?

Offline

#10 2012-12-14 21:36:52

flipper T
Member
Registered: 2012-09-14
Posts: 419

Re: [SOLVED]can't connect to some websites

reboot computer & router.


If I'm curt with you it's because time is a factor. I think fast, I talk fast and I need you guys to act fast if you wanna get out of this. So, pretty please... with sugar on top. Clean the [censored] car. -The Wolf

Offline

#11 2012-12-14 22:59:05

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: [SOLVED]can't connect to some websites

AndrzejL, I have seen your report.  Your post #8 now has been edited with useful content,  so I am not going to delete it as you had requested.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#12 2012-12-14 23:30:26

AndrzejL
Member
Registered: 2012-12-07
Posts: 160

Re: [SOLVED]can't connect to some websites

ewaller wrote:

AndrzejL, I have seen your report.  Your post #8 now has been edited with useful content,  so I am not going to delete it as you had requested.

Yeah... I made boo boo while posting and reported the post to be deleted but then I thought... ok I am gonna make the best of it and edited the post to contain something that at least might be relevant...

You find it useful? I am delighted. Thank You and sorry again for causing the disturbance in the force.

Regards.

Andrzej

Last edited by AndrzejL (2012-12-14 23:51:01)


The worst thing about censorship is ██████ ██ ████ ████████████ and ██████ ███████ ███ ███████████.

Offline

#13 2012-12-14 23:56:32

undead toaster
Member
Registered: 2012-12-14
Posts: 12

Re: [SOLVED]can't connect to some websites

I tried the comodo secure DNS on the router and rebooted it and my computer, but that did not work, nor did disabling ipv6 as AndrzejL suggested. I don't have a problem with browsing speed in general usually, its just certain sites that I have trouble with, such as facebook, youtube, and forums (I can access them, but I can't post anything. It just gives: Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
Where would I look in order to find more specific information and what is causing this?

Offline

#14 2012-12-15 00:04:23

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [SOLVED]can't connect to some websites

Hmm, you didn't mentioned that error code before. hmm

try this:

# /usr/sbin/iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

After executing that, try those sites again.


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#15 2012-12-15 03:02:32

undead toaster
Member
Registered: 2012-12-14
Posts: 12

Re: [SOLVED]can't connect to some websites

I'm not sure what that was supposed to do, but it made no difference. And In firefox it gives a similar message: The connection to the server was reset while the page was loading. I also tried deleting ~/.config/chromium based on some research which did not help either.
It appears to be similar to this: https://bbs.archlinux.org/viewtopic.php?id=146914

Last edited by undead toaster (2012-12-15 03:58:33)

Offline

#16 2012-12-15 06:33:05

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [SOLVED]can't connect to some websites

undead toaster wrote:

I'm not sure what that was supposed to do

here: http://www.uniquetipsonline.com/how-to- … onnection/

Likely, the problem is the mtu.

That command was trying to fix it. If it didn't, well, you'll need to do some of trial and error until you find a way to fix your mtu.

Try this other one too:

# ip link set dev eth0 mtu 1400

(Im assuming your device is eth0)


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#17 2012-12-15 07:07:46

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED]can't connect to some websites

For MTU, try dslreports ping test.

Offline

#18 2012-12-15 15:15:32

undead toaster
Member
Registered: 2012-12-14
Posts: 12

Re: [SOLVED]can't connect to some websites

brebs wrote:

For MTU, try dslreports ping test.

My router MTU is 1492, so I should try changing mine to 1492, right? I tried doing the ping thing, but I only got the "packet needs frag" thing once, and it was at 1472, which I tried again and did not get the error. I'm also getting 100% packet loss pinging that site, I don't know if that is supposed to happen or what...
Edit: I used google.com instead of dsl.reports and it worked up to 1464, so I will try changing my MTU for wlan0 to 1492...
Edit: Yes that worked, thank you chris_l and brebs! How do I make it permanent? This https://wiki.archlinux.org/index.php/Ju … Arch_Linux says to put it in /etc/rc.local but that doesn't exist. I'm guessing that changed after the switch to the systemd thing?

Last edited by undead toaster (2012-12-15 15:30:12)

Offline

#19 2012-12-15 15:26:15

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED]can't connect to some websites

undead toaster wrote:

My router MTU is 1492, so I should try changing mine to 1492, right?

Yes:

ip link set eth0 up mtu 1492

Offline

#20 2012-12-15 15:38:33

undead toaster
Member
Registered: 2012-12-14
Posts: 12

Re: [SOLVED]can't connect to some websites

I tried putting it in /etc/rc.local like the wiki said, but I'm assuming thats no longer true and it did not work.

Offline

#21 2012-12-15 16:32:03

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [SOLVED]can't connect to some websites

Create a unit.
Ok, I created one, but, hm, well, this code is untested, chances are you'll need to ajust it ^_^

Save this as /etc/systemd/system/mtu-1492@.service

[Unit]
Description=Set mtu to 1492
Before=dhcpcd@

[Service]
Type=oneshot
ExecStart=/sbin/ip link set dev %I up mtu 1492

[Install]
WantedBy=multi-user.target

And start it and enable it with

systemctl start mtu-1492@eth0.service
systemctl enable mtu-1492@eth0.service

Reboot to check if everything is ok.

Remember, is untested!

NOTE: Not sure if it should be before or after dhcpcd! If before does not work, try to change

Before=dhcpcd@

to

Requires=dhcpcd@
After=dhcpcd@

EDIT: Added the dev part

Last edited by chris_l (2012-12-15 18:00:59)


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#22 2012-12-15 17:19:00

undead toaster
Member
Registered: 2012-12-14
Posts: 12

Re: [SOLVED]can't connect to some websites

That gives me this:

Dec 15 12:15:49 arch systemd[1]: Starting Set mtu to 1492...
Dec 15 12:15:49 arch ip[5139]: Not enough information: "dev" argument is required.
Dec 15 12:15:49 arch systemd[1]: mtu-1492.service: main process exited, code=exited, status=255/n/a
Dec 15 12:15:49 arch systemd[1]: Failed to start Set mtu to 1492.
Dec 15 12:15:49 arch systemd[1]: Unit mtu-1492.service entered failed state

Offline

#23 2012-12-15 17:59:24

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [SOLVED]can't connect to some websites

Then add that.

ExecStart=/sbin/ip link set dev %I up mtu 1492

Note that I added the dev part


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#24 2012-12-15 20:59:21

undead toaster
Member
Registered: 2012-12-14
Posts: 12

Re: [SOLVED]can't connect to some websites

That did not work either, however I got it working with this:

[Unit]
Description=Set mtu to 1492
Before=wicd.service

[Service]
Type=oneshot
ExecStart=/sbin/ip link set wlan0 up mtu 1492
TimeoutSec=0
StandardInput=tty
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Thanks chris_l!

Offline

Board footer

Powered by FluxBB