Perl script running external command

C

ccc31807

This probably isn't a c.l.p.m. issue, but I'll ask anyway.

I have a script that's run for years, part of which runs pscp to
download and upload files to a remote server several times a day. This
functionality is part of an essential process, and my organization's
activities would come to a screeching halt if this ever failed. The
machines are Windows servers.

The call looks something like this:
sub get_app_file
{
my $success = system './pscp -p -pw password [email protected]/
directory/path/filename*.txt .';
if ($success == 0) { $log .= "Successfully downloaded application
file.\n"; }
else { $log .= "PROBLEM WITH downloaded application file.\n"; }
}

The hardware guys are updating the servers, and I am in the process of
moving these scripts to a new machine. A week ago, the download
function worked, and today I can run it by hand -- BUT the script
fails with this error message:
‘Fatal: Network error: Connection timed out’

The hardware guys claim that they have made no change whatsoever to
the system, but we have automatic updates, which have run.

Any clues as to what might cause the problem? And maybe how to
diagnose the failure? I'm not a hardware guy or a network guy, and I
don't have any idea where to begin.

Thanks, CC.
 
J

Justin C

The call looks something like this:
sub get_app_file
{
my $success = system './pscp -p -pw password [email protected]/
directory/path/filename*.txt .';
if ($success == 0) { $log .= "Successfully downloaded application
file.\n"; }
else { $log .= "PROBLEM WITH downloaded application file.\n"; }
}

The hardware guys are updating the servers, and I am in the process of
moving these scripts to a new machine. A week ago, the download
function worked, and today I can run it by hand -- BUT the script
fails with this error message:
‘Fatal: Network error: Connection timed out’

Maybe they've done something with ssh?

What happens if you, from the command line, "ssh username@[dottedquad]"?
I would expect a very similar error.

Can you still ping that IP?

I'm no newtwork expert, but that's what I'd start with.

If you can't ssh into the box then you're not going to be able to scp
either, pscp is just an scp wrapper/clone (PuTTY for anyone not
familiar). At least you'll have something with which to go to the
hardware guys, and put the problem back in their court.

Justin.
 
C

ccc31807

Maybe they've done something with ssh?

According to 'them' (the network guys) they've done nothing to the
server.
What happens if you, from the command line, "ssh username@[dottedquad]"?
I would expect a very similar error.

I have three machines, my desktop, the current server, and the new
server. I can hit the remote box with WinSCP on my desktop and the
current server and the current server, but not the new server.

I can't ping the remote site and never have been, but that's never
been a problem.
Can you still ping that IP?

I can't ping the remote site and never have been, but that's never
been a problem.
If you can't ssh into the box then you're not going to be able to scp
either, pscp is just an scp wrapper/clone (PuTTY for anyone not
familiar). At least you'll have something with which to go to the
hardware guys, and put the problem back in their court.

This morning, I ran three different test on all three machines,
documented the results, turned it over to the network guys, and washed
my hands of the problem. My code works, and the software works -- it's
the machine that doesn't work.

CC.
 
C

ccc31807

Any clues as to what might cause the problem? And maybe how to
diagnose the failure? I'm not a hardware guy or a network guy, and I
don't have any idea where to begin.

One of the cowboys, playing on the server, made some changes he
shouldn't have and didn't tell anybody ... AFTER he swore up and down
that no one made any changes.

Unfortunately, his name is Boss.

CC.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top