PDA

View Full Version : Apache Issues


DAssassin
27th June 2005, 06:57 AM
Prior to upgrading from FC3, I was running an Apache server on my Linux desktop just fine, serving my LAN. It is primarily used for testing, it doesn't have an outside user pool that accesses it frequently, however it is used on occasion, so it is doubtful any outside interference may be causing my problem. Upon upgrading to FC4, my Apache server works fine for the first page accessed, which is going to be http://localhost/ (index.html). After that, no pages will load from the Apache server, whether I am accessing it from another machine, or the Linux box itself. Upon doing this, not only Apache begins to stop working, but also my Samba shares, and SSH. The Samba shares become inaccessible, and will attempt to indefinitely load. I am not sure if there is any configuration difference between my current FC4 box and my old FC3 box, but there is definitely a difference in performance. I notice no performance impact on the box itself, unless I am using one of the aforementioned items (i.e., web browsing is fine). Could there be a package that wasn't installed correctly and needs to be reinstalled?

EDIT: If you would like to see the httpd portion of the problem, the web address to the site is http://dpaulat.homeip.net/ - only the root works, if anything else is typed in it goes on loading indefinitely.

brianmsu80
27th June 2005, 07:03 AM
Did you change the default firewall (iptables)?
Is it running?
service iptables status
If so what rules are in place:
iptables -L

Post either please...

Doesn't sound like a package to me, because also Samba and SSH connections are affected. The only way they could be related is in the iptables or SELinux. Your system SELinux enabled?

DAssassin
27th June 2005, 07:14 AM

"Firewall is stopped."

I'm not familiar with SELinux... I'm not sure if it's enabled or not, where can I find information on this? I'm running 2.6.11-1.1369_FC4, I'm not sure if it comes default or not.

brianmsu80
27th June 2005, 07:45 AM
Can you ping 127.0.0.1 and IP of eth0?

Provide output of...
check if SELINUX is enabled:
cat /etc/sysconfig/selinux | grep SELINUX=

rpm -qa | grep selinux

service --status-all | grep running

DAssassin
27th June 2005, 08:08 AM
Ping of 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.070 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.059 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.059 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.059 ms

--- 127.0.0.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.059/0.061/0.070/0.010 ms, pipe 2

I use ath0 for my primary LAN connection, a wireless connection through MadWifi (worked perfectly fine under FC3)
Contents of /etc/sysconfig/network-scripts/ifcfg-ath0
STARTMODE=hotplug
DEVICE=ath0
BOOTPROTO=none
WIRELESS=yes
IPADDR=192.168.0.4
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
MODE=Managed
ESSID=server
IPV6INIT=no
ONBOOT=yes
USERCTL=no
PEERDNS=yes
TYPE=Ethernet

SELinux exists, I found it when searching on my drive

Output of cat /etc/sysconfig/selinux | grep SELINUX=
# SELINUX= can take one of these three values:
SELINUX=disabled

Output of rpm -qa | grep selinux
selinux-policy-strict-1.23.16-6
selinux-policy-targeted-1.23.16-6
libselinux-1.23.10-2
libselinux-devel-1.23.10-2

Output of service --status-all | grep running (before website loading to malfunction certain services)
acpid (pid 2113) is running...
anacron (pid 2396) is running...
atd (pid 2403) is running...
crond (pid 2334) is running...
cupsd (pid 2122) is running...
cups-config-daemon (pid 2430) is running...
dc_client (pid 2326) is running...
dc_server (pid 2342) is running...
gpm (pid 2307) is running...
hald (pid 2439) is running...
httpd (pid 2370 2369 2368 2366 2365 2363 2362 2361 2318) is running...
mdmpd (pid 2502) is running...
mDNSResponder (pid 2095) is running...
dbus-daemon (pid 2825 2419) is running...
mysqld (pid 2255) is running...
rndc: connect failed: connection refused
Server address not specified in /etc/sysconfig/netdump
rpc.statd (pid 1831) is running...
nifd (pid 2065) is running...
portmap (pid 1813) is running...
rpc.idmapd (pid 1861) is running...
sendmail (pid 2298 2292) is running...
smartd (pid 2105) is running...
smbd (pid 2387 2385) is running...
nmbd (pid 2388) is running...
squid: ERROR: No running copy
sshd (pid 2155) is running...
syslogd (pid 1794) is running...
klogd (pid 1796) is running...
xfs (pid 2377) is running...
xinetd (pid 2164) is running...

