qstokkink / TriblerExperimental

GNU General Public License v3.0
6 stars 2 forks source link

Tribler fails to start because of occupied Core port(s)? #15

Closed xoriole closed 5 months ago

xoriole commented 5 months ago

It happened on the second run of Tribler and keeps happening on subsequent runs. Here is the stacktrace obtained by running the core only. GUI is simply not able to connect to core.

/Applications/Tribler.app/Contents/MacOS/tribler --core
INFO:__main__:Run Tribler: {'torrent': '', 'core': True, 'log_level': 'INFO'}
INFO:__main__:Root state dir: /Users/user/.TriblerExperimental
INFO:tribler.core.start_core:Start tribler core. API port: -1. API key: None. State dir: /Users/user/.TriblerExperimental.
INFO:tribler.tribler_config:Load: /Users/user/.TriblerExperimental/configuration.json.
INFO:Socks5Server:Started SOCKS5 server on port 54398
INFO:Socks5Server:Started SOCKS5 server on port 54399
INFO:Socks5Server:Started SOCKS5 server on port 54400
INFO:Socks5Server:Started SOCKS5 server on port 54401
INFO:Socks5Server:Started SOCKS5 server on port 54402
user@spanner-2 tud % /Applications/Tribler.app/Contents/MacOS/tribler --core
INFO:__main__:Run Tribler: {'torrent': '', 'core': True, 'log_level': 'INFO'}
INFO:__main__:Root state dir: /Users/user/.TriblerExperimental
INFO:tribler.core.start_core:Start tribler core. API port: -1. API key: None. State dir: /Users/user/.TriblerExperimental.
INFO:tribler.tribler_config:Load: /Users/user/.TriblerExperimental/configuration.json.
INFO:Socks5Server:Started SOCKS5 server on port 54434
INFO:Socks5Server:Started SOCKS5 server on port 54435
INFO:Socks5Server:Started SOCKS5 server on port 54436
INFO:Socks5Server:Started SOCKS5 server on port 54437
INFO:Socks5Server:Started SOCKS5 server on port 54438
INFO:tribler.core.libtorrent.download_manager.download_manager:Creating a session
INFO:tribler.core.libtorrent.download_manager.download_manager:Hops: 0.
INFO:tribler.core.libtorrent.download_manager.download_manager:Libtorrent port: 0
INFO:tribler.core.libtorrent.download_manager.download_manager:could not load libtorrent state, got exception: FileNotFoundError(2, 'No such file or directory'). starting from scratch
INFO:tribler.core.libtorrent.download_manager.download_manager:Started libtorrent session for 0 hops on port 54439
INFO:IPv8CommunityLoader:Loading overlay <class 'abc.DatabaseComponent'>
INFO:IPv8CommunityLoader:Loading overlay <class 'ipv8.dht.discovery.DHTDiscoveryCommunity'>
INFO:DHTDiscoveryCommunity:DHT community initialized (peer mid b'8f87d2908b5ccd6bc8b198bd1a978c685285cc37')
INFO:IPv8CommunityLoader:Loading overlay <class 'tribler.core.knowledge.community.KnowledgeCommunity'>
INFO:KnowledgeCommunity:Knowledge community initialized
INFO:KnowledgeRulesProcessor:Start
INFO:KnowledgeRulesProcessor:Register process_queue task with interval: 5 sec
INFO:IPv8CommunityLoader:Loading overlay <class 'tribler.core.rendezvous.community.RendezvousCommunity'>
INFO:TrackerManager:No tracker blacklist file found at /Users/user/.TriblerExperimental/tracker_blacklist.txt.
INFO:IPv8CommunityLoader:Loading overlay <class 'abc.TorrentCheckerComponent'>
INFO:IPv8CommunityLoader:Loading overlay <class 'tribler.core.tunnel.community.TriblerTunnelCommunity'>
INFO:TriblerTunnelCommunity:Exit settings: BT=False, IPv8=False
INFO:TriblerTunnelCommunity:Using DispatcherEndpoint with flags {8, 1}
INFO:IPv8CommunityLoader:Loading overlay <class 'tribler.core.content_discovery.community.ContentDiscoveryCommunity'>
INFO:ContentDiscoveryCommunity:Content Discovery Community initialized (peer mid b'8f87d2908b5ccd6bc8b198bd1a978c685285cc37')
INFO:IPv8CommunityLoader:Finished loading communities!
[2024-04-18T12:06:53Z ERROR rust_endpoint::util] Failed to bind to 0.0.0.0:8090 (Address already in use (os error 48)). Retrying now.
[2024-04-18T12:06:53Z ERROR rust_endpoint::util] Failed to bind to 0.0.0.0:8091 (Address already in use (os error 48)). Retrying now.
[2024-04-18T12:06:53Z ERROR rust_endpoint::util] Failed to bind to 0.0.0.0:8092 (Address already in use (os error 48)). Retrying now.
[2024-04-18T12:06:53Z ERROR rust_endpoint::util] Failed to bind to 0.0.0.0:8093 (Address already in use (os error 48)). Retrying now.
INFO:RESTManager:Starting RESTManager...
INFO:RESTManager:Remove head
apispec/ext/marshmallow/openapi.py:135: UserWarning: Multiple schemas resolved to the name File. The name has been modified. Either manually add each of the schemas with a different name or provide a custom schema_name_resolver.
INFO:RESTManager:Http enabled
INFO:RESTManager:Starting HTTP REST API server on port 54084...
INFO:DownloadManager:Load checkpoints...
INFO:DownloadManager:Checkpoints are loaded
ERROR:RESTManager:Can't start HTTP REST API on port 54084: OSError: [Errno 48] error while attempting to bind on address ('127.0.0.1', 54084): address already in use
Traceback (most recent call last):
  File "tribler/core/restapi/rest_manager.py", line 153, in start_http_site
  File "aiohttp/web_runner.py", line 119, in start
  File "asyncio/base_events.py", line 1463, in create_server
OSError: [Errno 48] error while attempting to bind on address ('127.0.0.1', 54084): address already in use
Traceback (most recent call last):
  File "run_tribler.py", line 73, in <module>
  File "run_tribler.py", line 65, in main
  File "tribler/core/start_core.py", line 42, in run_core
  File "asyncio/runners.py", line 43, in run
  File "asyncio/base_events.py", line 616, in run_until_complete
  File "tribler/core/start_core.py", line 21, in run_session
  File "tribler/core/session.py", line 119, in start
  File "tribler/core/restapi/rest_manager.py", line 137, in start
  File "tribler/core/restapi/rest_manager.py", line 153, in start_http_site
  File "aiohttp/web_runner.py", line 119, in start
  File "asyncio/base_events.py", line 1463, in create_server
OSError: [Errno 48] error while attempting to bind on address ('127.0.0.1', 54084): address already in use
[1293] Failed to execute script run_tribler