andrew878 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, Please help me with this.

perl version used is 5.8.4

#!/usr/bin/perl -w use strict; use warnings; use DBI; use DBD::Teradata; print "DBI::VERSION: $DBI::VERSION\n"; use DBD::Teradata; print "DBD::Teradata::VERSION: $DBD::Teradata::VERSION\n"; #use strict; # General syntax-enforcing module. use POSIX; # to get the localtime() routine print "Connecting to DB\n"; my $dbh = DBI->connect('dbi:Teradata:xxxxx:1025', 'xxxx', 'xxxxxxxx') or die "ERROR: Unable to connect to database...\n" . DBI->errs +tr; print "Teradata DB Connected\n"; $dbh->disconnect; print "Disconnected Teradata DB\n"; print "Script Ends here\n";
Error msg:

DBI::VERSION: 1.616 DBD::Teradata::VERSION: 12.001 Connecting to DB DBI connect('PCOP1:1025','qftmap02',...) failed: System error: can't recv msg header Illegal seek; closing connection. at connect16.pl line 23 ERROR: Unable to connect to database... System error: can't recv msg header Illegal seek; closing connection. at connect16.pl line 23.

But when I run the same script in another server which has perl 5.8.0.

The output is comming out fine

DBI::VERSION: 1.50 DBD::Teradata::VERSION: 1.20 Connecting to DB Teradata DB Connected Disconnected Teradata DB Script Ends here

what is the error(System error: can't recv msg header Illegal seek; closing connection. at connect16.pl line 23) all about?? Please help ....

  • Comment on System error: can't recv msg header Illegal seek; closing connection. at connect16.pl line 23
  • Download Code

Replies are listed 'Best First'.
Re: System error: can't recv msg header Illegal seek; closing connection. at connect16.pl line 23
by Corion (Patriarch) on Sep 10, 2011 at 08:37 UTC

    You have at least four variables. Eliminate them:

    1. Different machine, with potentially different network setup
    2. Different module version of DBD::Teradata
    3. Different module version of DBI
    4. Different version of Perl

      Hi Corion, Please note: The same code is running perfectly in another server which has (perl 5.8.0 and DBI version = 1.50 Teradata version = 1.20) installed in it.
      As the recommended version of DBI and teradata for perl 5.8.4 is as below:
      DBI version is 1.616 DBD::Teradata version is 12.001
      Do you have any idea which is the compatible version of DBI and teradata modules which is required for perl 5.8.4 ?
      It would be of great help.
      Thanks

        I gave you a list of four points. What point do you have problems with? You are running different code with different module versions on different machines. Eliminate the differences and you will find a cause for the different behaviour.

        Also, how could I tell you how to change your code if you don't show your code? You posted code, but the difference in behaviour is not from that code.

Re: System error: can't recv msg header Illegal seek; closing connection. at connect16.pl line 23
by CountZero (Bishop) on Sep 10, 2011 at 10:24 UTC
    Did the installaion of DBD::Teradata succeed without error? And did you then run perl t/test.pl <host> <user> <password> as suggested in the documentation? Any errors when running this test?

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James