Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Attempt to reload IO/Socket.pm aborted

by trillich (Novice)
on Nov 02, 2012 at 22:10 UTC ( #1002057=perlquestion: print w/ replies, xml ) Need Help??
trillich has asked for the wisdom of the Perl Monks concerning the following question:

This is an odd situation and I'm just about at wit's end...

On HP/UX we have some perl scripts to communicate via LWP::UserAgent.

Some users can run the script, no problem; others get the following error:

Socket object version 1.94 does not match bootstrap parameter 2.006 at + /opt/perl514/lib/5.14.2/PA-RISC2.0-thread-multi/DynaLoader.pm line 2 +13. Compilation failed in require at /opt/perl514/lib/5.14.2/PA-RISC2.0-th +read-multi/IO/Socket.pm line 12. BEGIN failed--compilation aborted at /opt/perl514/lib/5.14.2/PA-RISC2. +0-thread-multi/IO/Socket.pm line 12.

Where it dies is on "require IO::Socket" (or anything that pulls in "Socket.pm").

In trying to debug this, we've dumped lots of environment variables and @INC and %INC at various stages. All users show they're using /opt/perl514/lib/... for loading libraries.

So for debugging output we generated a listing of loaded modules based on keys %INC:

foreach my $file ( sort keys %INC ) { my $mod = "$file"; next unless $mod =~ s/[.]pm$//; $mod =~ s{/}{::}g; my $ver = eval('$' . $mod . '::VERSION or "[unknown]"'); push @output, [ $mod, $ver ]; } ...

Users who CAN run the script have these modules loaded right before "require IO::Socket":

AutoLoader 5.71 Carp 1.20 Compress::Raw::Zlib 2.045 Config [unknown] Crypt::SSLeay 0.58 Crypt::SSLeay::CTX [unknown] Crypt::SSLeay::MainContext [unknown] Crypt::SSLeay::X509 [unknown] Errno 1.13 Exporter 5.64_03 Exporter::Heavy 5.64_03 Fcntl 1.11 File::Glob 1.13 File::GlobMapper 1.000 File::Spec 3.33 File::Spec::Unix 3.33 Getopt::Std 1.06 HTTP::Config 5.815 HTTP::Date 5.831 HTTP::Headers 5.827 HTTP::Message 5.834 HTTP::Request 5.827 HTTP::Response 5.824 HTTP::Status 5.817 IO 1.25_04 IO::Compress::Base::Common 2.045 IO::Compress::Gzip::Constants 2.045 IO::Compress::Zlib::Extra 2.045 IO::File 1.15 IO::Handle 1.31 IO::Seekable 1.1 IO::Socket 1.32 IO::Socket::INET 1.31 IO::Socket::UNIX 1.23 IO::Uncompress::Adapter::Inflate 2.045 IO::Uncompress::Base 2.046 IO::Uncompress::Gunzip 2.045 IO::Uncompress::RawInflate 2.045 LWP 5.834 LWP::MemberMixin [unknown] LWP::Protocol 5.829 LWP::Protocol::http [unknown] LWP::Protocol::https [unknown] LWP::UserAgent 5.834 List::Util 1.23 MIME::Base64 3.13 Net::HTTP 5.834 Net::HTTP::Methods 5.834 Net::HTTPS 5.819 Net::SSL 2.85 Scalar::Util 1.23 SelectSaver 1.02 Socket 2.006 Storable 2.30 Symbol 1.07 Time::Local 1.2000 URI 1.59 URI::Escape 3.31 URI::_generic [unknown] URI::_idna [unknown] URI::_punycode 0.04 URI::_query [unknown] URI::_server [unknown] URI::http [unknown] URI::https [unknown] XSLoader 0.13 bytes 1.04 constant 1.21 feature 1.20 integer 1.00 overload 1.13 strict 1.04 utf8 1.09 vars 1.02 warnings 1.12 warnings::register 1.02

By contrast, the users who CANNOT run the script, have these modules loaded instead -- e.g. DynaLoader instead of AutoLoader?

Carp 1.20 Config [unknown] DynaLoader 1.13 Errno 1.13 Exporter 5.64_03 Exporter::Heavy 5.64_03 Fcntl 1.11 Getopt::Std 1.06 HTTP::Config 5.815 HTTP::Date 5.831 HTTP::Headers 5.827 HTTP::Message 5.834 HTTP::Request 5.827 HTTP::Response 5.824 HTTP::Status 5.817 IO 1.25_04 IO::Handle 1.31 IO::Socket [unknown] IO::Socket::INET [unknown] LWP 5.834 LWP::MemberMixin [unknown] LWP::Protocol 5.829 LWP::Protocol::http [unknown] LWP::Protocol::https [unknown] LWP::UserAgent 5.834 MIME::Base64 3.13 Net::HTTP 5.834 SelectSaver 1.02 Socket 2.006 Storable 2.30 Symbol 1.07 Time::Local 1.2000 URI 1.59 URI::Escape 3.31 URI::_generic [unknown] URI::_idna [unknown] URI::_punycode 0.04 URI::_query [unknown] URI::_server [unknown] URI::http [unknown] URI::https [unknown] XSLoader 0.13 constant 1.21 integer 1.00 overload 1.13 strict 1.04 vars 1.02 warnings 1.12 warnings::register 1.02

All module-paths (from values %INC) are /opt/perl514/lib/...

Suggestions?

Comment on Attempt to reload IO/Socket.pm aborted
Select or Download Code
Re: Attempt to reload IO/Socket.pm aborted
by syphilis (Canon) on Nov 02, 2012 at 23:38 UTC
    Socket object version 1.94 does not match bootstrap parameter 2.006

    You have version 2.006 of Socket.pm, but the Socket "object" (ie Socket.so) is for version 1.94.

    This type of error generally indicates that a botched upgrade of Socket (from version 1.94 to 2.006, in this instance) has been performed.
    Just how this stuff-up has occurred is anybody's guess.

    Removing any existing Socket.so, and then re-installing Socket-2.006 should fix the problem ... but all bets are off if you're running the "system" perl. (Proceed with caution if you *are* using the system's perl.)

    Afterthought: Might be safer/easier instead to replace the 2.006 version of Socket.pm with version 1.94. That should work just as well.

    Cheers,
    Rob
Re: Attempt to reload IO/Socket.pm aborted
by andal (Friar) on Nov 05, 2012 at 07:49 UTC

    Just a guess. Few times I had similar problem when one user could run some script, and another couldn't. In my case it was library with the same name but different version stored in the path relative to the users home directory.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1002057]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2014-07-26 01:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls