#2009 prosody cannot communicate with other servers over i2p (attempt to call a nil value)
Reporter
Aidan Su
Owner
Nobody
Created
Updated
Stars
★ (1)
Tags
Type-Defect
Status-Invalid
Priority-Medium
Aidan Su
on
What steps will reproduce the problem?
1. I followed the instructions in https://docs.i2pd.website/en/latest/tutorials/xmpp/. For the most part, it worked - I can connect to my own server and message accounts I created in that same server.
2. Create two such XMPP servers over I2P (on different devices). Create account A on server A and bring it up on Gajim. Create account B on server B and also bring it up on Gajim.
3. Message account A from account B
What is the expected output?
I expected account A to be able to receive account B's messages
What do you see instead?
Log file from account B (sender):
Sep 06 20:02:56 s2sout564dcaf3e010 info Stream encrypted (TLSv1.3 with TLS_AES_128_GCM_SHA256)
Sep 06 20:02:59 s2sout564dcaf3e010 info Outgoing s2s connection SERVER_B.b32.i2p->SERVER_A.b32.i2p complete
Sep 06 20:02:59 s2sout564dcaf3e010 error Traceback[s2s]: /usr/lib/prosody/modules/mod_s2s.lua:375: attempt to call a nil value (field 'count')
stack traceback:
/usr/lib/prosody/modules/mod_s2s.lua:375: in global 'mark_connected'
/usr/lib/prosody/modules/mod_s2s.lua:436: in field '?'
/usr/lib/prosody/util/events.lua:81: in function </usr/lib/prosody/util/events.lua:77>
(...tail calls...)
/usr/lib/prosody/modules/mod_dialback.lua:169: in field '?'
/usr/lib/prosody/util/events.lua:81: in function </usr/lib/prosody/util/events.lua:77>
(...tail calls...)
/usr/lib/prosody/core/stanza_router.lua:143: in upvalue 'core_process_stanza'
/usr/lib/prosody/modules/mod_s2s.lua:806: in upvalue 'func'
/usr/lib/prosody/util/async.lua:149: in function </usr/lib/prosody/util/async.lua:147>
Sep 06 20:03:16 mod_cron info Running periodic tasks
Log file from account A (receiver):
Sep 06 19:59:14 s2sin55bb2be260 info Incoming s2s stream SERVER_B.b32.i2p->SERVER_A.b32.i2p closed: connection-timeout
Sep 06 20:02:56 s2sin55bb1a72d0 info Stream encrypted (TLSv1.3 with TLS_AES_128_GCM_SHA256)
Sep 06 20:02:59 s2sin55bb1a72d0 info Incoming s2s connection SERVER_B.b32.i2p->SERVER_A.b32.i2p complete
What version of the product are you using? On what operating system?
I'm using Prosody 13.0.6 for both devices. Server A is a raspberry pi (running trixie) and the other is a regular Debian trixie machine.
Please provide any additional information below.
When using Gajim's "Start/Add chat", the error shows up on device A, but when I use Gajim's "Add contact," the exact same error shows up on device B. I'm not entirely sure what is going on. I suspect that, since the darknet module isn't being maintained, it's conflicting with the newer prosody versions.
My I2P tunnels are working fine and I can access eepsites from both devices. I2Pd has been running for more than an hour on both devices (with status OK).
Zash
on
Thanks for the report.
This does not look like a bug Prosody, but in the 3rd party module mod_darknet,
which seems to be creating the internal data structure representing an s2s connection in a way that is no longer compatible with current Prosody and was always extremely prone to breaking eventually.
Doing this at all is not necessary, since there are now APIs for overriding the connection process in less invasive ways.
Please report this instead to https://github.com/majestrate/mod_darknet/issues
What steps will reproduce the problem? 1. I followed the instructions in https://docs.i2pd.website/en/latest/tutorials/xmpp/. For the most part, it worked - I can connect to my own server and message accounts I created in that same server. 2. Create two such XMPP servers over I2P (on different devices). Create account A on server A and bring it up on Gajim. Create account B on server B and also bring it up on Gajim. 3. Message account A from account B What is the expected output? I expected account A to be able to receive account B's messages What do you see instead? Log file from account B (sender): Sep 06 20:02:56 s2sout564dcaf3e010 info Stream encrypted (TLSv1.3 with TLS_AES_128_GCM_SHA256) Sep 06 20:02:59 s2sout564dcaf3e010 info Outgoing s2s connection SERVER_B.b32.i2p->SERVER_A.b32.i2p complete Sep 06 20:02:59 s2sout564dcaf3e010 error Traceback[s2s]: /usr/lib/prosody/modules/mod_s2s.lua:375: attempt to call a nil value (field 'count') stack traceback: /usr/lib/prosody/modules/mod_s2s.lua:375: in global 'mark_connected' /usr/lib/prosody/modules/mod_s2s.lua:436: in field '?' /usr/lib/prosody/util/events.lua:81: in function </usr/lib/prosody/util/events.lua:77> (...tail calls...) /usr/lib/prosody/modules/mod_dialback.lua:169: in field '?' /usr/lib/prosody/util/events.lua:81: in function </usr/lib/prosody/util/events.lua:77> (...tail calls...) /usr/lib/prosody/core/stanza_router.lua:143: in upvalue 'core_process_stanza' /usr/lib/prosody/modules/mod_s2s.lua:806: in upvalue 'func' /usr/lib/prosody/util/async.lua:149: in function </usr/lib/prosody/util/async.lua:147> Sep 06 20:03:16 mod_cron info Running periodic tasks Log file from account A (receiver): Sep 06 19:59:14 s2sin55bb2be260 info Incoming s2s stream SERVER_B.b32.i2p->SERVER_A.b32.i2p closed: connection-timeout Sep 06 20:02:56 s2sin55bb1a72d0 info Stream encrypted (TLSv1.3 with TLS_AES_128_GCM_SHA256) Sep 06 20:02:59 s2sin55bb1a72d0 info Incoming s2s connection SERVER_B.b32.i2p->SERVER_A.b32.i2p complete What version of the product are you using? On what operating system? I'm using Prosody 13.0.6 for both devices. Server A is a raspberry pi (running trixie) and the other is a regular Debian trixie machine. Please provide any additional information below. When using Gajim's "Start/Add chat", the error shows up on device A, but when I use Gajim's "Add contact," the exact same error shows up on device B. I'm not entirely sure what is going on. I suspect that, since the darknet module isn't being maintained, it's conflicting with the newer prosody versions. My I2P tunnels are working fine and I can access eepsites from both devices. I2Pd has been running for more than an hour on both devices (with status OK).
Thanks for the report. This does not look like a bug Prosody, but in the 3rd party module mod_darknet, which seems to be creating the internal data structure representing an s2s connection in a way that is no longer compatible with current Prosody and was always extremely prone to breaking eventually. Doing this at all is not necessary, since there are now APIs for overriding the connection process in less invasive ways. Please report this instead to https://github.com/majestrate/mod_darknet/issues
Changes