Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-27-2009, 10:35 AM
|
#1
|
LQ Newbie
Registered: May 2009
Location: Seattle
Distribution: Mandrake
Posts: 13
Rep:
|
curl: (7) couldn't connect to host // wget --> failed: Connection refused.
Hi all,
I am quite a newbie. I have Mandriva 2009 Spring installed on a Thinkpad T40. All works well but since last week I have broken somehow curl and wget :
One clue I have is, since I installed XAMPP, I have created the xampp service and might have modified something else for curl and wget.
Please, don't hesitate to refer me to another solved thread to reseach.
Thank you
|
|
|
05-27-2009, 11:36 AM
|
#2
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Hi
welcome to LQ!
Is the URL still accessible via ordinary browser? What's the
network topology, are you behind a proxy/firewall? What do
you see when you
?
Cheers,
Tink
|
|
|
05-27-2009, 12:32 PM
|
#3
|
LQ Newbie
Registered: May 2009
Location: Seattle
Distribution: Mandrake
Posts: 13
Original Poster
Rep:
|
Thanks Tinkster,
I forgot to mention
- I have still perfect access to the internet (all url) via http and ftp with FF 3.0.10.
- lynx doesn't seem to be working :
Quote:
[tompot@localhost]$ lynx http://www.yahoo.com
Looking up 217.19.195.242
Making HTTP connection to 217.19.195.242
Alert!: Unable to connect to remote host.
lynx: Can't access startfile http://www.yahoo.com/
|
- Telnet isn't installed on my config.
- but dig seems to work :
Quote:
dig www.yahoo.com
; <<>> DiG 9.6.0-P1 <<>> www.yahoo.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35081
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.yahoo.com. IN A
;; ANSWER SECTION:
www.yahoo.com. 241 IN CNAME www.wa1.b.yahoo.com.
www.wa1.b.yahoo.com. 4 IN CNAME www-real.wa1.b.yahoo.com.
www-real.wa1.b.yahoo.com. 23 IN A 209.131.36.158
;; Query time: 21 msec
;; SERVER: 68.87.69.146#53(68.87.69.146)
;; WHEN: Thu May 28 10:23:56 2009
;; MSG SIZE rcvd: 94
|
- Network is local wifi with 3 machines + printer. Sisco router.
Where should I start looking ?
Last edited by linea; 05-27-2009 at 12:48 PM.
|
|
|
05-27-2009, 01:01 PM
|
#4
|
LQ Newbie
Registered: May 2009
Location: Seattle
Distribution: Mandrake
Posts: 13
Original Poster
Rep:
|
I tried Konqueror. Same probleme as Lynx not access to any url.
Either somehting special with my firefox config for http and the filezilla for ftp.
Or Firefox is messing up the mandriva build-in browsers.
|
|
|
05-27-2009, 02:02 PM
|
#5
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
I don't think ff has that power ... if you don't have telnet - how about netcat?
Is SE Linux enabled, and your FF the only browser permitted out on ports 80
and/or 443?
You could also try to run curl or wget under strace, log info ot a file and
see where you get errors/permission problems ...
Cheers,
Tink
|
|
1 members found this post helpful.
|
05-27-2009, 03:34 PM
|
#6
|
LQ Newbie
Registered: May 2009
Location: Seattle
Distribution: Mandrake
Posts: 13
Original Poster
Rep:
|
Quote:
I don't think ff has that power ... if you don't have telnet - how about netcat?
Is SE Linux enabled, and your FF the only browser permitted out on ports 80
and/or 443?
You could also try to run curl or wget under strace, log info ot a file and
see where you get errors/permission problems ...
|
No telnet, no netcat either
SELinux is RH distro isn't it ? I am Mandriva.--> no idea about ports opened for which browser.
I am looking at the strace output... won't be easy
For info while I try to understand the raw output, here is the -c output :
Quote:
strace -c wget www.yahoo.com
--2009-05-28 13:31:34-- http://www.yahoo.com/
Connecting to 217.19.195.242:80... failed: Connection refused.
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
81.97 0.001000 1000 1 1 connect
15.74 0.000192 192 1 execve
2.30 0.000028 1 25 fstat64
0.00 0.000000 0 13 read
0.00 0.000000 0 3 write
0.00 0.000000 0 37 13 open
0.00 0.000000 0 27 close
0.00 0.000000 0 3 time
0.00 0.000000 0 1 1 access
0.00 0.000000 0 3 brk
0.00 0.000000 0 2 ioctl
0.00 0.000000 0 4 munmap
0.00 0.000000 0 1 uname
0.00 0.000000 0 5 mprotect
0.00 0.000000 0 1 _llseek
0.00 0.000000 0 7 rt_sigaction
0.00 0.000000 0 1 rt_sigprocmask
0.00 0.000000 0 1 getrlimit
0.00 0.000000 0 35 mmap2
0.00 0.000000 0 6 4 stat64
0.00 0.000000 0 2 futex
0.00 0.000000 0 1 set_thread_area
0.00 0.000000 0 1 set_tid_address
0.00 0.000000 0 1 set_robust_list
0.00 0.000000 0 2 socket
0.00 0.000000 0 1 bind
0.00 0.000000 0 1 getsockname
0.00 0.000000 0 1 sendto
0.00 0.000000 0 3 recvmsg
------ ----------- ----------- --------- --------- ----------------
100.00 0.001220 190 19 total
|
Quote:
strace -c curl www.yahoo.com
curl: (7) couldn't connect to host
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
64.90 0.007394 130 57 read
26.33 0.003000 45 66 21 open
8.77 0.000999 999 1 execve
0.00 0.000000 0 35 write
0.00 0.000000 0 47 close
0.00 0.000000 0 5 time
0.00 0.000000 0 4 2 access
0.00 0.000000 0 1 pipe
0.00 0.000000 0 2 times
0.00 0.000000 0 4 brk
0.00 0.000000 0 2 1 ioctl
0.00 0.000000 0 2 getrusage
0.00 0.000000 0 2 gettimeofday
0.00 0.000000 0 6 munmap
0.00 0.000000 0 1 uname
0.00 0.000000 0 19 mprotect
0.00 0.000000 0 25 select
0.00 0.000000 0 1 poll
0.00 0.000000 0 2 rt_sigaction
0.00 0.000000 0 1 rt_sigprocmask
0.00 0.000000 0 1 getrlimit
0.00 0.000000 0 78 mmap2
0.00 0.000000 0 7 6 stat64
0.00 0.000000 0 44 fstat64
0.00 0.000000 0 4 fcntl64
0.00 0.000000 0 2 futex
0.00 0.000000 0 1 set_thread_area
0.00 0.000000 0 1 set_tid_address
0.00 0.000000 0 12 clock_gettime
0.00 0.000000 0 1 set_robust_list
0.00 0.000000 0 1 socket
0.00 0.000000 0 1 1 connect
0.00 0.000000 0 1 setsockopt
0.00 0.000000 0 1 getsockopt
------ ----------- ----------- --------- --------- ----------------
100.00 0.011393 438 31 total
|
|
|
|
06-01-2009, 11:28 AM
|
#7
|
LQ Newbie
Registered: May 2009
Location: Seattle
Distribution: Mandrake
Posts: 13
Original Poster
Rep:
|
My search didn't bring me anywhere
Can someone help me ?
|
|
|
06-01-2009, 11:45 AM
|
#8
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Not with that amount of info. I'd highly recommend installing
either telnet or nc (nc being the predfered choice because it's
far more versatile).
Cheers,
Tink
|
|
|
06-01-2009, 11:50 AM
|
#9
|
Member
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961
Rep:
|
Whats in /etc/hosts? Firefox used to do funny things resolving via hosts, especially if you have some proxy set up. Is that all clear?
|
|
|
06-02-2009, 01:06 AM
|
#10
|
LQ Newbie
Registered: May 2009
Location: Seattle
Distribution: Mandrake
Posts: 13
Original Poster
Rep:
|
Thank you.
Quote:
Originally Posted by jamescondron
Whats in /etc/hosts? Firefox used to do funny things resolving via hosts, especially if you have some proxy set up. Is that all clear?
|
Give me :
Quote:
[root@localhost etc]# more hosts
127.0.0.1 localhost
|
Quote:
Not with that amount of info. I'd highly recommend installing
either telnet or nc (nc being the predfered choice because it's
far more versatile).
Cheers,
Tink
|
I managed to install netcat. Here is what it gives :
Quote:
[root@localhost etc]# netcat -v www.yahoo.com 80
www.yahoo.com [209.131.36.158] 80 (http) open
read(net): Connection reset by peer
|
|
|
|
06-02-2009, 01:32 AM
|
#11
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Hummm ... still doesn't make any sense. Is there a proxy
somewhere that firefox knows about, and other browsers
don't?
|
|
|
06-02-2009, 01:38 PM
|
#12
|
LQ Newbie
Registered: May 2009
Location: Seattle
Distribution: Mandrake
Posts: 13
Original Poster
Rep:
|
Excellent Tink, you got me on the way.
I feel like a moron now.
I changed proxy settings on drake gui...
Now wget and curl is working.
However netcat is still giving me the same thing.
In my mother tongue I'd say "Touche pas à ca p'tit con".
Thanks a lot Tink.
|
|
|
05-21-2012, 12:56 PM
|
#13
|
LQ Newbie
Registered: May 2012
Posts: 1
Rep:
|
Did you use a proxy?
curl and wget try to download things through proxy even if the proxy is unavailable. so the simplest way is to export http_proxy="" and put it into your .bash_profile.
Last edited by Mcdo; 05-21-2012 at 12:58 PM.
|
|
|
All times are GMT -5. The time now is 09:18 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|