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

Throws an error moments after listening on port 3004 #4

Closed
raj206 opened this issue Nov 15, 2018 · 4 comments
Closed

Throws an error moments after listening on port 3004 #4

raj206 opened this issue Nov 15, 2018 · 4 comments

Comments

@raj206
Copy link

raj206 commented Nov 15, 2018

I just followed the documentation and tried to implement it. It throws the following error moments after listening on port 3004:

➜  ldap-tester node node_modules/ldap-server-mock/server.js --conf=/tmp/ldap-server-mock-conf.json --database=/tmp/users.json

LDAP server listening on port 3004

events.js:183
      throw er; // Unhandled 'error' event
      ^
VError: Parser error for 127.0.0.1:64280: Expected 0x2: got 0x54
    at Parser.<anonymous> (/Users/raj/Desktop/ldap-tester/node_modules/ldapjs/lib/server.js:442:26)
    at emitTwo (events.js:126:13)
    at Parser.emit (events.js:214:7)
    at Parser.write (/Users/raj/Desktop/ldap-tester/node_modules/ldapjs/lib/messages/parser.js:107:10)
    at Socket.<anonymous> (/Users/raj/Desktop/ldap-tester/node_modules/ldapjs/lib/server.js:460:16)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)

Can you possibly help me with this?

@maxime-beguin
Copy link
Contributor

As the error message says it seems that the ldapjs server does not like the message you sent.

What kind of message does your LDAP client send when getting this error?
Is it a bind message or a search message?

@raj206
Copy link
Author

raj206 commented Nov 16, 2018

Can you tell me the kind of message I should send? @maxime-beguin
Thanks.

@maxime-beguin
Copy link
Contributor

Like i said, this project only supports bind messages or search messages. You can refer to the LDAP RFC for more information about these messages but the easiest is to use an LDAP client like ldapjs.

@raj206
Copy link
Author

raj206 commented Nov 19, 2018

Oh, ok. Thanks a lot! :D

@raj206 raj206 closed this as completed Nov 19, 2018
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