ldap.ts failing all connections at some point #591

Closed
opened 2025-04-27 05:58:33 +00:00 by raucao · 2 comments
Owner

Happening for both the strfry plugin as well as substr.

There is no error message in the logs that I was able to directly connect to it breaking for subsequent connections. However, there are a handful of these messages in the substr logs:

Apr 27 05:29:02 strfry-1 substr[289658]: Error: Connection closed before message response was received. Message type: BindRequest (0x60)
Apr 27 05:29:02 strfry-1 substr[289658]:     at Socket.socketClose (file:///tmp/deno-compile-substr/.deno_compile_node_modules/localhost/ldapts/7.2.2/dist/index.mjs:3569:15)
Apr 27 05:29:02 strfry-1 substr[289658]:     at Socket.emit (ext:deno_node/_events.mjs:393:28)
Apr 27 05:29:02 strfry-1 substr[289658]:     at node:net:1161:14
Apr 27 05:36:49 strfry-1 substr[289658]: Error: Connection closed before message response was received. Message type: SearchRequest (0x63)
Apr 27 05:36:49 strfry-1 substr[289658]:     at Socket.socketClose (file:///tmp/deno-compile-substr/.deno_compile_node_modules/localhost/ldapts/7.2.2/dist/index.mjs:3569:15)
Apr 27 05:36:49 strfry-1 substr[289658]:     at Socket.emit (ext:deno_node/_events.mjs:393:28)
Apr 27 05:36:49 strfry-1 substr[289658]:     at node:net:1161:14

Both are only using one of the servers. So maybe adding a second would already help.

Happening for both [the strfry plugin](https://gitea.kosmos.org/kosmos/akkounts/src/branch/master/extras/strfry/ldap-policy.ts) as well as [substr](https://gitea.kosmos.org/kosmos/substr/src/branch/master/ldap.ts). There is no error message in the logs that I was able to directly connect to it breaking for subsequent connections. However, there are a handful of these messages in the substr logs: ``` Apr 27 05:29:02 strfry-1 substr[289658]: Error: Connection closed before message response was received. Message type: BindRequest (0x60) Apr 27 05:29:02 strfry-1 substr[289658]: at Socket.socketClose (file:///tmp/deno-compile-substr/.deno_compile_node_modules/localhost/ldapts/7.2.2/dist/index.mjs:3569:15) Apr 27 05:29:02 strfry-1 substr[289658]: at Socket.emit (ext:deno_node/_events.mjs:393:28) Apr 27 05:29:02 strfry-1 substr[289658]: at node:net:1161:14 Apr 27 05:36:49 strfry-1 substr[289658]: Error: Connection closed before message response was received. Message type: SearchRequest (0x63) Apr 27 05:36:49 strfry-1 substr[289658]: at Socket.socketClose (file:///tmp/deno-compile-substr/.deno_compile_node_modules/localhost/ldapts/7.2.2/dist/index.mjs:3569:15) Apr 27 05:36:49 strfry-1 substr[289658]: at Socket.emit (ext:deno_node/_events.mjs:393:28) Apr 27 05:36:49 strfry-1 substr[289658]: at node:net:1161:14 ``` Both are only using one of the servers. So maybe adding a second would already help.
raucao added the
bug
label 2025-04-27 05:58:59 +00:00
raucao added this to the Current operational issues project 2025-04-27 05:59:40 +00:00
raucao moved this to Service interruptions in Current operational issues on 2025-04-27 05:59:46 +00:00
Author
Owner

Update: the strfry plugin's LDAP exceptions are now logged, and I also added one missing unbind in the substr LDAP module.

So maybe adding a second would already help.

The feature has to be added to ldapts first: https://github.com/ldapts/ldapts/issues/182

Update: the strfry plugin's LDAP exceptions are now logged, and I also added one missing `unbind` in the substr LDAP module. > So maybe adding a second would already help. The feature has to be added to ldapts first: https://github.com/ldapts/ldapts/issues/182
raucao self-assigned this 2025-05-21 12:45:37 +00:00
Author
Owner

I found the issue after it happened again and the exception was logged. Looks like it was this Deno bug:

https://github.com/denoland/deno/issues/29094

I updated Deno to the latest version. Let's see if it happens again.

I also saw a ton of failed writes on the relay, i.e. unauthorized clients trying to spam it. This seems to have triggered it, because Substr was still running fine. Similarly, I guess it could have been triggered exactly the same way with too many requests to Substr (i.e. the nostr.kosmos.org user/article pages).

I found the issue after it happened again and the exception was logged. Looks like it was this Deno bug: https://github.com/denoland/deno/issues/29094 I updated Deno to the latest version. Let's see if it happens again. I also saw a ton of failed writes on the relay, i.e. unauthorized clients trying to spam it. This seems to have triggered it, because Substr was still running fine. Similarly, I guess it could have been triggered exactly the same way with too many requests to Substr (i.e. the nostr.kosmos.org user/article pages).
raucao moved this to Solved in Current operational issues on 2025-06-02 06:38:57 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kosmos/chef#591
No description provided.