google-code-export / ruby-activeldap

Automatically exported from code.google.com/p/ruby-activeldap
Other
1 stars 1 forks source link

Connection hangs on timeout #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Enable :timeout for the activeldap configuration
2. script/console in RoR

What is the expected output? What do you see instead?

I expect no error.  Instead I get an exception like the following:

/var/lib/gems/1.8/gems/activeldap-0.9.0/lib/active_ldap/timeout.rb:63:in
`waitpid': SIGALRM (SignalException)
        from
/var/lib/gems/1.8/gems/activeldap-0.9.0/lib/active_ldap/timeout.rb:63:in
`alarm'
        from
/var/lib/gems/1.8/gems/activeldap-0.9.0/lib/active_ldap/adapter/base.rb:253:in
`with_timeout'
        from
/var/lib/gems/1.8/gems/activeldap-0.9.0/lib/active_ldap/adapter/ldap.rb:149:in
`with_timeout'
        from
/var/lib/gems/1.8/gems/activeldap-0.9.0/lib/active_ldap/adapter/base.rb:208:in
`operation'
        from
/var/lib/gems/1.8/gems/activeldap-0.9.0/lib/active_ldap/adapter/ldap.rb:127:in
`prepare_connection'
        from
/var/lib/gems/1.8/gems/activeldap-0.9.0/lib/active_ldap/adapter/base.rb:33:in
`connect'
        from
/var/lib/gems/1.8/gems/activeldap-0.9.0/lib/active_ldap/adapter/ldap.rb:36:in
`connect'
        from
/var/lib/gems/1.8/gems/activeldap-0.9.0/lib/active_ldap/adapter/base.rb:492:in
`reconnect'
         ... 11 levels...
        from
/var/lib/gems/1.8/gems/activeldap-0.9.0/lib/active_ldap/operations.rb:185:in
`find'
        from (irb):1:in `irb_binding'
        from /usr/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
        from /usr/lib/ruby/1.8/irb/workspace.rb:52

What version of the product are you using? On what operating system?

ActiveLdap 0.9.0 gem
Rails 1.99.0 (2.0RC1)

Please provide any additional information below.

Configuration is actually embedded in a module, rather than with other
activerecord models, which are connected to a mysql database.  I wanted to
use activeldap just to import information from an external ldap database
and then only if the ldap database is available.  I was hoping that I could
catch failed connection exception and skip the ldap import when that
happens.  Advice on how to achieve that another way would be appreciated if
what I'm trying to do here is not the simplest approach.

Original issue reported on code.google.com by aepstein...@gmail.com on 19 Nov 2007 at 4:23

GoogleCodeExporter commented 9 years ago
What I meant to say was "Connection hangs for length of timeout and then throws 
an
exception."

Original comment by aepstein...@gmail.com on 19 Nov 2007 at 4:30

GoogleCodeExporter commented 9 years ago
We need to your Rails code where ActiveLdap used.

Original comment by kou...@gmail.com on 19 Nov 2007 at 10:23

GoogleCodeExporter commented 9 years ago
Need more info.

Original comment by kou...@gmail.com on 8 Jul 2008 at 11:21