After the malfunction, there appears to be no difference in the running process tree.

DAssassin
27th June 2005, 08:17 AM
Sometimes the Samba shares will load after awhile (the root shares, such as "http on Samba" to Windows), but anything further down the directory tree will hang for awhile until it gives a message that it can't be accessed. The http loading can literally take ages, I left home for several hours and it was still loading.

brianmsu80
27th June 2005, 08:29 AM
Hmm, nothing out of the ordinary...can anyone else help out?

Have you done a yum update since upgrading?
Anything in logs files? (before and after..."website loading to malfunction certain services")

tail -f /var/log/messages
tail -f /var/log/secure
tail -f /var/log/httpd/access_log
tail -f /var/log/httpd/error_log

brianmsu80
27th June 2005, 08:33 AM
Also check and see if you get output from these two commands: (they should be off)
cat /etc/modprobe.conf | grep net-pf-10
cat /etc/modprobe.conf | grep ipv6

At the bottom of /etc/modprobe.conf
alias net-pf-10 off
alias ipv6 off



With an empty line at the very end, a.k.a a carriage return.

DAssassin
27th June 2005, 08:33 AM
I have not done a yum update... if that's the one from the RHN network there is nothing available atm. There are interesting results on those log files, I will post as soon as my Linux box reboots.

brianmsu80
27th June 2005, 08:49 AM
Curious to see your log files...

Also I would try the SSH connections, not the Samba connections. Really too many intangibles with Samba to be reliable troubleshooting. SSH is direct IP. So After "website loading to malfunction certain services", how is SSH affected? What happens?

DAssassin
27th June 2005, 08:50 AM
/var/log/messages
Jun 27 02:01:02 localhost crond(pam_unix)[2952]: session opened for user root by (uid=0)
Jun 27 02:01:02 localhost crond(pam_unix)[2952]: session closed for user root
Jun 27 02:03:58 localhost automount[3030]: failed to mount /misc/.directory
Jun 27 02:03:58 localhost automount[3031]: >> /usr/sbin/showmount: can't get address for .directory
Jun 27 02:03:58 localhost automount[3031]: lookup(program): lookup for .directory failed
Jun 27 02:03:58 localhost automount[3031]: failed to mount /net/.directory
Jun 27 02:05:38 localhost automount[3108]: failed to mount /misc/.directory
Jun 27 02:06:34 localhost automount[3117]: >> /usr/sbin/showmount: can't get address for .directory
Jun 27 02:06:34 localhost automount[3117]: lookup(program): lookup for .directory failed
Jun 27 02:06:34 localhost automount[3117]: failed to mount /net/.directory
Jun 27 02:19:02 localhost smbd[3875]: [2005/06/27 02:19:02, 0] lib/util_sock.c:write_socket_data(430)
Jun 27 02:19:02 localhost smbd[3875]: write_socket_data: write failure. Error = Connection reset by peer
Jun 27 02:19:02 localhost smbd[3875]: [2005/06/27 02:19:02, 0] lib/util_sock.c:write_socket(455)
Jun 27 02:19:02 localhost smbd[3875]: write_socket: Error writing 4 bytes to socket 5: ERRNO = Connection reset by peer
Jun 27 02:19:02 localhost smbd[3875]: [2005/06/27 02:19:02, 0] lib/util_sock.c:send_smb(647)
Jun 27 02:19:02 localhost smbd[3875]: Error writing 4 bytes to client. -1. (Connection reset by peer)
Jun 27 02:35:54 localhost shutdown: shutting down for system reboot

