+ Post New Thread
Results 1 to 3 of 3
*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 ...
  1. #1

    jinnantonnixx's Avatar
    Join Date
    Mar 2011
    Location
    In the Calamatorium.
    Posts
    1,976
    Thank Post
    113
    Thanked 495 Times in 337 Posts
    Blog Entries
    2
    Rep Power
    284

    Strange SCP problem...

    [SOLVED?
    Ooops - I think it's OK now - I think I make a simple error and got my files mixed up.]



    I have

    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.

    In summary:

    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
    ..^.............^.............^......
    works ........works*.....broken

    * 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...

    Anyone help?
    Last edited by jinnantonnixx; 15th September 2011 at 11:42 AM.

  2. #2

    jinnantonnixx's Avatar
    Join Date
    Mar 2011
    Location
    In the Calamatorium.
    Posts
    1,976
    Thank Post
    113
    Thanked 495 Times in 337 Posts
    Blog Entries
    2
    Rep Power
    284
    Also, the Centos servers are using ext3, Ubuntu server is using ext4. I doubt this could have any bearing.

  3. #3

    jinnantonnixx's Avatar
    Join Date
    Mar 2011
    Location
    In the Calamatorium.
    Posts
    1,976
    Thank Post
    113
    Thanked 495 Times in 337 Posts
    Blog Entries
    2
    Rep Power
    284
    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.

SHARE:
+ Post New Thread

Similar Threads

  1. Strange Excel Problem
    By Jon in forum Windows
    Replies: 14
    Last Post: 14th July 2011, 04:55 PM
  2. Strange Email Problem
    By richard in forum Windows
    Replies: 4
    Last Post: 15th June 2007, 06:58 AM
  3. Strange Word problem
    By richard in forum Windows
    Replies: 0
    Last Post: 21st February 2006, 12:47 PM
  4. Strange HD Problem on Debian machine
    By crc-ict in forum *nix
    Replies: 5
    Last Post: 27th January 2006, 08:43 PM
  5. Strange Network Problem this Morning
    By Roger in forum Windows
    Replies: 2
    Last Post: 12th September 2005, 11:01 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •