apt-get: Could not connect to localhost:4001 (127.0.0.1)

Kernels & Hardware, configuring network, installing services

apt-get: Could not connect to localhost:4001 (127.0.0.1)

Postby superstoned » 2004-10-08 14:24

when I do an apt-get update, most sources give this error:
Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)

also my superkaramba weather applet doesnt update, I guess the same problem...

I cant find the problem. the official debian mirrors do work, webbrowsing and email is no problem, etc

I hope anyone has an idea... google doesnt tell me anything.
superstoned
 
Posts: 12
Joined: 2004-10-06 15:29

Postby lacek » 2004-10-08 15:12

You didn't mention, so it remains a question:
Why does apt-get try to connect to localhost? Do you have a proxy or similar? What are the contents of your /etc/apt/sources.list file? What are the contents of the http_proxy and/or the ftp_proxy enviromental variables?
lacek
Moderator Team Member
 
Posts: 769
Joined: 2004-03-11 18:49
Location: Budapest, Hungary

Postby superstoned » 2004-10-08 17:06

thank you!!! this has almost solved it: you asked for http_proxy, well it was set to localhost:4001!!!! I dont know how, this is not in .bashrc, not in /etc/profile, where could it be, where can I undo it? now I set it to "" but I whould like to know where the problem is, and how to fix it...
superstoned
 
Posts: 12
Joined: 2004-10-06 15:29

Postby Jeroen » 2004-10-08 17:14

As root, just do 'grep -r http_proxy /etc', and as your user yourself, do 'grep -r http_proxy $HOME/.*', that will simply search on both the system-wide config area (/etc) and your user-specific stuff to this setting.
Jeroen
Debian Developer, Site Admin
Debian Developer, Site Admin
 
Posts: 571
Joined: 2004-04-06 18:19
Location: Utrecht, NL

Postby superstoned » 2004-10-08 17:24

Jeroen wrote:As root, just do 'grep -r http_proxy /etc', and as your user yourself, do 'grep -r http_proxy $HOME/.*', that will simply search on both the system-wide config area (/etc) and your user-specific stuff to this setting.


I found it in the file /etc/environment. but it says:
# +ANON_MARK+ Don't change this while anon-proxy manages this variable.
# +ANON_MARK+ To take back control of it run dpkg-reconfigure and tell
# +ANON_MARK+ debconf not to set this variable for you.
HTTP_PROXY=http://localhost:4001 # +ANON_MARK+
http_proxy=http://localhost:4001 # +ANON_MARK+

LANG=nl_NL@euro

I tried "dpkg-reconfigure" it asked for what to reconfig?
I tried "dpkg-reconfigure debconf" but it wasnt right too.
also reconfig anon or anon_mark didnt help. what is it, and what do I have to reconfigure?
superstoned
 
Posts: 12
Joined: 2004-10-06 15:29

Postby Jeroen » 2004-10-08 17:28

anon-proxy is obviously messing around with your /etc/environment. Just apt-get --purge remove anon-proxy, and clean up your /etc/environment afterwards. It probably asked for this while installing, you can alternatively also do dpkg-reconfigure anon-proxy and till it to leave your /etc/environment alone.
Jeroen
Debian Developer, Site Admin
Debian Developer, Site Admin
 
Posts: 571
Joined: 2004-04-06 18:19
Location: Utrecht, NL

Postby Misterfixit » 2007-10-10 23:27

I've just now started to have this problem after several almost two years of Ubuntu use. I purged anon-proxy but I am still receiving this error message when using the synaptic package manager.
Misterfixit
 

Another thing

Postby Movius » 2007-11-11 13:57

Another thing you have to do is look with the "ifconfig" if the lo {loopback} is activated,
in affirmative case

gedit /etc/network/interfaces

and then

delete or put a # in the lines to make it like this :

# The loopback network interface
# auto lo
# iface lo inet loopback


Good luck
Movius
 

About what i said later

Postby Movius » 2007-11-12 17:45

I forgot to say : "Uninstall any proxy you have installed, and then" follow trhe instuctions above...

:D
Movius
 


Return to System configuration

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable