MacOS
This is an extension of #20.
Mojave 10.14.6
go version go1.13 darwin/amd64
I was able to run goTorrent but had to make a minor change.
I changed the default ServerAddr = "192.168.1.8" in config.toml to 127.0.0.1 and the web UI started working at 127.0.0.1:8000.
However, when I tried to download and seed Ubuntu 18.04 I got the following:
(sorry for the long paste)
time="2020-01-05T07:17:13-06:00" level=debug msg="Message From Client" message="{torrentFileSubmit map[FileData:data:application/octet-stream;base64,ZDg6YW... very long string ...n9Q2Vl FileName:ubuntu-18.04.3-live-server-amd64.iso.torrent Label:ubuntu StorageValue:]}"
time="2020-01-05T07:17:13-06:00" level=info msg="Added torrent" clienttorrent=ubuntu-18.04.3-live-server-amd64.iso filename=/Users/developer/code/bradj/goTorrent/uploadedTorrents/ubuntu-18.04.3-live-server-amd64.iso.torrent
time="2020-01-05T07:17:13-06:00" level=debug msg="Message From Client" message="{torrentListRequest <nil>}"
time="2020-01-05T07:17:13-06:00" level=debug msg="Client Requested TorrentList Update" message="{torrentListRequest <nil>}"
time="2020-01-05T07:17:13-06:00" level=debug msg="Current TorrentQueues" Max Active: =5 TorrentQueues="{5 [] [] []}"
time="2020-01-05T07:17:13-06:00" level=debug msg="Previous and Current Torrent Lists for sending to client" previousTorrentList="[]" torrentList="{torrentList 0 []}"
time="2020-01-05T07:17:15-06:00" level=debug msg="Message From Client" message="{torrentListRequest <nil>}"
time="2020-01-05T07:17:15-06:00" level=debug msg="Client Requested TorrentList Update" message="{torrentListRequest <nil>}"
time="2020-01-05T07:17:15-06:00" level=debug msg="Current TorrentQueues" Max Active: =5 TorrentQueues="{5 [] [] []}"
time="2020-01-05T07:17:15-06:00" level=debug msg="Previous and Current Torrent Lists for sending to client" previousTorrentList="[]" torrentList="{torrentList 0 []}"
time="2020-01-05T07:17:18-06:00" level=debug msg="Message From Client" message="{torrentListRequest <nil>}"
time="2020-01-05T07:17:18-06:00" level=debug msg="Client Requested TorrentList Update" message="{torrentListRequest <nil>}"
time="2020-01-05T07:17:18-06:00" level=debug msg="Current TorrentQueues" Max Active: =5 TorrentQueues="{5 [] [] []}"
time="2020-01-05T07:17:18-06:00" level=debug msg="Previous and Current Torrent Lists for sending to client" previousTorrentList="[]" torrentList="{torrentList 0 []}"
time="2020-01-05T07:17:19-06:00" level=debug msg="Message From Client" message="{torrentListRequest <nil>}"
time="2020-01-05T07:17:19-06:00" level=debug msg="Client Requested TorrentList Update" message="{torrentListRequest <nil>}"
time="2020-01-05T07:17:19-06:00" level=debug msg="Current TorrentQueues" Max Active: =5 TorrentQueues="{5 [] [] []}"
time="2020-01-05T07:17:19-06:00" level=debug msg="Previous and Current Torrent Lists for sending to client" previousTorrentList="[]" torrentList="{torrentList 0 []}"
time="2020-01-05T07:17:20-06:00" level=debug msg="Running a torrent Ratio and Queue Check"
time="2020-01-05T07:17:20-06:00" level=error msg="Error selecting torrent with hash!" error="not found" selectedHash=194257a7bf4eaea978f4b5b7fbd3b4efcdd99e43
time="2020-01-05T07:17:23-06:00" level=debug msg="Message From Client" message="{torrentListRequest <nil>}"
time="2020-01-05T07:17:23-06:00" level=debug msg="Client Requested TorrentList Update" message="{torrentListRequest <nil>}"
time="2020-01-05T07:17:23-06:00" level=debug msg="Current TorrentQueues" Max Active: =5 TorrentQueues="{5 [] [] []}"
time="2020-01-05T07:17:23-06:00" level=debug msg="Previous and Current Torrent Lists for sending to client" previousTorrentList="[]" torrentList="{torrentList 0 []}"
I noticed this chunk repeats quite often:
time="2020-01-05T07:31:48-06:00" level=debug msg="Message From Client" message="{torrentListRequest <nil>}"
time="2020-01-05T07:31:48-06:00" level=debug msg="Client Requested TorrentList Update" message="{torrentListRequest <nil>}"
time="2020-01-05T07:31:48-06:00" level=debug msg="Current TorrentQueues" Max Active: =5 TorrentQueues="{5 [] [] []}"
time="2020-01-05T07:31:48-06:00" level=debug msg="Previous and Current Torrent Lists for sending to client" previousTorrentList="[]" torrentList="{torrentList 0 []}"
I tried again, but this time I specified the Label and StorageValue. This failed as well.
... very long string ...
FileName:ubuntu-18.04.3-live-server-amd64.iso.torrent Label:ubuntu StorageValue:/Users/developer/Downloads]}"
time="2020-01-05T07:31:31-06:00" level=info msg="Added torrent" clienttorrent=ubuntu-18.04.3-live-server-amd64.iso filename=/Users/developer/code/bradj/goTorrent/uploadedTorrents/ubuntu-18.04.3-live-server-amd64.iso.torrent
time="2020-01-05T07:31:54-06:00" level=debug msg="Running a torrent Ratio and Queue Check"
time="2020-01-05T07:31:54-06:00" level=error msg="Error selecting torrent with hash!" error="not found" selectedHash=194257a7bf4eaea978f4b5b7fbd3b4efcdd99e43
I noticed logs were being printed to stdout that were not making it into logs/server.log which were revealing:
go-libutp: 2020/01/05 07:31:54 callbacks.go:67: error sending packet: write udp6 [::]:55163->[2408:824e:3b0b:6990:80b5:b6c1:3e88:41ce]:2169: sendto: no route to host
go-libutp: 2020/01/05 07:31:54 callbacks.go:67: error sending packet: write udp6 [::]:55163->[2001:bc8:32d7:15b::]:64939: sendto: no route to host
go-libutp: 2020/01/05 07:31:55 callbacks.go:67: error sending packet: write udp6 [::]:55163->[2408:824e:3b0b:6990:c1c5:b3f:c6be:6fbd]:2169: sendto: no route to host
I disabled IPV6 in config.toml: DisableIPv6 = true #boolean
It failed with the previous error in server.log - "Error selecting torrent with hash!".
Here is stdout with IPV6 enabled:
[7:30:52] developer:goTorrent git:(master*) $ ./goTorrent
Failed creating 64-bit integer for goTorrent Port! strconv.ParseInt: parsing "": invalid syntax
Logging to file logs/server.log
2020-01-05 07:30:56 portfwd.go:31: discovered 0 upnp devices
2020-01-05 07:31:10 client.go:324: completed bootstrap, [{*dht.Server [dht server on [::]:55163]} {*torrent.Client [0xc00015e840]} {dht.TraversalStats [{9 0}]}]
Websocket connection established, awaiting authentication
ClientAuthToken: [MYTOKEN] TokenOkay true PayloadData map[ClientAuthString:[MYTOKEN]] PayloadData Okay? true
Authstring [MYTOKEN]
Claims <nil> <nil>
2020-01-05 07:31:22 client.go:324: completed bootstrap, [{*dht.Server [dht server on 0.0.0.0:55163]} {*torrent.Client [0xc00015e840]} {dht.TraversalStats [{9741 7718}]}]
go-libutp: 2020/01/05 07:31:54 callbacks.go:67: error sending packet: write udp6 [::]:55163->[2408:824e:3b0b:6990:80b5:b6c1:3e88:41ce]:2169: sendto: no route to host
go-libutp: 2020/01/05 07:31:54 callbacks.go:67: error sending packet: write udp6 [::]:55163->[2001:bc8:32d7:15b::]:64939: sendto: no route to host
go-libutp: 2020/01/05 07:31:55 callbacks.go:67: error sending packet: write udp6 [::]:55163->[2408:824e:3b0b:6990:c1c5:b3f:c6be:6fbd]:2169: sendto: no route to host
^C
Here is stdout with IPV6 disabled:
[7:40:56] developer:goTorrent git:(master*) $ ./goTorrent
Failed creating 64-bit integer for goTorrent Port! strconv.ParseInt: parsing "": invalid syntax
Logging to file logs/server.log
2020-01-05 07:41:04 portfwd.go:31: discovered 0 upnp devices
2020-01-05 07:41:33 client.go:324: completed bootstrap, [{*dht.Server [dht server on 0.0.0.0:57816]} {*torrent.Client [0xc0000ac840]} {dht.TraversalStats [{10147 8009}]}]
Websocket connection established, awaiting authentication
ClientAuthToken: [MYTOKEN] TokenOkay true PayloadData map[ClientAuthString:[MYTOKEN]] PayloadData Okay? true
Authstring [MYTOKEN]
Claims <nil> <nil>
^C
I was bored this morning and decided to poke around on this issue since I have a couple MBP's lying around. Hopefully you've found this helpful. Let me know if you need anything else.