*nix Thread, Strange SCP problem... in Technical; [SOLVED?
Ooops - I think it's OK now - I think I make a simple error and got my files ...
15th September 2011, 12:20 PM #1
Strange SCP problem...
Ooops - I think it's OK now - I think I make a simple error and got my files mixed up.]
1. a Ubuntu server (64 bit) running as a central Nagios server
2. 5 Centos (32 bit) servers running a turnkey solution.
I need to monitor the 5 Centos servers, so I installed Nagios NRPE agent on them. I have compiled a set of Nagios plugins for the 32 bit Centos machines, these work well and function correctly; there is no problem as far as the monitoring or plugins are concerned.
The problem - I SCP'd the compiled plugins from the Centos machine to the Ubuntu server.
I wrote a script to SCP the plugins to all the other servers.
When this SCP takes place (from the Ubuntu machine to the Centos machines), the binary plugins do not run on the Centos servers - it's as if they've been corrupted (or compiled under the wrong architecture).
For instance, if I try to run the check_ntp plugin, I get the message "-bash: ./check_ntp: cannot execute binary file"
Now this is the wierd part - if I try the plugin on the Ubuntu server, the plugin works! But it shouldn't work! It was compiled for a 32 bit Centos server.
1. The plugins work on a Centos server, before any SCP takes place.
2. I SCP the plugins to the Ubuntu server - this is acting as my source file server.
3. I SCP from the Ubuntu server to the Centos servers. The plugins now do not work.
The SCP path of the files:
Centos > Ubuntu > Centos
* but shouldn't work - wrong architecture!
I thought SCP always did a straight binary transfer?
My best guess is that something funny is happening when the SCP'd file hits the Ubuntu server. Is Ubuntu doing something odd to the binary to make it work on its architecture?
By the way, I kept a copy of the binary file on a Centos server, to compare with a file that has travelled to and from the Ubuntu server. A 'diff' shows that the file has changed ["Binary files check_ftp and /tmp/check_ftp differ"]
I'm stumped over this one...
Last edited by jinnantonnixx; 15th September 2011 at 12:42 PM.
IDG Tech News
15th September 2011, 12:34 PM #2
Also, the Centos servers are using ext3, Ubuntu server is using ext4. I doubt this could have any bearing.
15th September 2011, 12:43 PM #3
OK , I think I made a stupid error. It's working now, I think I might have done something as stupid as copying the wrong set of file.
The Ubuntu Nagios plugins were in the path; I wasn't calling them with the ./ so it appeared as if the 32 bit plugins were working on the 64 bit server. Silly me.
Last Post: 14th July 2011, 05:55 PM
By richard in forum Windows
Last Post: 15th June 2007, 07:58 AM
By richard in forum Windows
Last Post: 21st February 2006, 01:47 PM
Last Post: 27th January 2006, 09:43 PM
By Roger in forum Windows
Last Post: 12th September 2005, 12:01 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)