-
-
Notifications
You must be signed in to change notification settings - Fork 628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webseed in https not working #966
Comments
This is not specific to https issue. When I am using v1.56.0 I am seeing below error banning webseed peer for "https://######/parcel/download/some.parcel" for being sole dirtier of piece 6 after failed piece check [ github.com/anacrolix/torrent torrent.go:2458 ] I have tried to run master I don't see the same issue. Still I see when there is a gap the webseed don't download. |
See #964 (comment). |
The code is wait on ws.requesterCond.Wait() .Even if signal to wake up ws.peer.requestState.Requests will be null ,so it will not go inside critical section. On torrent during addwebseed adding ws.peer.updateRequests("onSetInfo") is creating request and working fine . |
This should be fixed in 3b0b61f. |
Thanks for fixing . Now webseed is working fine in delayed case.Now it is breaking the normal use case where I have tested with 5 nodes and adding webseed after every 5 secs. We add add peer every 90 secs. With the changes from 5 nodes 3 nodes only download from webseed and not exchange message through peer .Two did not start after restart it start again . I will test little bigger cluster and update . seeing message in log full status Torrents: 1CDH-7.3.1-1.cdh7.3.1.p0.56439301-el8.parcel
|
It looks like connectivity issues because you're downloading so fast! |
Webseed I have increased the chunk size 16 kb to 1 mb . You are suspecting it is choking network bandwidth of host downloading from webseed ? |
Yes |
Thanks it is working fine .Now default chunk size is 16 kb which is very low. Is there a specification or recommended chunk size for webseed |
It's recommended to leave the chunk size at the default of 16 KiB and only increase if you are seeing significant overhead or running your own swarm. |
After decreasing it is working fine .Now I am testing a larger cluster in aws where there is multiple AZ so Our logic is every rac will have a rac leader and download from webseed .So is there way I can only increase the chunk size of webseed only do at least download 1% of file in one http request else the webseed server will rate limit it .If you can provide some code pointer and your thought I can try the implementation and verify in aws . |
It's not exposed as a config option, but you would want to modify this Line 2860 in dcfb61f
And increase chunk size 😄 |
HTTP webseed is working fine.
HTTPs webseed sending request to webseed server and receiving the chunk but it is not progressing .
we are using response.addHeader("Accept-Ranges", "bytes");
After debugging it seems
some peice the pieceHashed coming false
https://github.com/anacrolix/torrent/blob/master/torrent.go#L2379
While checking I found comparing sha1 hash it is not matching .
Not sure how https playing a role here
tls config
tlsConfig := &tls.Config{
RootCAs: caCertPool,
InsecureSkipVerify: false, // Verify server's certificate
MinVersion: tls.VersionTLS12,
}
cfg.WebTransport = &http.Transport{
TLSClientConfig: tlsConfig,
}
full status
Torrents: 1
p0.51297892-el8.parcel
0.017206% of 13997539212 bytes (14 GB)
Infohash: ea34737fb4f35c2f5d5161a911f45befa1cb1d3a
Metadata length: 33495
Piece length: 8388608 (512 chunks)
Num Pieces: 1669 (0 completed)
Piece States: 1. 1.P 5. 1.P 1661.
Piece availability frequency: 1: 1669
Reader Pieces:
Enabled trackers:
URL Extra
DHT Announces: 0
(torrent.TorrentStats) {
ConnStats: (torrent.ConnStats) {
BytesWritten: (torrent.Count) 1545,
BytesWrittenData: (torrent.Count) 0,
BytesRead: (torrent.Count) 1545,
BytesReadData: (torrent.Count) 0,
BytesReadUsefulData: (torrent.Count) 0,
BytesReadUsefulIntendedData: (torrent.Count) 0,
ChunksWritten: (torrent.Count) 0,
ChunksRead: (torrent.Count) 2672275,
ChunksReadUseful: (torrent.Count) 2672275,
ChunksReadWasted: (torrent.Count) 0,
MetadataChunksRead: (torrent.Count) 0,
PiecesDirtiedGood: (torrent.Count) 0,
PiecesDirtiedBad: (torrent.Count) 0
},
TotalPeers: (int) 0,
PendingPeers: (int) 0,
ActivePeers: (int) 0,
ConnectedSeeders: (int) 0,
HalfOpenPeers: (int) 0,
PiecesComplete: (int) 0
}
webseeds:
last unhandled error: never
bep40-prio: fa2f2406
last msg: never, connected: never, last helpful: 15.94s ago, itime: 38m36.287724526s, etime: 38m28.713064362s
1669/1669 completed, 4 pieces touched, good chunks: 2672275/2672275:0 reqq: 108+0/(128/128):0/1024, flags: i:WS:, dr: 0.0 KiB/s
requested pieces: 7(108)
The text was updated successfully, but these errors were encountered: