| | |
Rather strange problem copying, need assistance.
![]() |
•
•
Join Date: Aug 2006
Posts: 999
Reputation:
Solved Threads: 1
Earlier in the day, I was forced to generate a new public key/private key pair for one of the systems I work with, as it appeared to have been hacked into at some point during the night. The system in question was running a process called 'Slony', which is used for database replication. After building the new key and adding the public keys for the other systems that slony's replication fed, I noticed a rather strange problem.
In addition to the main database, the server that got hacked runs a second archival db, which is supposed to be replicated to and updated alongside the remote systems. When I created the new keys, the replication to the system stopped working. I had originally included a passphrase, and the perl files which ran the replication as a cron job were throwing errors about bad passwords. I decided to rebuild the key again, this time leaving the space blank. That is, I just hit 'Enter' when the system requested a passphrase. It requested the same phrase be repeated, though, and that may be the core of my problem...I may not have gotten rid of the passphrase.
Anyway, when I try to run the system now, it tries to scp the replication files, but the scp times out. As far as I can tell, the timeout is getting called from this segment of code, which comes from a system-installed file called Expect.pm:
I'm getting the 'scp timed out while trying to connect' error message, but not the other one. Anybody have any clue why this is, or what might be done to solve the problem? I was able to force replication today by manually copying the files and removing the call to scp from the cron script, but I'd rather not have to do that; it's an hourly job and can't really afford to get too backed up.
Thanks in advance,
-EnderX
In addition to the main database, the server that got hacked runs a second archival db, which is supposed to be replicated to and updated alongside the remote systems. When I created the new keys, the replication to the system stopped working. I had originally included a passphrase, and the perl files which ran the replication as a cron job were throwing errors about bad passwords. I decided to rebuild the key again, this time leaving the space blank. That is, I just hit 'Enter' when the system requested a passphrase. It requested the same phrase be repeated, though, and that may be the core of my problem...I may not have gotten rid of the passphrase.
Anyway, when I try to run the system now, it tries to scp the replication files, but the scp times out. As far as I can tell, the timeout is getting called from this segment of code, which comes from a system-installed file called Expect.pm:
Perl Syntax (Toggle Plain Text)
unless($scp->expect($timeout,-re=>'[Pp]assword.*?:|[Pp]assphrase.*?:')){ my $err=$scp->before() || $scp->match(); if($err){ if($handler){$handler->($err) } croak("Problem performing scp: $err"); } croak("scp timed out while trying to connect to $host"); }
Thanks in advance,
-EnderX
You said you removed the passphrase, but here you are waiting for the passphrase prompt. Of course it will timeout as this should never come.
You should be able to comment out this block of code and the line or lines where you send the password and continue with the next expect pattern.
You should be able to comment out this block of code and the line or lines where you send the password and continue with the next expect pattern.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
![]() |
Similar Threads
- No sound through speakers - Windows Media Player (Windows NT / 2000 / XP)
- strange problem - cookies on desktop (Windows NT / 2000 / XP)
- Help. This is a strange problem (C++)
- Strange keyboard & highliting problem. (USB Devices and other Peripherals)
- A strange problem: unplugged network cable !! (Networking Hardware Configuration)
- strange problem (C)
- HELP!!! very strange problem! (Troubleshooting Dead Machines)
Other Threads in the Perl Forum
- Previous Thread: How do you do efficient array (de)referencing?
- Next Thread: Perl Ping Help
| Thread Tools | Search this Thread |






[Pp]assphrase.*?:')){
