VMware Communities
adameros
Contributor
Contributor

Installing the Perl SDK thru NAT'd, not proxy, firewalls.

I'm trying to install the Perl SDK and I am behind a NAT'd firewall, which let all internally initiated traffic out. The install script first pings www.vmware.com to insure the internet is accessable. But then it checks for and demands the proxy environment variable be set.

The ping works, but it still asks for the proxy setting? We don't use a proxy, what should this be set to?

The code from the vmware-install.pl in question:if ( $internet_available ) {

       eval "require CPAN";
       if ($@) {
         print wrap("CPAN module not installed on the system.\n" .
         "CPAN module is required to install missing pre-requisite Perl modules.
Please install CPAN.\n\n", 0);
          uninstall_file($gInstallerMainDB);
          exit 1;
       }

       my $httpproxy =0;
       my $ftpproxy =0;

       if ( direct_command("env | grep -i http_proxy") ) {
          $httpproxy = 1;
       } else {
          print wrap("http_proxy not set. please set environment variable 'http_
proxy' e.g. export http_proxy=http://myproxy.mydomain.com:0000 . \n\n", 0);
       }
       if ( direct_command("env | grep -i ftp_proxy") ) {
          $ftpproxy = 1;
       } else {
          print wrap("ftp_proxy not set. please set environment variable 'ftp_pr
oxy' e.g. export ftp_proxy=http://myproxy.mydomain.com:0000 . \n\n", 0);
       }

       if ( !( $ftpproxy && $httpproxy)) {
          print wrap("ftp_proxy not set. please set environment variable 'ftp_p oxy' e.g. export ftp_proxy=http://myproxy.mydomain.com:0000 . \n\n", 0);
       }

       if ( !( $ftpproxy && $httpproxy)) {
          uninstall_file($gInstallerMainDB);
          exit 1;
       }

Without the proxy settings, it seem like the script just exits at this point, and nothing more is done. Here is a tail of the install:

rev10.24.08


Do you accept? (yes/no) yes

Thank you.

http_proxy not set. please set environment variable 'http_proxy' e.g. export
http_proxy=http://myproxy.mydomain.com:0000 .

ftp_proxy not set. please set environment variable 'ftp_proxy' e.g. export
ftp_proxy=http://myproxy.mydomain.com:0000 .

[root@ops.tuk2]#

And output from the ping test:[root@ops.tuk2]# !ping

ping -c 10 -W 4 www.vmware.com | grep -c "64 bytes"
10
[root@ops.tuk2]#

What's the secret I'm missing?

Thanks,

-Adam

Reply
0 Kudos
14 Replies
teledataconsult
Contributor
Contributor

BUMP

Getting the same results.

Trying to install the x64 PERL toolkit 5.0 on a CentOS 5 monitoring server....

Reply
0 Kudos
TitovLab
Contributor
Contributor

Run commands before vmware-install.pl:

export http_proxy=

export ftp_proxy=

Reply
0 Kudos
netvope
Contributor
Contributor

Setting empty environment variables doesn't change anything for me.

Commenting out the exit statement works.

--- vmware-install.pl   2011-06-01 11:52:00.000000000 -0500
+++ vmware-install.pl   2011-11-14 05:57:26.670567460 -0500
@@ -5513,8 +5513,8 @@
        }
        if ( !( $ftpproxy && $httpproxy)) {
-          uninstall_file($gInstallerMainDB);
-         exit 1;
+#          uninstall_file($gInstallerMainDB);
+#        exit 1;
        }
        require CPAN;
Reply
0 Kudos
felipunk
Contributor
Contributor

Thanks netvope your tip worked too in Ubuntu 11.10

Best regards!

Reply
0 Kudos
vtphilk
Contributor
Contributor

setting the env to nothing "export http_proxy=" etc..worked for me..thanks

Reply
0 Kudos
chrisindywsol
Contributor
Contributor

setting the env to nothing "export http_proxy=" etc..worked for me as well.  Cent OS 5.6

THANK YOU!

Reply
0 Kudos
JesusPresley
Contributor
Contributor

Hi there, I just tried this solution on Fedora 16 and it's not working:

export http_proxy=

export ftp_proxy=

I did edit the file and commented all lines around the proxy stuff though. That worked.

TIA, TT

Reply
0 Kudos
prittero
Contributor
Contributor

Hi JesusPresley

Are you exporting the proxy variables as a user and then installing as root or with sudo escaleted to root ? In that case it wouldn't work. Best thing is to change to root, export the variables and run the installer. In any case you can double check/modify the CPAN variables here:

/root/.cpan/CPAN/MyConfig.pm

These are the correct settings for a non proxy setup :

'ftp_proxy' => q[]

'http_proxy' => q[]

works in fedora 16.

Reply
0 Kudos
lebeg
Contributor
Contributor

Hi,

I installed the module in Ubuntu 10.04 LTS:

sudo -s
export http_proxy=
export ftp_proxy=

./vmware-install.pl

Bye

Reply
0 Kudos
schoysi007
Contributor
Contributor

export http_proxy=

export ftp_proxy=

also did the job @debian

Thanks!

Reply
0 Kudos
alexanderleutz
Contributor
Contributor

I run in the same problem on my Centos 5.6 but none of the workarounds here fixed it for me.

So I read the Installation Guide and take a deeper lock at the missed Perl modules.

The Guide pointed at the installation script, which will use CPAN to automatically fix the missed Perl modules.

I never used CPAN before.

So I start CPAN and it shows up with an initial configuration wizard.

After the CPAN configuration task finish the VMware Perl SDK installed without any problems!

So, my suggestion is to start cpan, if you got the error about missed Perl modules, manually install them in a CPAN session and came back to the VMare SDK installer after that. Now it runs errorless.

regards

alexander

Reply
0 Kudos
Saturnous
Enthusiast
Enthusiast

Just use this copy&paste oneline to change the ping to localhost in the script.

mv vmware-install.pl vmware-install.pl.old && sed 's/www.vmware.com/localhost/g' vmware-install.pl > vmware-install.pl && chmod +x vmware-install.pl

Reply
0 Kudos
miklovin
Contributor
Contributor

Essentially the same idea - run:

sudo sh -c "export http_proxy=''; export ftp_proxy=''; ./vmware-install.pl"

The problem is just running "sudo ./vmware-install.pl" doesn't carry over all of your environment variables.

Reply
0 Kudos
kdionsf
Contributor
Contributor

sudo -E will preserve environment variables.

Reply
0 Kudos