{"action":"created","issue":{"url":"https://api.github.com/repos/rlidwka/sinopia-ldap/issues/8","labels_url":"https://api.github.com/repos/rlidwka/sinopia-ldap/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/rlidwka/sinopia-ldap/issues/8/comments","events_url":"https://api.github.com/repos/rlidwka/sinopia-ldap/issues/8/events","html_url":"https://github.com/rlidwka/sinopia-ldap/issues/8","id":60730664,"number":8,"title":"Error: write after end","user":{"login":"justinmchase","id":10974,"avatar_url":"https://avatars.githubusercontent.com/u/10974?v=3","gravatar_id":"","url":"https://api.github.com/users/justinmchase","html_url":"https://github.com/justinmchase","followers_url":"https://api.github.com/users/justinmchase/followers","following_url":"https://api.github.com/users/justinmchase/following{/other_user}","gists_url":"https://api.github.com/users/justinmchase/gists{/gist_id}","starred_url":"https://api.github.com/users/justinmchase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinmchase/subscriptions","organizations_url":"https://api.github.com/users/justinmchase/orgs","repos_url":"https://api.github.com/users/justinmchase/repos","events_url":"https://api.github.com/users/justinmchase/events{/privacy}","received_events_url":"https://api.github.com/users/justinmchase/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-11T21:13:42Z","updated_at":"2015-03-11T22:10:52Z","closed_at":null,"body":"I'm getting this interesting error and I'm not sure what is going wrong:\r\n\r\n    Error: write after end\r\n      at writeAfterEnd (_stream_writable.js:130:12)\r\n      at CleartextStream.Writable.write (_stream_writable.js:178:5)\r\n      at Client._send (/usr/local/lib/node_modules/sinopia-ldap/node_modules/ldapjs/lib/client/client.js:914:17)\r\n      at Client.bind (/usr/local/lib/node_modules/sinopia-ldap/node_modules/ldapjs/lib/client/client.js:367:15)\r\n      at LdapAuth._adminBind (/usr/local/lib/node_modules/sinopia-ldap/node_modules/ldapauth-fork/lib/ldapauth.js:171:21) \r\n      at LdapAuth._search (/usr/local/lib/node_modules/sinopia-ldap/node_modules/ldapauth-fork/lib/ldapauth.js:193:8)\r\n      at LdapAuth._findUser (/usr/local/lib/node_modules/sinopia-ldap/node_modules/ldapauth-fork/lib/ldapauth.js:242:8) \r\n      at LdapAuth.authenticate (/usr/local/lib/node_modules/sinopia-ldap/node_modules/ldapauth-fork/lib/ldapauth.js:298:8)\r\n      at Auth.authenticate (/usr/local/lib/node_modules/sinopia-ldap/index.js:31:14)\r\n      at next (/usr/local/lib/node_modules/sinopia/lib/auth.js:96:7)\r\n\r\nHere is my config:\r\n\r\n    auth:\r\n      ldap:\r\n        type: ldap\r\n        groupNameAttribute: 'cn'\r\n        client_options:\r\n          url: 'ldaps://...'\r\n          adminDn: 'cn=admin,dc=evolvehq,dc=com'\r\n          adminPassword: '...'\r\n          searchBase: 'ou=users,dc=evolvehq,dc=com'\r\n          searchFilter: '(uid={{username}})'\r\n          cache: False\r\n          searchAttributes:\r\n            - \"*\"\r\n            - memberOf\r\n          tlsOptions:\r\n            rejectUnauthorized: False\r\n\r\nDo you have any hints as to what could be causing this error?\r\n"},"comment":{"url":"https://api.github.com/repos/rlidwka/sinopia-ldap/issues/comments/78383723","html_url":"https://github.com/rlidwka/sinopia-ldap/issues/8#issuecomment-78383723","issue_url":"https://api.github.com/repos/rlidwka/sinopia-ldap/issues/8","id":78383723,"user":{"login":"justinmchase","id":10974,"avatar_url":"https://avatars.githubusercontent.com/u/10974?v=3","gravatar_id":"","url":"https://api.github.com/users/justinmchase","html_url":"https://github.com/justinmchase","followers_url":"https://api.github.com/users/justinmchase/followers","following_url":"https://api.github.com/users/justinmchase/following{/other_user}","gists_url":"https://api.github.com/users/justinmchase/gists{/gist_id}","starred_url":"https://api.github.com/users/justinmchase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinmchase/subscriptions","organizations_url":"https://api.github.com/users/justinmchase/orgs","repos_url":"https://api.github.com/users/justinmchase/repos","events_url":"https://api.github.com/users/justinmchase/events{/privacy}","received_events_url":"https://api.github.com/users/justinmchase/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T22:10:52Z","updated_at":"2015-03-11T22:10:52Z","body":"I think I figured it out. Basically it means that I can't connect. Turns out our ldap server is listening on a specific device. You can troubleshoot using the `ldapsearch` tool for anyone hitting a similar issue."}}