Comments (4)
Ok ., its not really designed to run in docker but if you must run apache2buddy in docker then the container MUST be run with additional privileges otherwise it cant read the memory usage.
You can read about it here.
https://github.com/richardforth/apache2buddy/wiki/Docker-fun-and-games
from apache2buddy.
Hi,
There isn't enough information here to investigate further, can you please tell me:
What operating system you were running this on, and
what version of apache you had installed?
Thanks
Richard
from apache2buddy.
Can you also share with me the exact command you ran to get this error?
from apache2buddy.
Yes, it's apache 2.4 on ubuntu 22.04 docker image:
docker run --rm -it ubuntu:22.04 bash
inside:
apt update
apt install -y curl apache2 python3-distro net-tools
curl -sL -o /tmp/apache2buddy.pl https://raw.githubusercontent.com/richardforth/apache2buddy/master/apache2buddy.pl
apachectl -D BACKGROUND
perl /tmp/apache2buddy.pl
output:
#################################################
apache2buddy.pl report for af2050ce9388 (x.x.x.x)
#################################################
[ OK ] This script is being run as root.
[ OK ] The utility 'pmap' exists and is available for use: /usr/bin/pmap
[ OK ] The utility 'netstat' exists and is available for use: /usr/bin/netstat
[ @@ ] Unable to locate the PHP binary. PHP specific checks will be skipped.
[ OK ] The utility 'apachectl' exists and is available for use: /usr/sbin/apachectl
[ OK ] The port (port 80) is a valid port.
[ -- ] We are attempting to discover the operating system type and version number ...
[ !! ] Unable to locate the 'python' binary.
[ OK ] The 'python3' binary exists and is available for use: /usr/bin/python3
<string>:3: DeprecationWarning: distro.linux_distribution() is deprecated. It should only be used as a compatibility shim with Python's platform.linux_distribution(). Please use distro.id(), distro.version() and distro.name() instead.
[ -- ] Distro: Ubuntu
[ -- ] Version: 22.04
[ -- ] Codename: Jammy Jellyfish
[ OK ] This distro is supported by apache2buddy.pl.
[ OK ] This distro version is supported by apache2buddy.pl.
[ -- ] Hostname: af2050ce9388
[ -- ] Primary IP: x.x.x.x
[ -- ] We are checking the service running on port 80...
[ -- ] The process listening on port 80 is /usr/sbin/apache2
[ -- ] The process running on port 80 is Apache/2.4.52 (Ubuntu).
[ -- ] The full path to the Apache config file is: /etc/apache2/apache2.conf
[ -- ] Apache is using event model.
[ OK ] Running user (www-data) matches config (www-data).
[ -- ] pidfile setting is /var/run/apache2$SUFFIX/apache2.pid.
[ -- ] Actual pidfile is /var/run/apache2/apache2.pid.
[ -- ] Parent PID: 3609.
[ OK ] Memory usage of parent PID is less than 50MB: 1384 Kilobytes.
[ -- ] Apache has been running 0d 0h 00m 33s.
[ !! ] *** LOW UPTIME ***.
[ @@ ] The following recommendations may be misleading - apache has been restarted within the last 24 hours.
[ -- ] Your server has 32001 MB of PHYSICAL memory.
[ >> ] ServerLimit directive not found, assuming default values.
[ -- ] Your ServerLimit setting is 16.
[ -- ] Your ThreadsPerChild setting is 25.
[ -- ] Your ThreadsPerChild setting for worker/event MPM is 25
[ -- ] Your ServerLimit setting for worker/event MPM is 16
[ -- ] Your MaxRequestWorkers setting is 150.
[ OK ] Current Apache Process Count is 3, including the parent PID.
[ -- ] Number of vhosts detected: 0.
[ OK ] Current Apache vHost Count is less than maxrequestworkers.
[ @@ ] vHost Count works only when we have NameVirtualHosting enabled, check config manually, they may only have the default vhost.
[ -- ] This server is NOT running Plesk.
[ -- ] This server is NOT running cPanel.
[ -- ] This server is NOT running Virtualmin.
[ OK ] No additional services were detected.
[ OK ] No large log files were found in /var/log/apache2.
[ OK ] MaxClients has not been hit recently.
[ >> ] Apache only logs maxclients/maxrequestworkers hits once in a lifetime, if no restart has happened this event may have been rotated away.
[ >> ] As a backup check, please compare number of running apache processes (minus 1 for parent) against maxclients/maxrequestworkers.
[ >> ] For more information see https://github.com/apache/httpd/blob/0b61edca6cdda2737aa1d84a4526c5f9d2e23a8c/server/mpm/prefork/prefork.c#L809
[ OK ] No package updates found.
[ -- ] apache2 is currently using 12.82 MB of memory.
Use of uninitialized value $proc_mem_usages[0] in division (/) at
/tmp/apache2buddy.pl line 967 (#1)
(W uninitialized) An undefined value was used as if it were already
defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.
To help you figure out what was undefined, perl will try to tell you
the name of the variable (if any) that was undefined. In some cases
it cannot do this, so it also tells you what operation you used the
undefined value in. Note, however, that perl optimizes your program
and the operation displayed in the warning may not necessarily appear
literally in your program. For example, "that $foo" is usually
optimized into "that " . $foo, and the warning will refer to the
concatenation (.) operator, even though there is no . in
your program.
Use of uninitialized value $proc_mem_usages[0] in division (/) at
/tmp/apache2buddy.pl line 973 (#1)
Use of uninitialized value $count in division (/) at /tmp/apache2buddy.pl line
987 (#1)
Illegal division by zero at /tmp/apache2buddy.pl line 987 (#2)
(F) You tried to divide a number by 0. Either something was wrong in
your logic, or you need to put a conditional in to guard against
meaningless input.
Uncaught exception from user code:
Illegal division by zero at /tmp/apache2buddy.pl line 987.
main::get_memory_usage("/usr/sbin/apache2", "www-data", "average") called at /tmp/apache2buddy.pl line 2806
from apache2buddy.
Related Issues (20)
- Plans to Support AlmaLinux 8.x and CloudLinux 7.9? HOT 5
- AmazonLinux Docker: Cannot find the 'hostname' executable. HOT 2
- AmazonLinux [ !! ] Python scripting failed. Python requires package 'distro' or 'platform' to determine the Operating System and Version. HOT 6
- Newer versions of python throw deprecation warnings HOT 5
- [ LOW PRIORITY ] Unable to detect apache on nonstandard ports - EOL Ubunutu 1604 with --skip-os-version-check HOT 1
- SS support along with netstat HOT 10
- Apache2buddy does not find apache on bitnami installation HOT 10
- --- a2bchk.sh --- showing MD5 mismatch HOT 4
- Add support for Ubuntu 22.04 HOT 8
- Add tests for ansible playbook in all Jenkins stages HOT 1
- Debian 12 support
- Running ISPconfig on ARM64: Bullseye with Linux 5.10.110-rockchip-rk3588: uninitialized value $apache_proc_php in concatenation (.) or string at - line 2524 (#1) HOT 1
- sub detect_php_memory_limit has hardcoded php executable path
- Support for Oracle Linux Server HOT 1
- Support for SLES 12 with worker MPM HOT 1
- including Gentoo
- sub get_php_setting breaks on systems with multiple versions of php installed HOT 1
- Use of uninitialized value $apache_proc_php in string eq HOT 1
- DeprecationWarning: distro.linux_distribution() is deprecated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apache2buddy.