tor2web / Tor2web

Tor2web is an HTTP proxy software that enables access to Tor Hidden Services by mean of common web browsers
https://www.tor2web.org
GNU Affero General Public License v3.0
705 stars 176 forks source link

Tor2Web errors #321

Closed tylerluciani33 closed 7 years ago

tylerluciani33 commented 7 years ago

I have not used Tor2Web in a while, in the past everything worked fine (following the setup guide) Now I am getting the errors below when starting tor2web

Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
Failure: twisted.spread.pb.PBConnectionLost: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.
]
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
Failure: twisted.spread.pb.PBConnectionLost: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.
]
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
Failure: twisted.spread.pb.PBConnectionLost: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.
]
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
Failure: twisted.spread.pb.PBConnectionLost: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.
]
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
Failure: twisted.spread.pb.PBConnectionLost: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.
]
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
Failure: twisted.spread.pb.PBConnectionLost: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.
]
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
Failure: twisted.spread.pb.PBConnectionLost: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.
]
sys.excepthook is missing
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/tor2web/t2w.py", line 1598, in <module>
    os.chmod(os.path.join(config.rundir, "rpc.socket"), 0600)
OSError: [Errno 2] No such file or directory: '/var/run/tor2web/rpc.socket'
sys.excepthook is missing
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/tor2web/t2w.py", line 1598, in <module>
    os.chmod(os.path.join(config.rundir, "rpc.socket"), 0600)
OSError: [Errno 2] No such file or directory: '/var/run/tor2web/rpc.socket'
sys.excepthook is missing
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/tor2web/t2w.py", line 1598, in <module>
    os.chmod(os.path.join(config.rundir, "rpc.socket"), 0600)
OSError: [Errno 2] No such file or directory: '/var/run/tor2web/rpc.socket'
sys.excepthook is missing
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/tor2web/t2w.py", line 1598, in <module>
    os.chmod(os.path.join(config.rundir, "rpc.socket"), 0600)
OSError: [Errno 2] No such file or directory: '/var/run/tor2web/rpc.socket'

Config

# Tor2web configuration file
[main]

# unique nodename identifier
nodename = NODENAME

# path to Tor2web data directory
datadir = /home/tor2web

# debug and logging
logreqs = False
debugmode = False
debugtostdout = False

# processes (suggested number of cores + 1)
processes = 5
requests_per_process = 100000

# ip addresses and ports
transport = HTTP
listen_ipv4 = 111.111.111.111
# listen_ipv6 = [LISTENING_IPV6_ADDRESS]
listen_port_http = 80
# listen_port_https = 443

# This is the base hostname for the current tor2web node
basehost = WEBSITE.COM

# This is the SOCKS host and port on which Tor is listening
sockshost = 127.0.0.1
socksport = 9050
socksoptimisticdata = True
sockmaxpersistentperhost = 5
sockcachedconnectiontimeout = 240
sockretryautomatically = True

# SSL configuration
ssl_key = /home/tor2web/certs/tor2web-key.pem
ssl_cert = /home/tor2web/certs/tor2web-cert.pem
# BE SURE TO CONFIGURE THE INTERMEDIATE CA OR YOUR WEB BROWSER WILL GIVES OUT VERY BAD WARNING AND ERRORS
ssl_intermediate = /home/tor2web/certs/tor2web-intermediate.pem
# TO GENERATE DH Parameters: 
#    $ cd /home/tor2web/certs/
#    $ openssl dhparam -out tor2web-dh.pem 2048
ssl_dh = /home/tor2web/certs/tor2web-dh.pem
cipher_list = ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-AES128-SHA:DES-CBC3-SHA
ssl_tofu_cache_size = 100

# Access Blocking
mode = TRANSLATION
onion = ONIONSITE.ONION
blockcrawl = True
overriderobotstxt = True
blockhotlinking = False
# blockhotlinking_exts = [jpg, png, gif]

# Add special HTTP headers
# this option allows to add headers to response sent to the client
# if you don't know what this you don't need it.
# extra_HTTP_headers_to_response = [ 'Cache-Control: max-age=600', 'Surrogate-Control: max-age=86400' ]

# Disable the automagical redirect of Tor user on Tor HSs
disable_tor_redirection = True

# Disable the GetTor functionality
disable_gettor = True

# If set to True will disable the tor2web disclaimer
disable_disclaimer = True

# If set to True will disable the tor2web banner
disable_banner = True

# If set to True will avoid rewriting visible data (experimental; will result in less functional proxy)
# Could be useful in relation to DMCA for US law only
# avoid_rewriting_visible_content = True

# Mail configuration for automatic exceptions notification and user abuse notice
# smtpuser = [USERNAME]
# smtppass = [PASSWORD]
# smtpmail = [EMAIL]
# smtpmailto_exceptions = [EMAIL_FOR_ABUSES_EXCEPTIONS]
# smtpmailto_notifications = [EMAIL_FOR_ABUSES_NOTIFICATION]
# smtpdomain = [DOMAIN]
# smtpport = [PORT]

# Exit nodes list refresh period (in seconds)
# exit_node_list_refresh = 600

# The following configuration parameters permits to enable automatic fetching of the hashed blocklist
# automatic_blocklist_updates_source = https://ahmia.fi/bannedMD5.txt
# automatic_blocklist_updates_refresh = 600
# automatic_blocklist_updates_mode = MERGE

# The following configuration parameter permit to publish blocklist
# lists will be available at /antanistaticmap/lists/blocklist
# publish_blocklist = False

# List of mirrors shown in Tor2web disclaimer and banner
# An updated list of know mirrors can be found at: https://github.com/globaleaks/tor2web/wiki
# mirror = [tor2web.org, mirror2.tld, mirror3.tld, ...]

# This allows Tor2web to make use a simple TCP proxies
# dummyproxy = https://127.0.0.1:8080
evilaliv3 commented 7 years ago

Thank you @tylerluciani33

In my opinion something is wrong with Tor2web trying to setup the certificate even if you configured to use just HTTP.

Let me recheck and i will be back to you with an update.

evilaliv3 commented 7 years ago

@tylerluciani33 what version of tor2web are you currently using?

you can read it with: dpkg -l | awk '$2=="tor2web" { print $3 }'

tylerluciani33 commented 7 years ago

Thanks for getting back to me so quickly I followed the installation guide

Version: 3.1.66

evilaliv3 commented 7 years ago

Ok, that version had an issue and i've just released a 3.1.67 that fix it.Anyhow your issue is probably different.

I'm going to retest you exact configuration to understand and be back to you.

evilaliv3 commented 7 years ago

@tylerluciani33: actually nothing is wrong in your configuration.

Maybe you have a service running and using port 80? Next versions will try to allocate this resources the sooner so to identify issues before trying to spawn the child workers that handle requests.

What ubuntu version are you using? Do you have apparmor enabled? If yes do you see any error in dmes related to apparmor? If apparmor is enabled you can disable it with the following commands:

echo "APPARMOR_SANDBOXING=0" >> /etc/defaults/tor2web
/etc/init.d./apparmor restart
tylerluciani33 commented 7 years ago

I am using ubuntu 14.04 x64 Nothing else is running on port 80

I disabled apparmor in /etc/defaults/tor2web

Just tried reinstalling the server and installing tor2web on a clean install but I am still getting the same errors

chepurko commented 7 years ago

@tylerluciani33 Does this help?

evilaliv3 commented 7 years ago

Closing as outdated.