Skip to content
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

Getting an asyncio.exceptions.CancelledError when trying to connect to the BBS #9

Closed
Erethon opened this issue Feb 19, 2023 · 5 comments

Comments

@Erethon
Copy link
Contributor

Erethon commented Feb 19, 2023

When trying to connect to the BBS mentioned in markqvist/Reticulum#231 I'm getting an asyncio.exceptions.CancelledError error. Platform is Debian 11, Python 3.9.2 and latest RNS (0.4.9). I'm connected to both public nodes of the testnet.

rnsh 1490b99d47d3bac32270cfa90f771af8 -vvvvvv
[2023-02-19 22:16:59] [Debug]   Connected to locally available Reticulum instance via: LocalInterface[37428]
[2023-02-19 22:16:59] [Verbose] Configuration loaded from /home/dgrig/.reticulum/config
[2023-02-19 22:16:59] [Verbose] Loaded 310 known destination from storage
[2023-02-19 22:16:59] [Verbose] Loaded Transport Identity from storage
[2023-02-19 22:16:59] [Info]    rnsh.rnsh._initiate_link       Requesting path... [MainThread]
[2023-02-19 22:16:59] [Extra]   Valid announce for <1490b99d47d3bac32270cfa90f771af8> 2 hops away, received via <4e1ac99b1c4a4161cd06bfa04b74754c> on LocalInterface[37428]
[2023-02-19 22:16:59] [Debug]   Destination <1490b99d47d3bac32270cfa90f771af8> is now 2 hops away via <4e1ac99b1c4a4161cd06bfa04b74754c> on LocalInterface[37428]
[2023-02-19 22:16:59] [Debug]   rnsh.rnsh._initiate_link       No link [MainThread]
[2023-02-19 22:16:59] [Extra]   Registering link <0cfd19c5683e3a6aab16356fe2050334>
[2023-02-19 22:16:59] [Debug]   Link request <0cfd19c5683e3a6aab16356fe2050334> sent to <rnsh.default.afd460e2af7939a622e4faf5ab13e842/1490b99d47d3bac32270cfa90f771af8>
[2023-02-19 22:16:59] [Info]    rnsh.rnsh._initiate_link       Establishing link... [MainThread]
[2023-02-19 22:17:00] [Debug]   Path request for <9513e2d9f8ea795cbac394fbbd547ecd> on LocalInterface[37428]
[2023-02-19 22:17:00] [Debug]   Ignoring path request for <9513e2d9f8ea795cbac394fbbd547ecd> on LocalInterface[37428], no path known
[2023-02-19 22:17:00] [Debug]   Path request for <8ed1daeee0d96214a32b1ecad27201e5> on LocalInterface[37428]
[2023-02-19 22:17:00] [Debug]   Ignoring path request for <8ed1daeee0d96214a32b1ecad27201e5> on LocalInterface[37428], no path known
[2023-02-19 22:17:09] [Verbose] Link establishment timed out
[2023-02-19 22:17:09] [Debug]   rnsh.retry.RetryThread         stopping timer thread [MainThread]
Traceback (most recent call last):
  File "/home/dgrig/reticulum2/lib/python3.9/site-packages/rnsh/rnsh.py", line 538, in _rnsh_cli_main
    return_code = await _initiate(
  File "/home/dgrig/reticulum2/lib/python3.9/site-packages/rnsh/rnsh.py", line 335, in _initiate
    await _initiate_link(
  File "/home/dgrig/reticulum2/lib/python3.9/site-packages/rnsh/rnsh.py", line 315, in _initiate_link
    if not await _spin(until=lambda: _link.status == RNS.Link.ACTIVE, timeout=timeout):
  File "/home/dgrig/reticulum2/lib/python3.9/site-packages/rnsh/rnsh.py", line 227, in _spin
    raise asyncio.CancelledError()
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dgrig/reticulum2/bin/rnsh", line 8, in <module>
    sys.exit(rnsh_cli())
  File "/home/dgrig/reticulum2/lib/python3.9/site-packages/rnsh/rnsh.py", line 560, in rnsh_cli
    return_code = asyncio.run(_rnsh_cli_main())
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
asyncio.exceptions.CancelledError

I haven't looked at the source code yet, but I'm happy to answer any questions until then if it helps debugging this.

@Erethon
Copy link
Contributor Author

Erethon commented Feb 19, 2023

Seeing as I have issues establishing a link via NomadNet as well, I wonder if just the service is down currently.

@acehoss
Copy link
Owner

acehoss commented Feb 19, 2023

Hey, thanks for trying it out! It looks like the service was hung up so I restarted it and I am able to connect now. It may be related to the fact that I left an idle session to the BBS over rnsh open for a couple hours. The software may not be quite ready for that.

Also for informational purposes I'll mention that the BBS is not running on the same machine as my node; it's running on a small virtual machine in the cloud. It runs i2pd as well as TCP connections to Dublin and Frankfurt.

@Erethon
Copy link
Contributor Author

Erethon commented Feb 19, 2023

Works fine now! Closing this.
minesweeper

@Erethon Erethon closed this as completed Feb 19, 2023
@acehoss
Copy link
Owner

acehoss commented Feb 19, 2023

Awesome! I think it's good info, though. I doubt that hang up will be the last, and somehow I'll have to figure out what's going on there.

@Erethon
Copy link
Contributor Author

Erethon commented Feb 19, 2023

For the record, everything seems to work fine. I was able to play a minesweeper game, start registering a new user (and gave up midway), see connected users, etc, all the BBS features function correctly! This looks amazing, nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants