HelloZeroNet / HelloZeroNet/ZeroNet

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

オープン
#1,387 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
18.8k
フォーク
2.3k
PR マージ指標
30日以内にマージされた PR はありません

説明

### 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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
networking, security
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。