Forum: Ruby Ruby net/ldap, LDAP PDU error

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Df206b127f170c6fc840047d097d846c?d=identicon&s=25 Danny S. (daniel_s28)
on 2013-09-06 13:34
I have a problem here. I am trying to connect to a LDAP server (IBM's
Tivoli to be exact) to automate a process that will export the schema in
LDIF format. I am able to bind to Active directory with no problems
using the standard example.

Versions: Ruby 1.8.6 patchlevel 287 Ruby-net-ldap 0.0.4 rubygems 1.3.5

ldap = :host => server, :port => ADSettings.port,
:encryption => :simple_tls)

ldap.authenticate ADSettings.username, ADSettings.password

if ldap.bind
 # success
 # failed

However when I attempt to bind to this Tivoli server, I get the

`initialize': ldap-pdu format error (Net::LdapPd

Here is my sample script.

require 'rubygems'
require 'net/ldap'

binddn = "uid=admin,dc=company,dc=com"
bindpass = 'password'

ldap = :host => '<ldapserver>',:port => 11636,
  :auth => {:method => :simple, :username => binddn,:password =>

ldap_filter = Net::LDAP::Filter.eq("objectClass","LdapGroup")
ldap.bind => "dc=company,dc=com",:filter => ldap_filter) do
  puts "Entry == #{entry.inspect}"
As soon as it evalutes ldap.bind I get the PDU error. I've tried this in
IRB as well with the same result.

I can open openssl and run the following and it appears the SSL
handshake occurs without a problem.

OpenSSL> s_client -connect ldapserver:11636
Any help is appreciated and I'll provide anything else I can. I'm
unfortunately stuck with Ruby 1.8.6(can't upgrade) and accompanying
gems. long story there.

I can also bind to the non SSL port 389 without a problem.
Df206b127f170c6fc840047d097d846c?d=identicon&s=25 Danny S. (daniel_s28)
on 2013-09-20 18:07
This topic is locked and can not be replied to.