/var/log/secure
Jun 27 00:32:07 localhost sshd[6537]: pam_succeed_if: requirement "uid < 100" was met by user "root"
Jun 27 00:32:07 localhost sshd[6537]: Accepted password for root from ::ffff:192.168.0.104 port 3391 ssh2
Jun 27 00:47:30 localhost gdm[2729]: pam_succeed_if: requirement "uid < 100" was met by user "root"
Jun 27 01:01:01 localhost crond[7020]: pam_succeed_if: requirement "uid < 100" was met by user "root"
Jun 27 01:58:06 localhost sshd[2155]: Received signal 15; terminating.
Jun 27 01:59:57 localhost sshd[2155]: Server listening on :: port 22.
Jun 27 01:59:57 localhost sshd[2155]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
Jun 27 02:00:37 localhost gdm[2729]: pam_succeed_if: requirement "uid < 100" was met by user "root"
Jun 27 02:01:02 localhost crond[2952]: pam_succeed_if: requirement "uid < 100" was met by user "root"
Jun 27 02:36:06 localhost sshd[2155]: Received signal 15; terminating.
Jun 27 02:37:53 localhost sshd[2155]: Server listening on :: port 22.
Jun 27 02:37:53 localhost sshd[2155]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
Jun 27 02:40:18 localhost gdm[2729]: pam_succeed_if: requirement "uid < 100" was met by user "root"

/var/log/httpd/access_log
24.7.235.8 - - [27/Jun/2005:02:15:29 -0500] "GET /phpmyadmin/themes/original/img/b_docs.png HTTP/1.1" 200 292 "http://dpaulat.homeip.net/phpmyadmin/queryframe.php?lang=en-utf-8&server=1&collation_connection=utf8_general_ci&hash=2342679da7cefe6e6341ee05f688986b1119856525" "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/0.10.1"
24.7.235.8 - - [27/Jun/2005:02:15:29 -0500] "GET /phpmyadmin/themes/original/img/b_sqlhelp.png HTTP/1.1" 200 287 "http://dpaulat.homeip.net/phpmyadmin/queryframe.php?lang=en-utf-8&server=1&collation_connection=utf8_general_ci&hash=2342679da7cefe6e6341ee05f688986b1119856525" "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/0.10.1"
24.7.235.8 - - [27/Jun/2005:02:15:30 -0500] "GET /phpmyadmin/css/phpmyadmin.css.php?lang=en-utf-8&js_frame=right&js_isDOM=1 HTTP/1.1" 200 12240 "http://dpaulat.homeip.net/phpmyadmin/main.php?lang=en-utf-8&server=1&collation_connection=utf8_general_ci" "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/0.10.1"
24.7.235.8 - - [27/Jun/2005:02:16:06 -0500] "GET / HTTP/1.1" 200 1642 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 (ax)"
24.7.235.8 - - [27/Jun/2005:02:15:28 -0500] "GET /phpmyadmin/main.php?lang=en-utf-8&server=1&collation_connection=utf8_general_ci HTTP/1.1" 200 53549 "http://dpaulat.homeip.net/phpmyadmin/index.php?lang=en-iso-8859-1&server=1" "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/0.10.1"
192.85.50.2 - - [27/Jun/2005:02:19:38 -0500] "GET / HTTP/1.1" 200 1642 "http://forums.fedoraforum.org/showthread.php?t=61536" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4"

