I have set up a virtual debian machine that I am running on my windows box (using VirtualBox) for a development LAMP stack. Today when I try to load up a dev website from my windows machine the browser isn't getting a response from my VM. I'm not much of a linux admin; here's what i can tell you:
- The browser never gets a response, but it doesn't get any 500 errors either. It just sits spinning its wheels..
Yesterday I did some work on the VM to build the php imagick.so executable so I could work with some pdf editing libraries. The changes were (ultimately) basically these:
- $ apt-get update php5-devel
- $ apt-get update make
- $ apt-get install php-pear
- $ apt-get install libmagickwand-dev
- $ pecl install imagick
Before I made those changes, I made a snapshot of my working VM. When I ran into this problem, I shut down my modified VM and started up my earlier snapshot. This makes no difference - same web server problem.
- From my windows machine I can ping my VM at the expected ip (192.168.1.222)
- However, I cannot ping port 80. I get a "could not find host 192.168.1.222:80 response.
- Previously I was able to restart apache without any apparent problems, but a moment ago when I did /etc/init.d/apache2 stop then start, I got this for the first time:
Edit: updated question after restarting apache as root
Stopping/starting server:
root@debian:/home/brd# /etc/init.d/apache2 stop
Stopping web server: apache2 ... waiting .
root@debian:/home/brd# /etc/init.d/apache2 start
Starting web server: apache2.
Apache seems to restart without complaint
root@debian:/home/brd# tail /var/log/apache2/error.log
Failed loading /usr/lib/php5# ls 20090626+lfs/xdebug.so: /usr/lib/php5# ls 20090626+lfs/xdebug.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5# ls 20090626+lfs/xdebug.so: /usr/lib/php5# ls 20090626+lfs/xdebug.so: cannot open shared object file: No such file or directory
[Thu Mar 14 09:27:16 2013] [notice] caught SIGTERM, shutting down
Failed loading /usr/lib/php5# ls 20090626+lfs/xdebug.so: /usr/lib/php5# ls 20090626+lfs/xdebug.so: cannot open shared object file: No such file or directory
[Thu Mar 14 09:27:22 2013] [error] python_init: Python version mismatch, expected '2.6.5+', found '2.6.6'.
[Thu Mar 14 09:27:22 2013] [error] python_init: Python executable found '/usr/bin/python'.
[Thu Mar 14 09:27:22 2013] [error] python_init: Python path being used '/usr/lib/python2.6/:/usr/lib/python2.6/plat-linux2:/usr/lib/python2.6/lib-tk:/usr/lib/python2.6/lib-old:/usr/lib/python2.6/lib-dynload'.
[Thu Mar 14 09:27:22 2013] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Thu Mar 14 09:27:22 2013] [notice] mod_python: using mutex_directory /tmp
[Thu Mar 14 09:27:22 2013] [notice] Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze15 with Suhosin-Patch mod_python/3.3.1 Python/2.6.6 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
- The python error seems harmless (see Python version mismatch, expected '2.6.5+', found '2.6.6').
- The xdebug error is suspicious, but xdebug had been working well before my changes and seems to be ok:
xdebug error seems to exist:
root@debian:/home/brd# ls /usr/lib/php5/20090626+lfs/ -al
total 1836
drwxr-xr-x 2 root root 4096 Mar 13 15:29 .
drwxr-xr-x 5 root root 4096 Mar 12 17:07 ..
-rw-r--r-- 1 root root 866513 Mar 13 15:29 imagick.so
-rw-r--r-- 1 root root 109220 Mar 4 09:23 mysqli.so
-rw-r--r-- 1 root root 42352 Mar 4 09:23 mysql.so
-rw-r--r-- 1 root root 26116 Mar 4 09:23 pdo_mysql.so
-rw-r--r-- 1 root root 87588 Mar 4 09:23 pdo.so
-rw-r--r-- 1 root root 141336 Aug 19 2010 suhosin.so
-rw-r--r-- 1 root root 561230 Jul 8 2010 xdebug.so
Apache seems to be running..
root@debian:/home/brd# ps aux | grep apache
root 2338 0.0 0.6 45448 12696 ? Ss 10:51 0:00 /usr/sbin/apache2 -k start
www-data 2346 0.0 0.3 45448 6536 ? S 10:51 0:00 /usr/sbin/apache2 -k start
www-data 2347 0.0 0.3 45448 6536 ? S 10:51 0:00 /usr/sbin/apache2 -k start
www-data 2348 0.0 0.3 45448 6536 ? S 10:51 0:00 /usr/sbin/apache2 -k start
www-data 2349 0.0 0.3 45448 6540 ? S 10:51 0:00 /usr/sbin/apache2 -k start
www-data 2350 0.0 0.3 45448 6536 ? S 10:51 0:00 /usr/sbin/apache2 -k start
root 2358 0.0 0.0 3304 764 pts/0 S+ 10:52 0:00 grep apache
httpd listening on port 80?
root@debian:/home/brd# ss -nal | grep 80
0 128 :::80 :::*
check firewall
root@debian:/home/brd# iptables -n -L -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
'Listen' directives from /etc/apache2/ports.conf (there is no Listen directive in /etc/apache2/apache2.conf)
NameVirtualHost *:80
Listen 80
<IfModule mod_ssl.c>
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to <VirtualHost *:443>
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
And yet..
I still cannot ping port 80 from my windows machine. From here, I don't know where to go. Suggestions?