Score:0

What is port 127.0.0.1:9050 for and why is the connection refused on it?

nu flag

I am trying to upgrade my system from Ubuntu 20.04 to Ubuntu 22.04. After sudo apt update, sudo apt upgrade, sudo apt dist-upgrade, sudo apt autoremove and sudo apt install update-manager-core I run the command sudo do-release-upgrade but it fails with errors:

Error during update 

A problem occurred during the update. This is usually some sort of 
network problem, please check your network connection and retry. 


Restoring original system state

Aborting
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Internet connection is fine, everything works. However, just above I read this error:

Err tor+http://deb.w5j6stm77zs6652pgsij4awcjeel3eco7kvipheu6mtr623eyyehj4yd.onion bullseye InRelease
  Could not connect to 127.0.0.1:9050 (127.0.0.1). - connect (111: Connection refused)

I have Tor installed and it works. I tried to stop it with the killall tor command, it did not help. Tell me, please, what kind of port is this 127.0.0.1:9050 and what is it for? (I googled but didn't find any specific information, someone said that he is responsible for the proxy, that's all).

What is causing the connection failure and is there any way to fix it? Thank you!

Pilot6 avatar
cn flag
`127.0.0.1:9050` is used to connect using tor.
e7min avatar
nu flag
@Pilot6 When I start tor, everything works, why can't this port work during the update?
Score:0
nu flag

I figured it out, maybe it will help someone someday.

The port 127.0.0.1:9050 is the default port used by Tor to listen for client connections. It is known as the "SocksPort," and it allows client applications to connect to Tor and route their traffic through the Tor network. It is possible that the "Tor Browser" is using the same port 9050, which can cause a conflict with the do-release-upgrade command.

The error message suggests that the update manager is trying to connect to the Tor network through the SocksPort, but it is failing to do so because the connection is being refused. One possible reason for this is that the Tor service is not running or is misconfigured.

To resolve the issue, you can try the following steps:

  1. Stop the Tor service by running the command sudo systemctl stop tor.service
  2. Comment out the line deb tor+http://deb.w5j6stm77zs6652pgsij4awcjeel3eco7kvipheu6mtr623eyyehj4yd.onion bullseye InRelease in the file /etc/apt/sources.list.d/derivative.list by adding a "#" at the beginning of the line.
  3. Run the command sudo apt update to refresh the package list without connecting to Tor.
  4. Run the command sudo do-release-upgrade again to upgrade your system.

If the upgrade process still fails, you can also try temporarily disabling Tor altogether by running the command sudo systemctl disable tor.service and then attempting the upgrade process again.

After the upgrade process is complete, you can re-enable and start the Tor service by running the commands sudo systemctl enable tor.service and sudo systemctl start tor.service, respectively.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.