/var/log/httpd/error_log
[Mon Jun 27 00:48:43 2005] [error] [client 24.7.235.8] File does not exist: /var/www/html/favicon.ico
[client 24.7.235.8] PHP Notice: Undefined index: p in /var/www/html/main/index.php on line 5
[client 24.7.235.8] PHP Notice: Undefined variable: access in /var/www/html/main/index.php on line 24
[Mon Jun 27 00:49:49 2005] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[client 24.7.235.8] PHP Notice: Undefined index: p in /var/www/html/main/index.php on line 5
[client 24.7.235.8] PHP Notice: Undefined variable: access in /var/www/html/main/index.php on line 24
[Mon Jun 27 00:55:26 2005] [error] [client 24.7.235.8] File does not exist: /var/www/html/favicon.ico
[client 24.7.235.8] PHP Notice: Undefined index: p in /var/www/html/main/index.php on line 5
[client 24.7.235.8] PHP Notice: Undefined variable: access in /var/www/html/main/index.php on line 24
[Mon Jun 27 01:01:38 2005] [error] [client 24.7.235.8] File does not exist: /var/www/html/favicon.ico
[Mon Jun 27 01:58:03 2005] [notice] caught SIGTERM, shutting down
[Mon Jun 27 02:00:06 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Jun 27 02:00:07 2005] [notice] Digest: generating secret for digest authentication ...
[Mon Jun 27 02:00:07 2005] [notice] Digest: done
[Mon Jun 27 02:00:07 2005] [notice] LDAP: Built with OpenLDAP LDAP SDK
[Mon Jun 27 02:00:07 2005] [notice] LDAP: SSL support unavailable
[Mon Jun 27 02:00:08 2005] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Mon Jun 27 02:00:09 2005] [notice] Apache/2.0.54 (Fedora) configured -- resuming normal operations

No output from either command in your next reply, added the two commands to modprobe.conf, will reboot and see what the results are.

DAssassin
27th June 2005, 08:53 AM
SSH is basically affected by this indefinite hang. I have not let it run more than a couple minutes, I don't know if it will show up. I will try after I reboot here if it still doesn't work. I had a current session running at the time, during the malfunction, which I was able to finish up just fine with no problem (seemed to anyway, I didn't probe very long), but upon opening a new session, it just hung and I was unable to even see the login prompt.

DAssassin
27th June 2005, 09:01 AM
Hmm... after adding those two lines to modprobe.conf, my problem seems to have magically dissolved :-D !! I will let you know if I run into any further troubles, thanks a million! The server actually runs fast too now! No more waiting 5-10 seconds for a page to load, when it should load instantly with those pings.

brianmsu80
27th June 2005, 09:01 AM
I guess to start you can clean up your /var/log/secure, but this is nothing important or anything to worry about.
(instead of 0.0.0.0)
vi /etc/ssh/sshd_config
ListenAddress 192.168.0.104

Oh wait, does your index.html have some kind of redirect in it?
Per http://dpaulat.homeip.net/phpmyadmin/index.php
Looks like users would get that ^ as the "home page".

Are you using or even install phpmyadmin?
If NOT:
service mysqld stop
chkconfig mysqld off

Still digesting the rest of the log files...

DAssassin
27th June 2005, 09:04 AM
phpmyadmin is just something I've been attempting to access on the side, it redirects to http://dpaulat.homeip.net/main/ (index.php) - I have been using it for my web development :)

SSH works fine now too :)

brianmsu80
27th June 2005, 09:06 AM
Oh ok, no problem at all, glad I could help...
You should probably get a firewall/iptables going on that machine if http traffic is forwarded to it. I could help you with getting a iptables going, if
man iptables
is overwhelming.

I also found this link helpful, although a few small things differ.
http://www.yo-linux.com/TUTORIALS/LinuxTutorialIptablesNetworkGateway.html

DAssassin
27th June 2005, 09:10 AM
Probably... I'll go ahead and give ya a message in the next few days about that. It's a test server, so if it nukes itself I won't be at a total loss, and my router takes care of the slim basics (yeah, there are probably still a lot of holes) unless someone gets on the inside. man pages are definitely a nightmare, I usually start to google the commands then and see what I come up with :) Off to bed for me now though, I have to be up in 6 hours for an eye doctor appointment. I can't be tired with bloodshot eyes there :)

DAssassin
27th June 2005, 06:09 PM
Hmm... well, it seems to be having the problem again. I really don't know what is causing it at this point, it just seems to be eventually slowing down to get there. When I tried it last night, it worked fine. When I hopped on today to try to browse my test site, and access phpmyadmin, it began indefinitely loading again. SSH performed slower, and there was noticeable lag. After a reboot, it works fine again. ???