tor2web dont start

Kernels & Hardware, configuring network, installing services

tor2web dont start

Postby yohoho » 2020-01-12 15:27

DEBIAN9
/etc/tor2web.conf
Code: Select all
# Tor2web configuration file
[main]

# Unique nodename identifier
# nodename = [UNIQUE_IDENTIFIER]

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

# Debug and logging
logreqs = True
debugmode = True
debugtostdout = True

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

# Ip addresses and ports
transport = BOTH
listen_ipv4 = [LISTENING_IPV4_ADDRESS]
listen_ipv6 = [LISTENING_IPV6_ADDRESS]
listen_port_http = 80
listen_port_https = 443

# This is the base hostname for the current tor2web node
# basehost = AUTO

# 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 RESPOND
# WITH VERY LOUD WARNINGS 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
ssl_tofu_cache_size = 100

# Access Blocking
mode = TRANSLATION
onion = my_address.onion
# blockhotlinking = True
# blockhotlinking_exts = [jpg, png, gif]


# Add special HTTP headers
# This option makes it possible to add headers to responses sent to clients.
# Do NOT use this unless you are positive you 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 = False

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

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

# 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 exception and user abuse notifications
# 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

# Enables the 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

# This publishes blocklist which 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 of a simple TCP proxies
# dummyproxy = https://127.0.0.1:8080

