[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #6996 [Obfsproxy]: Problems with starting managed Obfsproxy server when installed via debian package and with Tor as service
#6996: Problems with starting managed Obfsproxy server when installed via debian
package and with Tor as service
-----------------------+----------------------------------------------------
Reporter: linda | Owner: asn
Type: defect | Status: new
Priority: normal | Milestone:
Component: Obfsproxy | Version: Tor: 0.2.3.22-rc
Keywords: | Parent:
Points: | Actualpoints:
-----------------------+----------------------------------------------------
Comment(by linda):
Replying to [comment:1 asn]:
> I can't reproduce this behavior with the same Ubuntu version and the
Debian obfsproxy package. It might be something in your environment.
>
> What happens if you try to run tor without the init script?
> Can you try:
> {{{tor -f torrc}}}
> where tor points to your tor binary, and torrc to your torrc file?
YES! It must be the init script:
{{{
linda@vm05:~$ tor -f /etc/tor/torrc
Oct 01 07:12:50.618 [notice] Tor v0.2.3.22-rc (git-4a0c70a817797420)
running on Linux.
...
Oct 01 07:12:53.000 [notice] Registered server transport 'obfs2' at
'0.0.0.0:8082'
Oct 01 07:13:02.000 [notice] Bootstrapped 100%: Done.
Oct 01 07:13:02.000 [notice] Now checking whether ORPort 128.18.9.70:8888
is reachable... (this may take up to 20 minutes -- look for log messages
indicating success)
Oct 01 07:13:05.000 [notice] Self-testing indicates your ORPort is
reachable from the outside. Excellent. Publishing server descriptor.
^Z
[1]+ Stopped tor -f /etc/tor/torrc
linda@vm05:~$ bg
[1]+ tor -f /etc/tor/torrc &
linda@vm05:~$ sudo grep Transport /var/lib/tor/state
linda@vm05:~$ sudo grep Transport /var/tor/state
TransportProxy obfs2 0.0.0.0:8082
linda@vm05:~$ ps axu | grep obfs
linda 16315 0.0 0.0 19024 1824 pts/0 S 07:12 0:00
/usr/bin/obfsproxy --managed
}}}
Hmmmm. It uses the {{{state}}} under {{{/var/tor/}}} (with a little hack
to force it using our open port 8082). When using the init script, I
think it wants to write to {{{/var/lib/tor/state}}}, which is why I had
originally changes the permissions for those files (with no luck).
I haven't done anything to the init script since installing Tor for the
first time on this machine in version 0.2.2.x (I think Dec. 2011).
Maybe you can share your init script since it seems to work? (I'm not
really an expert on administrating Linux/Debian/Ubuntu, so not very
familiar with the workings of {{{/etc/init.d/}}} and {{{sudo service XXX
start|stop}}})
Now I'm trying to add all the options in {{{/usr/share/tor/tor-service-
defaults-torrc}}} to the command line to see if it reproduces the error.
It works if I leave out {{{User debian-tor}}}:
{{{
linda@vm05:~$ more /usr/share/tor/tor-service-defaults-torrc
DataDirectory /var/lib/tor
PidFile /var/run/tor/tor.pid
RunAsDaemon 1
User debian-tor
ControlSocket /var/run/tor/control
ControlSocketsGroupWritable 1
CookieAuthentication 1
CookieAuthFileGroupReadable 1
CookieAuthFile /var/run/tor/control.authcookie
Log notice file /var/log/tor/log
linda@vm05:~$ sudo -u debian-tor tor -f /etc/tor/torrc DataDirectory
/var/lib/tor RunAsDaemon 1 Log "notice file /var/log/tor/log"
ControlSocket /var/run/tor/control ControlSocketsGroupWritable 1 PidFile
/var/run/tor/tor.pid CookieAuthentication 1 CookieAuthFileGroupReadable 1
CookieAuthFile /var/run/tor/control.authcookie
Oct 01 07:44:16.272 [notice] Tor v0.2.3.22-rc (git-4a0c70a817797420)
running on Linux.
Oct 01 07:44:16.272 [notice] Tor can't help you if you use it wrong! Learn
how to be safe at https://www.torproject.org/download/download#warning
Oct 01 07:44:16.272 [notice] Read configuration file "/etc/tor/torrc".
Oct 01 07:44:16.274 [notice] Your ContactInfo config option is not set.
Please consider setting it, so we can contact you if your server is
misconfigured or something else goes wrong.
Oct 01 07:44:16.274 [notice] We were compiled with headers from version
2.0.16-stable of Libevent, but we're using a Libevent library that says
it's version 2.0.19-stable.
Oct 01 07:44:16.275 [notice] Initialized libevent version 2.0.19-stable
using method epoll (with changelist). Good.
Oct 01 07:44:16.275 [notice] Opening Control listener on
/var/run/tor/control
Oct 01 07:44:16.275 [notice] Opening OR listener on 0.0.0.0:8888
linda@vm05:~$ sudo grep obfs /var/log/tor/log
Oct 01 07:44:19.000 [notice] Registered server transport 'obfs2' at
'0.0.0.0:53224'
linda@vm05:~$ sudo grep Transport /var/lib/tor/state
TransportProxy obfs2 0.0.0.0:53224
}}}
However, if I add the user as an option, tor doesn't even come up.
Nothing else gets printed into {{{/var/log/tor/log}}}:
{{{
linda@vm05:~$ sudo -u debian-tor tor -f /etc/tor/torrc DataDirectory
/var/lib/tor RunAsDaemon 1 Log "notice file /var/log/tor/log"
ControlSocket /var/run/tor/control ControlSocketsGroupWritable 1 PidFile
/var/run/tor/tor.pid CookieAuthentication 1 CookieAuthFileGroupReadable 1
CookieAuthFile /var/run/tor/control.authcookie User debian-tor
Oct 01 07:47:37.331 [notice] Tor v0.2.3.22-rc (git-4a0c70a817797420)
running on Linux.
Oct 01 07:47:37.331 [notice] Tor can't help you if you use it wrong! Learn
how to be safe at https://www.torproject.org/download/download#warning
Oct 01 07:47:37.331 [notice] Read configuration file "/etc/tor/torrc".
Oct 01 07:47:37.334 [notice] Your ContactInfo config option is not set.
Please consider setting it, so we can contact you if your server is
misconfigured or something else goes wrong.
Oct 01 07:47:37.334 [notice] We were compiled with headers from version
2.0.16-stable of Libevent, but we're using a Libevent library that says
it's version 2.0.19-stable.
Oct 01 07:47:37.334 [notice] Initialized libevent version 2.0.19-stable
using method epoll (with changelist). Good.
Oct 01 07:47:37.335 [notice] Opening Control listener on
/var/run/tor/control
Oct 01 07:47:37.335 [notice] Opening OR listener on 0.0.0.0:8888
Oct 01 07:47:37.335 [warn] Error setting groups to gid 115: "Operation not
permitted".
Oct 01 07:47:37.335 [warn] Tor is already running as debian-tor. You do
not need the "User" option if you are already running as the user you want
to be. (If you did not set the User option in your torrc, check whether
it was specified on the command line by a startup script.)
Oct 01 07:47:37.335 [warn] Failed to parse/validate config: Problem with
User value. See logs for details.
Oct 01 07:47:37.335 [err] Reading config failed--see warnings above.
}}}
Does this give you any clues?
Thanks!
Linda
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6996#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs