RHEL 6.x to RHEL 8.x migration - rrdgraph no longer works from NGINX #1229
Replies: 4 comments 2 replies
-
the problem most likely is within the content of @rrdArray, I would add the following use Data::Dumper;
warn Dumper \@rrdArray; To see the content of the rrdArray. |
Beta Was this translation helpful? Give feedback.
-
Thanks again for the original reply, I was just hoping there might be something more that I can do to debug and isolate the issue. Any thoughts? |
Beta Was this translation helpful? Give feedback.
-
the regular expression compile problem could be related to an old pcre version or some thing like this |
Beta Was this translation helpful? Give feedback.
-
The problem appears, to me, to be in the subroutine show below that defines "@rrdArray" with "my @rrdArray = ();" and then later fails to "RRDs::graph @rrdArray". Looking again at the link: https://trac.nginx.org/nginx/ticket/1403 It seems that the subroutine should be calling "ngx_regex_compile()" instead of using PCRE which is no longer supported by NGINX. I have looked around trying to see if I can easily get the subroutine to call "ngx_regex_compile()" but the information eludes me. Would a simple edit make this happen? Or does the subroutine need to be completely rewritten? If you could have one last look and advise I would greatly appreciate it. Also, if I am in the wrong place, a pointer in the right direction would also be very much appreciated. Thanks #################### Subroutine Begin ###########################
} |
Beta Was this translation helpful? Give feedback.
-
This is a request for assistance, and we would likely be interested in a consulting engagement if warranted.
I am a RHEL sysadmin at a utilities company and have been asked to migrate NGINX from RHEL6 to RHEL8.
The solution on the RHEL6 host was put together by an outside contractor who is no longer available and the use of downloaded source complied locally was the approach.
My aim is to use only packages from the RHEL repository and only deviate from this minimally so that regular patching remains possible with only minimal recompilation from source being required.
After some work installing packages from the internal satellite server and meeting perl module requirements the solution almost works on RHEL 8. The gap is that the graphing fails with the following error:
Error while graphing "/opt/mrtg/central/FILE_NAME.png": cannot compile regular expression: Error while compiling regular expression ^(?:[^%]+|%%)%[-+ 0#]?[0-9](?:[.][0-9]+)?leEfFgG(?:%s)?(?:[^%]+|%%)$ at char 86: failed to get memory (^(?:[^%]+|%%)%[-+ 0#]?[0-9](?:[.][0-9]+)?leEfFgG(?:%s)?(?:[^%]+|%%)$)
Failed to open file "/opt/mrtg/central/FILE_NAME.png": No such file or directory
The only place I have been able to find that refers to the above message is here: https://trac.nginx.org/nginx/ticket/1403
The above nginx ticket leads me to this github page where I am hoping to find some useful guidance
The bit of customized perl module code that seems to be causing the error is comes from is this:
RRDs::graph @rrdArray;
my $ERR=RRDs::error;
warn "Error while graphing "$file-$period-$time.png": $ERR\n" if $ERR;
open( FILE, "$file-$period-$time.png" ) or warn "Failed to open file "$file-$period-$time.png": $!\n\n";
binmode(FILE);
my ($buf, $data, $n);
while (($n = read FILE, $data, 4) != 0)
{
$buf .= $data;
}
close( FILE );
unlink( "$file-$period-$time.png" ) or warn "Failed to clean up temporary file "$file-$period-$time.png": $!\n\n";
return $buf;
Not being a developer, I am admittedly out of my depth here and would greatly appreciate I nudge in the right direction (let me know if there is any more targeted information that I can provide) or if you are a developer and believe that you could work with me on a consulting basis to get this over the line I'd be like to hear from you.
Thanks if you have read this far and I apologize if I have posted this in the wrong place.
Beta Was this translation helpful? Give feedback.
All reactions