systemctl status tor2web.service
Code: Select all
● tor2web.service - LSB: Start the Tor2web proxy.
   Loaded: loaded (/etc/init.d/tor2web; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2020-01-10 11:10:36 MSK; 6min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 16783 ExecStart=/etc/init.d/tor2web start (code=exited, status=1/FAILURE)

sudo journalctl -xe
Code: Select all
Unit tor2web.service has begun starting up.
Jan 10 11:22:41 server.domain.com tor2web[16966]: WARNING: Missing Apparmor Sandboxing support
Jan 10 11:22:41 server.domain.com tor2web[16966]: Starting Tor2web tor2web...Starting tor (via
Jan 10 11:22:41 server.domain.com tor2web[16966]: Traceback (most recent call last):
Jan 10 11:22:41 server.domain.com tor2web[16966]:   File "/usr/lib/python3/dist-packages/tor2w
Jan 10 11:22:41 server.domain.com tor2web[16966]:     from tor2web.utils.mail import sendmail,
Jan 10 11:22:41 server.domain.com tor2web[16966]:   File "/usr/lib/python3/dist-packages/tor2w
Jan 10 11:22:41 server.domain.com tor2web[16966]:     from twisted.mail.smtp import ESMTPSende
Jan 10 11:22:41 server.domain.com tor2web[16966]: ImportError: No module named 'twisted.mail.s
Jan 10 11:22:42 server.domain.com tor2web[16966]: Traceback (most recent call last):
Jan 10 11:22:42 server.domain.com tor2web[16966]:   File "/usr/lib/python3/dist-packages/tor2w
Jan 10 11:22:42 server.domain.com tor2web[16966]:     from tor2web.utils.mail import sendmail,
Jan 10 11:22:42 server.domain.com tor2web[16966]:   File "/usr/lib/python3/dist-packages/tor2w
Jan 10 11:22:42 server.domain.com tor2web[16966]:     from twisted.mail.smtp import ESMTPSende
Jan 10 11:22:42 server.domain.com tor2web[16966]: ImportError: No module named 'twisted.mail.s
Jan 10 11:22:42 server.domain.com tor2web[16966]:  failed!
Jan 10 11:22:42 server.domain.com systemd[1]: tor2web.service: Control process exited, code=ex
Jan 10 11:22:42 server.domain.com systemd[1]: Failed to start LSB: Start the Tor2web proxy..
-- Subject: Unit tor2web.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit tor2web.service has failed.
--
-- The result is failed.
Jan 10 11:22:42 server.domain.com polkitd(authority=local)[14971]: Unregistered Authentication
Jan 10 11:22:42 server.domain.com systemd[1]: tor2web.service: Unit entered failed state.
Jan 10 11:22:42 server.domain.com systemd[1]: tor2web.service: Failed with result 'exit-code'.
Jan 10 11:22:55 server.domain.com sshd[17032]: Did not receive identification string from 222.
Jan 10 11:22:55 server.domain.com sudo[17033]:  tor2web : TTY=pts/0 ; PWD=/home/tor2web ; USER
Jan 10 11:22:55 server.domain.com sudo[17033]: pam_unix(sudo:session): session opened for user
lines 1685-1716/1716 (END)
yohoho
 
Posts: 7
Joined: 2019-12-22 05:26

Re: tor2web dont start

Postby Pakos » 2020-01-13 19:16

do you have python3-twisted installed? it should have twisted.mail.smtp
User avatar
Pakos
 
Posts: 99
Joined: 2008-03-08 17:36

Re: tor2web dont start

Postby yohoho » 2020-01-14 12:21

Yes.
I change os to ubuntu 18.
Code: Select all
apt search python3-twisted
Sorting... Done
Full Text Search... Done
python3-twisted/bionic,bionic,now 17.9.0-2 all [installed]
  Event-based framework for internet applications

python3-twisted-bin/bionic,now 17.9.0-2 amd64 [installed,automatic]
  Event-based framework for internet applications

systemctl status tor2web.service
Code: Select all
● tor2web.service - LSB: Start the Tor2web proxy.
   Loaded: loaded (/etc/init.d/tor2web; generated)
   Active: failed (Result: exit-code) since Mon 2020-01-13 23:42:49 MSK; 16h ago
     Docs: man:systemd-sysv-generator(8)
  Process: 6879 ExecStart=/etc/init.d/tor2web start (code=exited, status=1/FAILURE)

Jan 13 23:42:47 server.domain systemd[1]: Starting LSB: Start the Tor2web proxy....
Jan 13 23:42:47 server.domain tor2web[6879]:  * Starting Tor2web tor2web...
Jan 13 23:42:47 server.domain tor2web[6879]: Starting tor (via systemctl): tor.service.
Jan 13 23:42:48 server.domain tor2web[6879]: Tor2web Startup Failure: error while binding on :: 80 ([Errno 98] Address already in use)
Jan 13 23:42:49 server.domain tor2web[6879]:    ...fail!
Jan 13 23:42:49 server.domain systemd[1]: tor2web.service: Control process exited, code=exited status=1
Jan 13 23:42:49 server.domain systemd[1]: tor2web.service: Failed with result 'exit-code'.
Jan 13 23:42:49 server.domain systemd[1]: Failed to start LSB: Start the Tor2web proxy..
yohoho
 
Posts: 7
Joined: 2019-12-22 05:26

Re: tor2web dont start

Postby Pakos » 2020-01-14 20:11

well once again it's written in log

Tor2web Startup Failure: error while binding on :: 80

something is already running, probably apache, nginx or something?

try lsof -i :80 and see what is it.
User avatar
Pakos
 
Posts: 99
Joined: 2008-03-08 17:36

Re: tor2web dont start

Postby yohoho » 2020-01-16 13:08

Thanks, nginx occupied port 80. This issue has been resolved.
New error.
systemctl status tor2web.service
Code: Select all
● tor2web.service - LSB: Start the Tor2web proxy.
   Loaded: loaded (/etc/init.d/tor2web; generated)
   Active: active (running) since Thu 2020-01-16 16:19:38 MSK; 24min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 559 ExecStart=/etc/init.d/tor2web start (code=exited, status=0/SUCCESS)
    Tasks: 7 (limit: 3536)
   CGroup: /system.slice/tor2web.service
           ├─1946 python3 /usr/lib/python3/dist-packages/tor2web/t2w.py --pidfile /var/run/tor2web/t2w.pid --uid tor2web --gid tor2web --command=start
           ├─1948 /usr/bin/python3 /usr/lib/python3/dist-packages/tor2web/t2w.py --pidfile /var/run/tor2web/t2w.pid --uid tor2web --gid tor2web --command=start
           ├─1949 /usr/bin/python3 /usr/lib/python3/dist-packages/tor2web/t2w.py --pidfile /var/run/tor2web/t2w.pid --uid tor2web --gid tor2web --command=start
           ├─1952 /usr/bin/python3 /usr/lib/python3/dist-packages/tor2web/t2w.py --pidfile /var/run/tor2web/t2w.pid --uid tor2web --gid tor2web --command=start
           ├─1953 /usr/bin/python3 /usr/lib/python3/dist-packages/tor2web/t2w.py --pidfile /var/run/tor2web/t2w.pid --uid tor2web --gid tor2web --command=start
           └─1954 /usr/bin/python3 /usr/lib/python3/dist-packages/tor2web/t2w.py --pidfile /var/run/tor2web/t2w.pid --uid tor2web --gid tor2web --command=start

Jan 16 16:19:36 server.domain systemd[1]: Starting LSB: Start the Tor2web proxy....
Jan 16 16:19:36 server.domain tor2web[559]:  * Starting Tor2web tor2web...
Jan 16 16:19:36 server.domain tor2web[559]: Starting tor (via systemctl): tor.service.
Jan 16 16:19:38 server.domain tor2web[559]:    ...done.
Jan 16 16:19:38 server.domain systemd[1]: Started LSB: Start the Tor2web proxy..
Jan 16 16:38:07 server.domain tor2web[559]: Unhandled error in Deferred:

killall tor2web
strace -f -vvv -o strace-tor2web.out tor2web --pidfile /var/run/tor2web/t2w.pid --uid tor2web --gid tor2web --nodaemon --command=start
Code: Select all
2020-01-16 16:54:22+0300 [-] Log opened.
2020-01-16 16:54:22+0300 [-] PBServerFactory starting on '/var/run/tor2web/rpc.socket'
2020-01-16 16:54:22+0300 [-] Starting factory <twisted.spread.pb.PBServerFactory object at 0x7f2e08f49dd8>
2020-01-16 16:54:22+0300 [-] Starting factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.<locals>.quiescentCallback at 0x7f2e08fb30d0>, <twisted.internet.endpoints._WrapperEndpoint object at 0x7f2e08fa5b70>)
2020-01-16 16:54:23+0300 [-] Stopping factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.<locals>.quiescentCallback at 0x7f2e08fb30d0>, <twisted.internet.endpoints._WrapperEndpoint object at 0x7f2e08fa5b70>)

After access my clen net domain.
Code: Select all
2020-01-16 16:54:22+0300 [-] Log opened.
2020-01-16 16:54:22+0300 [-] PBServerFactory starting on '/var/run/tor2web/rpc.socket'
2020-01-16 16:54:22+0300 [-] Starting factory <twisted.spread.pb.PBServerFactory object at 0x7f2e08f49dd8>
2020-01-16 16:54:22+0300 [-] Starting factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.<locals>.quiescentCallback at 0x7f2e08fb30d0>, <twisted.internet.endpoints._WrapperEndpoint object at 0x7f2e08fa5b70>)
2020-01-16 16:54:23+0300 [-] Stopping factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.<locals>.quiescentCallback at 0x7f2e08fb30d0>, <twisted.internet.endpoints._WrapperEndpoint object at 0x7f2e08fa5b70>)
Unhandled error in Deferred:
yohoho
 
Posts: 7
Joined: 2019-12-22 05:26


Return to System configuration

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable