Ticket #240 (closed defect: duplicate)

Opened 21 months ago

Last modified 18 months ago

Error Connecting: Connection Refused.

Reported by: vidalia Owned by: developer
Priority: normal Milestone:
Component: Vidalia Version: 0.0.11
Keywords: exit unexpected connection refused Cc: will.h.brown@…

Description

Vidalia version: 0.0.11
Tor version: 0.1.1.26
OS: Ubuntu Feisty Fawn (7.04)
uname -a: Linux phil 2.6.20-15-386 #2 Sun Apr 15 07:34:00 UTC 2007 i686 GNU/Linux

When I start Vidalia (I use tor as root, so I start Vidalia as root as well), I immediately get a message that says "Vidalia Detected that Tor Exited Unexpectedly. Please check the message log for indicators about what happened to Tor before it exited" shortly followed by a dialog that says "Error connecting to 127.0.0.1:9051 [Connection Refused]".

The message log says the following:

May 02 21:49:02:283 [Notice] Tor v0.1.1.26. This is experimental software. Do not rely on it for strong anonymity.
May 02 21:49:02:284 [Notice] Initialized libevent version 1.1a using method epoll. Good.
May 02 21:49:02:285 [Notice] connection_create_listener(): Opening Socks listener on 127.0.0.1:9050
May 02 21:49:02:285 [Notice] connection_create_listener(): Opening Control listener on 127.0.0.1:9051

none of which is red or yellow, nor does it hint at any sort of error in Tor. I port scanned myself right after getting this error message and it says that neither 9050 nor 9051 are open.

Vidalia does stay open and sits in the system tray. If I right click it and press "Start", the same things happen again.

Thank you in advance for your help!

Change History

Changed 21 months ago by edmanm

  • milestone Vidalia 0.0.12 deleted

When Vidalia tells you Tor has exited, has Tor really exited? Do you have some funky firewall or SELinux stuff that makes Vidalia unable to connect to Tor's control port?

Also, you probably don't really want to be running Tor as root.

Also also, port scanning yourself is probably not the best way to try to debug this. Just check the running processes to see if Tor is running. If it is and you can telnet to localhost:9051, then Vidalia should be able to connect as well. If not, then, well, something else is wrong. :)

Changed 21 months ago by vidalia

Tor really has exited... ps -ef | grep tor says no tor, and telnet localhost:9051 says telnet: could not resolve localhost:9051/telnet: Name or service not known.

There's no firewall actually on the machine. I have a firewalled router between me and the internet, but that shouldn't make a difference, right?

The problem with not running it as root is that when I chown /var/lib/tor to myself and try to start tor, I get an error message saying that I don't have enough user permissions to set the GID of the program. The only way I've been able to get around that without mucking about with the users and permissions is to run the program as root.

I guess that I should also mention that I get the same sketchy results when I just run tor on the command line. I get exactly the same message that I put in the ticket above, the program stops without any error message, and ports 9050 and 9051 stay sealed tight.

Changed 21 months ago by edmanm

Hm. If Tor exits without displaying any error message, even when you are just running it from the command line, then something else is wrong outside of Vidalia.

Did you make any changes to your torrc?

chowning /var/lib/tor is also probably not what you want to do. On Debian or Ubuntu, it's smarter to just use /etc/init.d/tor start. Or, you can let Vidalia run Tor for you as whatever user you're logged in as, without specifying anything for the "Run As User" or "Run As Group" settings.

Changed 21 months ago by vidalia

I'm getting closer, but I'm still confused.

I reinstalled tor (using apt-get) to no avail, but then I tried using /etc/init.d/tor start and it works like a charm. Tor starts and stays started.

Ports 9050 and 9051, however, are still closed according to both telnet and nmap.

When I start vidalia (as my normal user, haldean) I get this error message:

May 03 21:39:48:857 [Notice] Tor v0.1.1.26. This is experimental software. Do not rely on it for strong anonymity.
May 03 21:39:48:926 [Notice] Initialized libevent version 1.1a using method epoll. Good.
May 03 21:39:48:928 [Warning] /var/lib/tor is not owned by this user (haldean, 1000) but by debian-tor (114). Perhaps you are running Tor as the wrong user?
May 03 21:39:48:931 [Warning] Failed to parse/validate config: Couldn't access/create private data directory "/var/lib/tor"
May 03 21:39:48:932 [Error] tor_init(): Reading config failed--see warnings above. For usage, try -h.

but no "Connection Refused" error message like I got before. When I try running Vidalia as root (to try and overcome the permissions problems from the normal Vidalia run), I get the following error messages:

May 03 21:43:41:826 [Notice] Tor v0.1.1.26. This is experimental software. Do not rely on it for strong anonymity.
May 03 21:43:41:826 [Notice] Initialized libevent version 1.1a using method epoll. Good.
May 03 21:43:41:827 [Warning] /var/lib/tor is not owned by this user (root, 0) but by debian-tor (114). Perhaps you are running Tor as the wrong user?
May 03 21:43:41:828 [Warning] Failed to parse/validate config: Couldn't access/create private data directory "/var/lib/tor"
May 03 21:43:41:829 [Error] tor_init(): Reading config failed--see warnings above. For usage, try -h.

shortly followed by a familiar dialog stating that it could not connect to port 9051, and that the connection was refused.

The Tor that I ran that from had no changes to any configuration files, but usually when installing through apt-get the config files are pre-made, so that's pretty normal for me. Maybe I have a value wrong somewhere...?

Changed 21 months ago by vidalia

Sorry... I lied. I do get the "Connection Refused" error message when running it as the normal user.

Changed 20 months ago by edmanm

If you want to run Tor via /etc/init.d/tor start, you will need to tell Tor you want a control port open. You would add the line ControlPort 9051 (or uncomment the existing line) to tor /etc/tor/torrc and then reload Tor.

The rest of this ticket sounds like Ticket #239. Do you agree?

Changed 18 months ago by edmanm

  • status changed from new to closed
  • resolution set to duplicate

Half of this ticket is due to the user needing to add ControlPort 9051 to their torrc. The other half seems to be a duplicate of Ticket #23. Closing as a duplicate.

Note: See TracTickets for help on using tickets.