Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Net::Amazon::EC2 loses pound-shebang when base64'd

by hesco (Deacon)
on Oct 07, 2009 at 01:20 UTC ( #799625=note: print w/replies, xml ) Need Help??


in reply to Net::Amazon::EC2 loses pound-shebang when base64'd

Thanks, Eric for taking a look at this.

I had earlier tried that, when I do this:

my $trick_my_box_script; my $base_path = '/home/hesco/sandbox/EC2'; my $build_script = 'build_server.sh'; open('USER_DATA','<',"$base_path/$build_script") or die "Unable to ope +n $base_path/$build_script: $! \n"; while(<USER_DATA>){ $trick_my_box_script .= $_; } close(USER_DATA); my $user_data = encode_base64($trick_my_box_script);
Then I get errors which look like this:

hesco@marcus8:~/sandbox/EC2$ time perl ec2_faxserver.pl $VAR1 = bless( { 'errors' => [ bless( { 'message' => '500 read failed: Connection reset by peer', 'code' => 'HTTP POST FAILURE' }, 'Net::Amazon::EC2::Error' ) ], 'request_id' => 'N/A' }, 'Net::Amazon::EC2::Errors' );
That shell script is only 7.2k, well within the 16k limit. Any idea why it would be rejected like this?

-- Hugh

if( $lal && $lol ) { $life++; }
if( $insurance->rationing() ) { $people->die(); }

Replies are listed 'Best First'.
Re^2: Net::Amazon::EC2 loses pound-shebang when base64'd
by esh (Pilgrim) on Oct 07, 2009 at 01:54 UTC
    I doubt this new problem is related to the user-data.

    AWS generally expects you to retry your API call when you get a 500 error.

    If you keep getting them, then something is generally more seriously wrong and you should wait a while before trying again.

    If you can consistently reproduce a 500 error when calling it with "X" while getting success calling it with "Y", then you may have found a bug.

    I'd recommend seeking help on the EC2 forum as this no longer looks like a Perl issue:

    http://ec2forum.notlong.com
Re^2: Net::Amazon::EC2 loses pound-shebang when base64'd
by esh (Pilgrim) on Oct 07, 2009 at 01:56 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://799625]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2018-07-19 02:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (399 votes). Check out past polls.

    Notices?