Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache2buddy does not find apache on bitnami installation #401

Open
muimid opened this issue Oct 14, 2022 · 10 comments
Open

Apache2buddy does not find apache on bitnami installation #401

muimid opened this issue Oct 14, 2022 · 10 comments

Comments

@muimid
Copy link

muimid commented Oct 14, 2022

Hi,
I'm trying to test apache on my bitnami canvas installation but running the script presents with the error below:

##################################################
apache2buddy.pl report for d**s (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: /bin/netstat
[ @@ ] Unable to locate the PHP binary. PHP specific checks will be skipped.
[ -- ] Unable to locate the apachectl utility. This script requires apachectl to analyze Apache's vhost configurations.
[ -- ] Not fatal yet, trying to locate the apache2ctl utility instead.
[ !! ] Unable to locate the apache2ctl utility. This script now requires apache2ctl to analyze Apache's vhost configurations.
[ -- ] It looks like you might be running something else, other than apache..

My application runs ok but it runs within the bitnami stack... /opt/bitnami/...

If I try to run the script within the stack (with the command: /opt/bitnami/use_canvaslms), I get the error below:

[ FATAL ] Could not load the Diagnostics module.

Try:

  sudo apt-get install perl-modules

Then try running this script again.

--

So I'm stuck. Any help?

@richardforth
Copy link
Owner

richardforth commented Oct 14, 2022 via email

@muimid
Copy link
Author

muimid commented Oct 15, 2022

Hi Richard,

Thank you for your quick response.

I made some progress from the initial error I was getting. I managed to install Apache2buddy within my stack and got it fired up with the commands below:

cd /opt

wget https://raw.githubusercontent.com/richardforth/apache2buddy/master/apache2buddy.pl

chmod +x apache2buddy.pl

I got a longer (and more encouraging?) report this time:

##################################################
apache2buddy.pl report for ds (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: /bin/netstat
[ OK ] 'php' exists and is available for use: /opt/exam/php/bin/php
[ OK ] The utility 'apachectl' exists and is available for use: /opt/bitnami/apache2/bin/apachectl
[ OK ] The port (port 80) is a valid port.
[ -- ] We are attempting to discover the operating system type and version number ...
[ OK ] The 'python' binary exists and is available for use: /usr/bin/python
[ -- ] Distro: Ubuntu
[ -- ] Version: 16.04
[ -- ] Codename: xenial
[ >> ] OS Version Checks were skipped by user directive, you may get errors.
[ -- ] Hostname: d
s
[ -- ] Primary IP: x.x.x.x
[ -- ] We are checking the service running on port 80...
[ -- ] The process listening on port 80 is /opt/bitnami/apache2/bin/httpd.bin
[ -- ] The process running on port 80 is not Apache. Falling back to process list...
[ !! ] Could not find Apache process. Exiting...

Unfortunately, that's where I hit another brick wall. Can you figure out why the Apache process cannot be found even after the apachectl utility has been detected before?

Thank you.

@richardforth
Copy link
Owner

richardforth commented Oct 15, 2022 via email

@muimid
Copy link
Author

muimid commented Oct 15, 2022

I've tried some options you provided on the script:

Usage: apache2buddy.pl [OPTIONS]
If no options are specified, the basic tests will be run.
-p, --port=PORT Specify an alternate port to check (default: 80)
--pid=PID Specify a PID to bypass the "Multiple PIDS listening on port 80" error.
-v, --verbose Use verbose output (this is very noisy, only useful for debugging)
-P, --no-check-pid DON'T Check the Parent Pid File Size (only use if desperate for more info, results may be skewed).

But while I'm able to get more info (verbose), it seems the script does not bypass the PID I provide.

#######################################################
apache2buddy.pl report for ds ()
#######################################################
VERBOSE: UID of user is: 0
[ 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: /bin/netstat
[ OK ] 'php' exists and is available for use: /opt/bitnami/php/bin/php
[ OK ] The utility 'apachectl' exists and is available for use: /opt/bitnami/apache2/bin/apachectl
[ OK ] The port (port 80) is a valid port.
[ -- ] We are attempting to discover the operating system type and version number ...
[ OK ] The 'python' binary exists and is available for use: /usr/bin/python
VERBOSE: Check OS platform
VERBOSE: /usr/bin/python -c 'try:
import platform
print(platform.linux_distribution())
except AttributeError as e:
pass'
[ -- ] Distro: Ubuntu
[ -- ] Version: 16.04
[ -- ] Codename: xenial
[ >> ] OS Version Checks were skipped by user directive, you may get errors.
[ -- ] Hostname: d
s
[ -- ] Primary IP:
[ -- ] We are checking the service running on port 80...
VERBOSE: PID is 1140
VERBOSE: Finding process running with a PID of 1140
VERBOSE: Found process /opt/bitnami/apache2/bin/httpd.bin
[ -- ] The process listening on port 80 is /opt/bitnami/apache2/bin/httpd.bin
[ -- ] The process running on port 80 is not Apache. Falling back to process list...
[ !! ] Could not find Apache process. Exiting...

Anyway, the hunt continues...

@richardforth
Copy link
Owner

richardforth commented Oct 15, 2022 via email

@muimid
Copy link
Author

muimid commented Oct 16, 2022

Hmmm... I've never done it before but I could try. I've currently cloned my system on a desktop computer on my network that allows me to run tests before implementing them on the production server. But I'll let you know if I make progress.

@richardforth
Copy link
Owner

richardforth commented Oct 16, 2022 via email

@muimid
Copy link
Author

muimid commented Oct 17, 2022

Hi Richard,

Thank you for your continued support (and bearing with me). I run my organisation's learning management system (Canvas) which we installed through an application provided by Bitnami.

To try it out, you can install a prepackaged virtual machine from here:

https://bitnami.com/stack/canvaslms/virtual-machine

Or you can install an earlier opensource linux package (similar to the one we are currently running) on your docker machine that I have saved at the link below:

File

Please let me know when you get the file so that I can remove the link. I would really like to know how to tune our server as we're expecting a lot of (concurrent) traffic during student online examinations soon.

@richardforth
Copy link
Owner

richardforth commented Oct 30, 2022

If you need some inspiration for Dockerfiles, here is a repository of the Dockerfiles Im using for my Jenkins Pipelines:

https://github.com/richardforth/docker/tree/main/forric

I cant use Virtual Machines I'm afraid.

I'm in the process of downloading the file, I'll let you know when it is downloaded.

@richardforth
Copy link
Owner

File has been downloaded, and Checked: Virus Free by Avast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants