HelloZeroNet / HelloZeroNet/ZeroNet

[issue] Zeronet ignores tor = always if started through systemd

Ouverte
#1,387 4 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
18.8k
Forks
2.3k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### Step 1: Please describe your environment

* ZeroNet version: 0.6.2 (3408)
* Operating system: Raspbian Stretch
* Web browser: Waterfox 56.1.0
* Tor status: always
* Opened port: no
* Special configuration:

### Step 2: Describe the problem:
If I start zeronet by a systemd unit on bootup, it doesn't connect to Tor.

#### Steps to reproduce:

1. create a zeronet.service file at /lib/systemd/system/
2. put in this
```
[Unit]
Description=Zeronet daemon
Wants=tor.service
After=network.target tor.service

[Service]
EnvironmentFile=/home/pi/ZeroNet-master/zeronet.conf
ExecStart=/home/pi/ZeroNet-master/zeronet.py --tor always
User=
TimeoutStopSec=30min

[Install]
WantedBy=multi-user.target
```

3. execute
```
sudo systemctl daemon-reload
sudo systemctl enable zeronet.service
sudo reboot
```

#### Observed Results:

It displays this
![grafik](https://user-images.githubusercontent.com/30392780/38772669-b5652842-403c-11e8-897a-9e85d4d6c8c9.png)
error message in the top right corner but it's working fine. It just connects to the zeronet without tor and. The errorlog states:
```
[2018-04-14 15:57:15,386] WARNING TorManager Tor controller connect error: error: [Errno 111] Connection refused in TorManager.py line 170 > _socket2.py line 228
[2018-04-14 15:57:15,386] INFO TorManager Starting self-bundled Tor, due to Tor proxy port 127.0.0.1:9050 check error: No connection
```

#### Expected Results:

Zeronet shouldn't establish any connection when Tor isn't reachable and should try to reconnect to Tor if it wasn't available during the initialization.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Start with TorManager.py around line 170 and the zeronet.py startup path invoked by the systemd unit. Reproduce the boot-time failure with the supplied service configuration, then trace Tor availability handling. Done means ZeroNet does not fall back to a non-Tor connection when Tor is unavailable and retries once Tor becomes reachable.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
networking, security
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.