Nagios "Unrecognized character \\x7F; marked by <-- HERE after tatus.cgi
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2011
    Posts
    208

    Nagios "Unrecognized character \\x7F; marked by <-- HERE after tatus.cgi

    Hi,
    I have a fedora27 system with nagios-4.3.4-3.fc27.x86_64 and httpd-2.4.33-5.fc27.x86_64 and am receiving the following error when trying to check the status through the web interface. I've even tried to remove the httpd.conf and nagios.conf config files then reinstalling httpd and nagios. I don't believe I've made any other changes from the default system.

    Code:
    [Wed May 09 21:35:55.262659 2018] [:error] [pid 27011:tid 139780870788864] Unrecognized character \\x7F; marked by <-- HERE after sjson.cgi\n<-- HERE near column 203 at /usr/lib64/nagios/cgi-bin/statusjson.cgi line 1.\n
    [Wed May 09 21:36:06.570915 2018] [:error] [pid 26783:tid 139780742424320] Unrecognized character \\x7F; marked by <-- HERE after tatus.cgi\n<-- HERE near column 191 at /usr/lib64/nagios/cgi-bin/status.cgi line 1.\n
    I've done a bit of searching, and it appears apache thinks the cgi files are scripts and not executables. How can I configure apache to interpret these files properly?

  2. #2
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    2,994

    Re: Nagios "Unrecognized character \\x7F; marked by <-- HERE after tatus.cgi

    Perhaps the first thing to do is to ensure something has not got confused.
    What does the file command report for these executables ?

    User error. Please replace user and try again

  3. #3
    Join Date
    Oct 2011
    Posts
    208

    Re: Nagios "Unrecognized character \\x7F; marked by <-- HERE after tatus.cgi

    Quote Originally Posted by ocratato
    Perhaps the first thing to do is to ensure something has not got confused.
    What does the file command report for these executables ?
    Code:
    [root@arcade ~]# file /usr/lib64/nagios/cgi-bin/status.cgi
    /usr/lib64/nagios/cgi-bin/status.cgi: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=98bedfe2b9ae0681f41c9f6c7a6294f644e20cc6, stripped
    
    [root@arcade ~]# /usr/lib64/nagios/cgi-bin/status.cgi
    getcgivars(): Unsupported REQUEST_METHOD -> ''
    
    I'm guessing you're trying to execute the CGI from a command line.
    In order to do that, you need to set the REQUEST_METHOD environment
    variable to either "GET", "HEAD", or "POST".  When using the
    GET and HEAD methods, arguments can be passed to the CGI
    by setting the "QUERY_STRING" environment variable.  If you're
    using the POST method, data is read from standard input.  Also of
    note: if you've enabled authentication in the CGIs, you must set the
    "REMOTE_USER" environment variable to be the name of the user you're
    "authenticated" as.

  4. #4
    Join Date
    Apr 2009
    Location
    central NY, USA
    Posts
    1,134

    Re: Nagios "Unrecognized character \\x7F; marked by <-- HERE after tatus.cgi

    I've done a bit of searching, and it appears apache thinks the cgi files are scripts and not executables. How can I configure apache to interpret these files properly?
    My initial impulse is to ask if you are calling them via a web browser (Firefox, Chrome, etc.) - not Apache. For instance, I run my Cacti installation from Firefox with

    Code:
    http://myServerName.com/cacti/host.php
    I expect that Nagios also runs from a web page interface (I could be wrong, though)
    Change - the only constant.

  5. #5
    Join Date
    Oct 2011
    Posts
    208

    Re: Nagios "Unrecognized character \\x7F; marked by <-- HERE after tatus.cgi

    Quote Originally Posted by lightman47
    My initial impulse is to ask if you are calling them via a web browser (Firefox, Chrome, etc.) - not Apache. For instance, I run my Cacti installation from Firefox with

    Code:
    http://myServerName.com/cacti/host.php
    I expect that Nagios also runs from a web page interface (I could be wrong, though)
    Yes, as I mentioned in my initial post, I'm using the web interface. Unless I misunderstood your question?

    I have a very similar setup on another fedora system and am not having this problem. I've been using nagios for more than a decade, and fedora even longer.

  6. #6
    Join Date
    Oct 2006
    Location
    CN99CF Agassiz BC Canada
    Posts
    398

    Re: Nagios "Unrecognized character \\x7F; marked by <-- HERE after tatus.cgi

    If you have the ability to do a binary comparison of the cgi scripts between the two installations, please do so. There is the possibility that the two cgi scripts you cited in your first post may have been compromised. The 'x7f' character is the del character which suggests file corruption.
    -----
    f26 x86_64 Acer Predator G5910 Quad core Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz

  7. #7
    Join Date
    Oct 2011
    Posts
    208

    Re: Nagios "Unrecognized character \\x7F; marked by <-- HERE after tatus.cgi

    Quote Originally Posted by jims
    If you have the ability to do a binary comparison of the cgi scripts between the two installations, please do so. There is the possibility that the two cgi scripts you cited in your first post may have been compromised. The 'x7f' character is the del character which suggests file corruption.
    I just checked and they're the same. I also completely reinstalled the nagios package.

Similar Threads

  1. [SOLVED]
    badblocks generates output marked "out of range"?
    By ThePowerTool in forum Using Fedora
    Replies: 4
    Last Post: 16th June 2017, 05:28 AM
  2. yum No Packages marked for Update "NO WAY"
    By hydro0 in forum Using Fedora
    Replies: 4
    Last Post: 29th May 2012, 12:51 AM
  3. Unrecognized mount option "uid=501" or missing value
    By rafopar in forum Using Fedora
    Replies: 5
    Last Post: 3rd June 2011, 04:34 PM
  4. Scrambled screen, Nvidia Drivers, and "unrecognized class"
    By GuyverScythe in forum Using Fedora
    Replies: 6
    Last Post: 8th November 2006, 06:38 PM
  5. "Unrecognized file format error" loading icons
    By zaktoo in forum Using Fedora
    Replies: 3
    Last Post: 30th August 2006, 04:32 AM

Posting Permissions

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