I have created a torrent from target.bz2
on my vps.
transmission-create -o target.torrent -t udp://tracker.opentrackr.org:1337/announce -s 2048 target.bz2
Port 51413
was opened on my pvs.
Then send the target.torrent
to my friend with email,he start a download with aria2c
:
aria2c target.torrent
06/03 12:35:11 [NOTICE] Downloading 1 item(s)
06/03 12:35:11 [NOTICE] IPv4 DHT: listening on UDP port 6893
06/03 12:35:11 [ERROR] Exception caught
Exception: [DefaultBtProgressInfoFile.cc:280] errorCode=1 info hash mismatch. expected: b5c4a65adbd5d2ea3e07f2d4207da4c4dee9a0ba, actual: ab172fda6a8b41155cf16e35e49883710169e2bf
06/03 12:35:11 [NOTICE] Download GID#e7239e7f5e170038 not complete: /root/target.bz2
Download Results:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
e7239e|ERR | n/a|/root/target.bz2
Status Legend:
(ERR):error occurred.
aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See '-l' option in help/man page for details.
Try with transmission-cli:
transmission-cli target.torrent -w /tmp
It encounter error:
Tracker gave an error:: Invalid passkey (0 - )
Download it with qtorrent.
How to make torrent clien know the resources target.bz2
located in my vps?
Both target.bz2
and target.torrent
are on my vps.
cd /tmp
ls
target.bz2
target.torrent
Strange enough, both target.bz2 and target.torrent in my vps /tmp
direcotry,i can't download the /tmp/target.bz2
into /home
with command transmission-cli /tmp/target.torrent -w /home
.
Analyse the torrent created for my friend downloading with python(omit many pieces).
>>> import torrent_parser as tp
>>> data = tp.parse_torrent_file('/tmp/target.torrent')
>>> data
{'created by': 'Transmission/2.92 (14714)', 'encoding': 'UTF-8', 'announce': 'udp://tracker.opentrackr.org:1337/announce',
'creation date': 1591488553, 'info': {'pieces':
['bb47ffb395620d2541a094bc33c92a65b7a02425', 'c572be1020cab80b00953bc596ad0b1b62392e53',
], 'name': 'target.bz2', 'length': 216094557, 'piece length': 4194304, 'private': 0}}
Download a debian torrent(renamed ) and analyse it(omit many pieces).
>>> import torrent_parser as tp
>>> data = tp.parse_torrent_file('/debian.torrent')
>>> data
{'httpseeds': ['https://cdimage.debian.org/cdimage/release/10.4.0//srv/cdbuilder.debian.org/dst/deb-cd/weekly-builds/amd64/iso-dvd/debian-10.4.0-amd64-DVD-1.iso',
'https://cdimage.debian.org/cdimage/archive/10.4.0//srv/cdbuilder.debian.org/dst/deb-cd/weekly-builds/amd64/iso-dvd/debian-10.4.0-amd64-DVD-1.iso'],
'info': {'pieces': ['b49a7c062b92a8618998c919ee3ea122ed348c3f',]
'name': 'debian-10.4.0-amd64-DVD-1.iso', 'piece length': 1048576, 'length': 3955556352},
'comment': '"Debian CD from cdimage.debian.org"', 'announce': 'http://bttracker.debian.org:6969/announce', 'creation date': 1589025382}
Which primary elements lost in my created torrent?
Best Answer
Aria2c
The first error you had with
aria2c
is related to an existing target file on the download location/root/target.bz2
that have a hash mismatch, you need to delete/recreate the target file. (but this is probably not the only issue of your question)This is may be caused by an improper transfer of the generated torrent file from the server, note that you can not use
cat
to copy your torrent file from the server.Transmission
The torrent creation is correct, your torrent is just not seeding, on your server run:
To make the file available for clients, this command must output
Seeding, uploading to 0 of 0 peer(s), 0 kB/s [0.00]...
and must be kept running.How to create a torrent on a VPS:
In this how-to demo we will generate a random file with dd and use transmission. note that uploading and downloading from the server itself may be tricky or not possible with transmission as it require additional configuration. also note that we can use the package
transmission-daemon
for a proper torrent server (not used in this mini how-to).transmission
51413
Copy the torrent file to the client (
cat
may not be used)Enable a seeder on the server, the following command must output
Seeding, uploading to 0 of 0 peer(s), 0 kB/s [0.00]...
and must be kept running.Links
Transmission-create, transmission server.