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

"DHT not enabled." even when it is #383

Open
d33tah opened this Issue Jan 27, 2016 · 5 comments

Comments

Projects
None yet
5 participants
@d33tah
Copy link

d33tah commented Jan 27, 2016

$ rtorrent -n -o dht=on -o dht.add_node=router.bittorrent.com:6881
rtorrent: Failed to parse command line option: DHT not enabled.

Tested on latest git.

@JohnFlowerful

This comment has been minimized.

Copy link

JohnFlowerful commented Feb 8, 2016

Can reproduce on my end too.

@pyroscope

This comment has been minimized.

Copy link
Contributor

pyroscope commented Mar 9, 2016

In 0.9.6, it is dht.mode.set. Also, this is a dupe of #158, which includes a solution.

Can be closed.

@JohnFlowerful

This comment has been minimized.

Copy link

JohnFlowerful commented May 12, 2016

Using a delay does not work in my case:

dht.mode.set = on
schedule = dht_node, 60, 0, dht.add_node=router.bittorrent.com:6881

DHT appears to be 'on':

% rtxmlrpc dht.statistics --repr
{'active': 0, 'dht': 'on', 'throttle': ''}

@pataquets

This comment has been minimized.

Copy link

pataquets commented Sep 15, 2016

Checked this issue and linked one. Tried the scheduling and enabling DHT both ways.
I get the message Scheduled command failed: dht_node: DHT not enabled. inside rtorrent interface.
Using version 0.9.6/0.13.6 (Ubuntu Xenial).

Also tried adding the dht.add_node=hostname:port option in tthe rcfile and I get rtorrent: Error in option file: ~/.rtorrent.rc:3: DHT not enabled.
My rcfile:

dht.mode.set = on
dht = on
dht.add_node=[scrubbed]:6881
schedule = dht_node, 15, 0, dht.add_node=[scrubbed]:6881
@chros73

This comment has been minimized.

Copy link

chros73 commented Sep 16, 2016

I just tried it (I don't use it otherwise), it works fine here with the current git version and 0.9.6 as well.
As we can see here:

  • you need to define a session directory first
  • you need to enable udp tracker support (enabled by default)
  • as pyroscope suggested, you need to schedule adding a server

This is a sample config that works:

# Defining directory constants
method.insert = cfg.dir.main,       string|const|private, (cat,"/mnt/rtorrent-ps/")
method.insert = cfg.dir.sub,        string|const|private, (cat,(cfg.dir.main),".rtorrent/")
method.insert = cfg.dir.session,    string|const|private, (cat,(cfg.dir.sub),".session/")

# Default session directory. Make sure you don't run multiple instance of rtorrent using the same session directory. (session)
session.path.set = (cat,(cfg.dir.session))

# Set whether the client should try to connect to UDP trackers (It can cause various problems if it's enabled, if you experience any with this option enabled then disable it.)
trackers.use_udp.set = true

# Enable DHT support for trackerless torrents or when all trackers are down. May be set to "disable" (completely disable DHT), "off" (do not start DHT),
# "auto" (start and stop DHT as needed), or "on" (start DHT immediately). The default is "off". For DHT to work, a session directory must be defined.
dht.mode.set = auto

# UDP port to use for DHT. The default is: 6881 .
#dht.port.set = 60882

# adding new dht server
schedule2 = dht_node, 30, 0, "dht.add_node=router.bittorrent.com:6881"

Result of rtxmlrpc dht.statistics --repr command:

$ rtxmlrpc dht.statistics --repr
{'active': 1,
 'buckets': 23,
 'bytes_read': 360687,
 'bytes_written': 266962,
 'cycle': 3,
 'dht': 'auto',
 'errors_caught': 0,
 'errors_received': 163,
 'nodes': 180,
 'peers': 0,
 'peers_max': 0,
 'queries_received': 123,
 'queries_sent': 2311,
 'replies_received': 1462,
 'throttle': '',
 'torrents': 0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment