Tribler / tribler

Privacy enhanced BitTorrent client with P2P content discovery
https://www.tribler.org
GNU General Public License v3.0
4.85k stars 451 forks source link

Crash when using the bootstrap_override option #3675

Closed devos50 closed 6 years ago

devos50 commented 6 years ago

I was playing a bit around with a testnet and I want to use a custom Dispersy tracker to bootstrap into the network. I've added the following line to my Tribler config file:

bootstrap_override = 37.48.77.232:7001

Which results in the following error when starting Tribler:

ERROR   1529233028.61            tribler_window:89   (root)  Traceback (most recent call last):
  File "/Users/martijndevos/Documents/tribler/TriblerGUI/core_manager.py", line 114, in on_received_state
    raise RuntimeError(state['last_exception'])
RuntimeError: [Failure instance: Traceback: <class 'Tribler.pyipv8.ipv8.messaging.serialization.PackError'>: Could not pack item 0: ('4SH', '\x00\x00\x00\x03', u'7')
error: cannot convert argument to integer
/Library/Python/2.7/site-packages/twisted/internet/base.py:1199:run
/Library/Python/2.7/site-packages/twisted/internet/base.py:1208:mainLoop
/Library/Python/2.7/site-packages/twisted/internet/base.py:828:runUntilCurrent
/Library/Python/2.7/site-packages/twisted/internet/task.py:239:__call__
--- <exception caught here> ---
/Library/Python/2.7/site-packages/twisted/internet/defer.py:150:maybeDeferred
/Users/martijndevos/Documents/tribler/Tribler/pyipv8/ipv8_service.py:109:on_tick
/Users/martijndevos/Documents/tribler/Tribler/pyipv8/ipv8/peerdiscovery/discovery.py:58:take_step
/Users/martijndevos/Documents/tribler/Tribler/pyipv8/ipv8/deprecated/community.py:327:get_new_introduction
/Users/martijndevos/Documents/tribler/Tribler/pyipv8/ipv8/deprecated/community.py:174:bootstrap
/Users/martijndevos/Documents/tribler/Tribler/pyipv8/ipv8/deprecated/community.py:304:walk_to
/Users/martijndevos/Documents/tribler/Tribler/pyipv8/ipv8/deprecated/community.py:195:create_introduction_request
/Users/martijndevos/Documents/tribler/Tribler/pyipv8/ipv8/deprecated/community.py:58:_ez_pack
/Users/martijndevos/Documents/tribler/Tribler/pyipv8/ipv8/messaging/serialization.py:191:pack_multiple
/Users/martijndevos/Documents/tribler/Tribler/pyipv8/ipv8/messaging/serialization.py:177:pack
]

The problem is that there is some incompatibility between the value that is entered in the Tribler configuration file and the value expected by the _DEFAULT_ADDRESSES variable. According to the config.spec, I should enter something like 37.48.77.232:7001 in the configuration file but the _DEFAULT_ADDRESSES expects a list of tuples (hostname, port).

@ichorid could you look into this?

ichorid commented 6 years ago

Yep, I'll take it.

ichorid commented 6 years ago

Fixed in https://github.com/Tribler/tribler/pull/3678