Opened 6 years ago

Closed 4 years ago

Last modified 18 months ago

#9137 closed defect (fixed)

Changing the value for SocksPort requires 2 edit cycles.

Reported by: cypherpunks Owned by: erinn
Priority: Immediate Milestone:
Component: Applications/Tor bundles/installation Version:
Severity: Normal Keywords: vidalia
Cc: Actual Points:
Parent ID: #9413 Points:
Reviewer: Sponsor:

Description

Many TBB-users have complained about "The proxy server is refusing connections".
I MAY have found the root cause, but this is certainly a bug.

How to reproduce the bug:

Start with two edited torrc files. (Caveat/note [1] and [2] below).
Make sure that TBB starts and connects to the internet properly using one of torrc files.
In the Vidalia Control Panel press "Stop Tor" -> "Settings" -> "Advanced".
Change the value for "Tor Configuration File" to point to the other torrc.
Press "OK" to close window.
Press "Start Tor".
Wait...
Open a link in TBB to, say: https://www.torproject.org/
Here I get "The proxy server is refusing connections".

I solve the problem by:

  1. stopping Tor.
  2. opening the torrcfile.
  3. check the value for SocksPort: it is ALWAYS 9050 !!!
  4. edit the value to SocksPort 9150.
  5. save the torrcfile.
  6. start Tor again.
  7. try to open https://www.torproject.org/ in TBB.
  8. FAIL again with "The proxy server is refusing connections".
  9. stop Tor.
  10. edit torrcfile, set SocksPort 9150. save torrcfile.
  11. start Tor.
  12. Open https://www.torproject.org/ = SUCCESS.

What is interesting is, when I:

  1. stop Tor.
  2. change settings to point to the different torrc file.
  3. start again.

the result is THE SAME!!! "The proxy server is refusing connections".
So I check the value for SocksPort in the currently active file, it is: 9050 !!!

[1] Not sure it is required for these two torrc files to have different settings at all, would need several hours more to find out.
[2] Not sure if these torrc files need to contain the old values SocksPort 9050 or not. In my experience it doesn't matter, everytime I edit and save the values to 9150 - something "behind my back" changes it to the wrong value.

Conclusion:
Switching back and forth between two or more torrc files results in failure
to connect to the internet. Despite always editing and writing the correct SocksPort values back. Something inside TBB or Vidalia defaults to the wrong value, and neccessitates two edit cycles.

Don't tell me it is supposed to behave like this.
Do tell me if you can't reproduce this behaviour. I'll check back in a week or so.

Child Tickets

Change History (10)

comment:1 Changed 6 years ago by cypherpunks

Component: VidaliaTor bundles/installation
Keywords: "The proxy server is refusing connections" added
Owner: changed from chiiph to erinn

More info:
This bugreport referred to tor-browser-2.3.25-8_en-US.exe on Win XP SP3.

I have since tried tor-browser-2.3.25-10_en-US.exe on the same system, and got the same result.

Clarification:
This bug appears on all correctly configured torrc files (SocksPort 9150).
Switching between two correct torrc files, results in the wrong SocksPort beeing written (SocksPort 9050) to the newly opened torrc file.

comment:2 Changed 6 years ago by nickm

I wonder if bug #9122 could possibly be to blame.

comment:3 Changed 6 years ago by cypherpunks

I can not say that but #9122 is NOT to blame, but I can say that this is clearly caused by not applying the DRY principle everywhere. Somewhere there is a hardcoded value: SocksPort 9050.

I can also add that the change to the torrc file happens, after stopping Tor and switching torrc file, at this stage in the logs:
"Bootstrapped 100%: Done."

Maybe this is a hint that someone can pick up on?

comment:4 Changed 6 years ago by cypherpunks

Priority: normalmajor

Now that there is a new release of TBB coming, please fix this issue before hundreds of users start complaining about "The proxy server is refusing connections".

I can't help you do this yet, but at least do a grep search for all occurrences of "9050" (and also "9150") in the codebase.

No-one working on the Tor project should EVER commit "WET" code.
"WET" is the opposite of "DRY".
"DRY" = Don't Repeat Yourself.
"WET" can mean: "We Enjoy Typing".

comment:5 Changed 6 years ago by cypherpunks

It seems that ticket #9413 (and possibly #9312) may be duplicates of this, or related.
I don't think #9122 is to blame.

comment:6 Changed 6 years ago by cypherpunks

Parent ID: #9413
Priority: majorblocker

I found the solution to this bug (and others) in ticket #9413#comment:5
Erinn, review it and adjust the priority of this ticket afterwards.
I'm leaving the component of this ticket unchanged because it affects Tor Browser Bundle.

comment:7 Changed 6 years ago by cypherpunks

Status: newneeds_review

Please review the solution to this bug in ticket #9413

comment:8 Changed 6 years ago by lunar

Keywords: vidalia added; Tor Browser Vidalia torrc SocksPort "The proxy server is refusing connections" removed

remove useless keywords

comment:9 Changed 4 years ago by cypherpunks

Resolution: fixed
Status: needs_reviewclosed

Is this about fix for Vidalia? Vidalia is deprecated.
Closing as fixed.

comment:10 Changed 18 months ago by teor

Severity: Normal

Set all tickets without a severity to "Normal"

Note: See TracTickets for help on using tickets.