0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Perl 5.16.3+Net::LDAP 0.65でBad File Descriptor

Last updated at Posted at 2015-04-24

Strawberry Perl 5.16.3とNet::LDAP 0.65で、Bad File Descriptorが発生した。IO::Socket::IP(この時点で0.37版)をインストールしたところ、解消した。

詳細

エラー

該当部のコードは下記のsearch行。

my $ldap = Net::LDAP->new("$ldap_serv:$ldap_port") or die "$@";
my $mesg = $ldap->search(base => $ldap_base, filter => 'mail=tsukamoto@example.com');

以下のエラーになった。

Bad file descriptor at xxxxxx.pl line xx, <DATA> line xxx.

対応

以下の2モジュールを更新したところ、エラーが解消された。

  • IO::Socket::IP
  • Net::LDAP(perl-ldap)

最初に、Net::LDAPが旧い可能性を考えて更新したところ、0.65版がインストールされ、エラーは変わりなかった。次に以下の2件を参考にIO::Socket::IPを更新したところ、0.37版がインストールされ、エラーが解消された。

参考

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?