Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
4k stars 537 forks source link

Server crash ldaps #2033

Closed adsorrentino closed 2 months ago

adsorrentino commented 3 years ago

Hi, first i want to thank you for your amazing work on this product. I had an issue where the server crashed and it reported the problem in the ldap authentication. I've set up the server using ldaps (port 636) and it was working as usual then it suddenly crashed

-------- 1/12/2020 16:48:56 ---- 0.7.9 --------

events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27)
Emitted 'error' event on LdapAuth instance at:
    at LdapAuth._handleError (/opt/meshcentral/node_modules/ldapauth-fork/lib/ldapauth.js:185:8)
    at Client.emit (events.js:315:20)
    at TLSSocket.onSocketError (/opt/meshcentral/node_modules/ldapjs/lib/client/client.js:1169:12)
    at TLSSocket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:84:8)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: -104,
  code: 'ECONNRESET',
  syscall: 'read'
}

thanks in advance

Ylianst commented 3 years ago

Hi. What version of NodeJS are you using? Also, if you reported the bug somewhere else, can you provide a link? Thanks.

adsorrentino commented 3 years ago

hi, i'm using node v13.14.0. i found these links where error has been reported:

https://github.com/ldapjs/node-ldapjs/issues/318 https://stackoverflow.com/questions/41446941/ldapjs-ldap-connection-error-handling/49763310

i've tried the reconnect:true parameter for the ldap configuration, but the crash happened anywany.

adsorrentino commented 3 years ago

Hi, another option is to use ldap + starttls

https://github.com/vesse/node-ldapauth-fork/issues/59

si458 commented 2 months ago

closing as stale, please try the latest version of meshcentral, and try again, if your issue still happens, then please reply back and open the issue again