Forum Discussion

Kent_Perrier_50's avatar
Kent_Perrier_50
Icon for Nimbostratus rankNimbostratus
Aug 12, 2011

Perl Gtm Pool Member script question/issue

I am attempting to use the perl gtm pool member script at http://devcentral.f5.com/wiki/iControl.PerlGtmPoolMember.ashx

 

 

If I run it from the command line, with or without the arguements, it dies during the compile phase like this:

 

kent@host:~$ perl gtmpoolmember.pl

 

Illegal declaration of subroutine SOAP::Transport::HTTP::Client::get_basic_credentials at gtmpoolmember.pl line 63.

 

 

This happens on a RHEL 5.6 server, with perl 5.8.8, with RedHat's perl-SOAP-Lite-0.712-5.el5 module and on a Ubuntu server with pelr 5.10.1 and their version of the soap::lite module.

 

 

I fully admit that I don't know anything about soap programming and I was hoping to find an existing iControl script that I could munge to fit the need I have. (I need to generate a list wideIPs and the IP addresses of the pool members.) Any pointers on where to start to fix this issue?

 

9 Replies

  • command line of BIG-IP or another system? Have you installed Crypt-SSLeay?
  • This is from the command line of another system. SSLeay (at least the perl module for it) is installed:

     

     

    kent@host:~$ cat /etc/redhat-release

     

    Red Hat Enterprise Linux Server release 5.6 (Tikanga)

     

    kent@host:~$ rpm -qa | grep -i soap

     

    perl-SOAP-Lite-0.712-5.el5

     

    kent@host:~$ rpm -qa | grep -i ssleay

     

    perl-Net-SSLeay-1.30-4.fc6

     

    perl-Crypt-SSLeay-0.51-11.el5

     

  • Can you try to remove all "-->" from the code?

     

     

    eg. from this :

     

    sub SOAP::Transport::HTTP::Client::get_basic_credentials-->
    {
      return "$sUID" => "$sPWD";
    }
    

     

     

    to:

     

     

    sub SOAP::Transport::HTTP::Client::get_basic_credentials
    {
      return "$sUID" => "$sPWD";
    }
    

     

  • I removed the --> from line 63 and compilation gets past that, but errors out like this:

     

    syntax error at gtmpoolmember.pl line 70, near "-> proxy"

     

    syntax error at gtmpoolmember.pl line 76, near ")"

     

    syntax error at gtmpoolmember.pl line 80, near "-> proxy"

     

    syntax error at gtmpoolmember.pl line 86, near ")"

     

    syntax error at gtmpoolmember.pl line 90, near "-> proxy"

     

    syntax error at gtmpoolmember.pl line 96, near ")"

     

    syntax error at gtmpoolmember.pl line 131, at EOF

     

     

    Looking at the code, there is a --> at the end of the line above. Removing them the only error left is the last one, and it changes to:

     

    syntax error at gtmpoolmember.pl line 131, at EOF

     

    Missing right curly or square bracket at gtmpoolmember.pl line 131, at end of line

     

    Execution of gtmpoolmember.pl aborted due to compilation errors.

     

     

    It looks like the code is not complete as that subroutine is not closed. Closing it does not improve the situation much, as I now just get a syntax error at line 132 near "}"

     

     

    With regards to the --> mentioned above, if you look at lines 69, 79 and 89 you see the start of an HTML comment within the code. Could the code that makes the code all "pretty" be unintentionally munging the code as well?
  • Could the code that makes the code all "pretty" be unintentionally munging the code as well?

     

    It seems like you're right ... Maybe devcentral team could help on this?
  • Something got munged when we imported it into the new wiki. I've updated the codeshare entry with the original code from my personal stash of samples. Let me know if that works for you.

     

     

    -Joe

     

  • Looks like this page http://devcentral.f5.com/wiki/iControl.PerlLocalLbRule.ashx still has the "-->" wiki import corruption that you speak of. You say that you updated the codeshare entry on 8/15/2011. But the last update in the history of this wiki page is 2011/07/01. Am I looking in the right place? Here's an example of what I see on that page?

     

     

    ----------------------------------------------------------------------------

     

    068 Transport Information

     

    069----------------------------------------------------------------------------

     

    070sub SOAP::Transport::HTTP::Client::get_basic_credentials-->

     

    071{

     

    072 return "$sUID" => "$sPWD";

     

    073}