LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   Apache server refuses connection (https://www.linuxquestions.org/questions/suse-opensuse-60/apache-server-refuses-connection-251478/)

jimaman 11-05-2004 09:38 AM

Apache server refuses connection
 
This problem arose in my Web Servers class last night. The students have all installed SuSE 9.1 Pro (clean installs), Apache2, and Webalizer. Last night's class activities required hitting each other's websites to create entries in their servers' access_log files. We had one server which reported "connection refused." I've seen that with FTP connections from time to time but never from a web server. We uninstalled and re-installed Apache2, verified the configuration file entries, made sure no firewall had been accidentally started. After two hours, we had to give up on the problem for the night.

I'd be very interested in the thoughts of anyone out there on this issue. You will have my thanks and that of my student.

-- Jim Aman
Saint Xavier University (Chicago)

Matir 11-05-2004 09:02 PM

Was the server indeed running? And listening on ALL ips, and not (somehow) just the loopback? Was the computer pingable and other services available?

duliano 11-06-2004 06:44 AM

Hello,
I had a similiar problem. I did a couple of things that I believe fixed the problem. First, my machine was getting its IP address from DHCP. I changed it to a static IP. Next I used YaST (a first for me for configuring Apache) and had it listen on the specific IP address and port. Previously it was listening an all IP addresses. Of course I made apache was enabled via YaST as well.

I am not sure if it this will help you or not but I hope so

Good Luck!

jimaman 11-06-2004 09:13 AM

Matir,
We are as sure as possible that Apache was running. The config file was set to listen on port 80 on all IP addresses. We could ping the box. The FTP daemon had not yet been toggled on.

Duliano,
The lab is available for all students so setting a static IP isn't an option (although I will try it as a test). We did try activating Apache both through YAST and using apache2ctl with similar results. As noted above, Apache was configured to listen on port 80 of all IP addresses.

Thanks to both for your ideas. I'll let you know how this works out.

Matir 11-06-2004 10:29 AM

Could you access the machine's webserver from itself? Did a "ps -ef" listing show apache running?

jimaman 11-06-2004 10:50 AM

Matir,

I just don't recall whether the "loopback" call to the local server was refused. I don't recall having checked the process list. I'll try both when I go back to that campus shortly. Thanks.

duliano 11-06-2004 11:45 AM

Hi jimaman,
is anything showing up in the error logs? What works best for me is to "tail -f error_log" while someone is trying to connect to the local machine. It helps see what is happening in realtime.

jimaman 11-06-2004 02:32 PM

duliano,

Checking there will be one of my next ventures .. thanks

jimaman 11-08-2004 11:24 AM

Matir ...
I'm not back on-site and checking the machine. I can't hit either the web server or FTP server from the local machine. "ps -ef" shows entries for ag_initscripts and ag_http_server which toggle whenever the server is toggled in YAST.

duliano ...
The error_log contains just these lines (for every attempt to start Apache2):
[notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[warn] Init: Session Cache is not configured [hit: SSLSessionCache]

I've rechecked the Apache2 config files to confirm that SSL was not active. Therefore, I don't think the SSLSessionCache should not be appearing.

To both of you:
I have tried toggling the web server using apache2ctl and rcapache2, also. The httpd daemon is not running, which is evident from reading the process list. Even though chkconfig says apache2 is on in levels 3 and 5, it apparently is not.

Of more significance, perhaps, is that the vsftpd daemon is running but FTP connections are refused both internally (loopback and IP addresses) and externally. This suggests to me that there is a more general access issue. I find no configured security entries (using YAST).

I welcome your thoughts (and those of anyone else) on this while I dig further into this machine. Thanks!

Matir 11-08-2004 11:40 AM

Try reinstalling apache and ftp. What do the apache or ftp daemon logs say for when they are trying to be started? How similar is this computer to the other machines in the lab?

jimaman 11-08-2004 12:41 PM

Matir,

We did remove and re-install Apache2 during the class to no avail. Because neither Apache nor vsftp really seems to be active (in spite of what chkconfig or YAST reports), there is no activity logged.

I just ran nmap on the loopback (127.0.0.1) and on the IP addr as assigned by the DHCP server . The loopback showed ports 22, 25, 111, and 631 open, which is okay. On the IP addr the port 25 entry was not reported.

I should note that this a triple-boot box with Win2K Pro and Win2k3 Server in the other partition. The box has probably not been cycled down fully in quite a while -- perhaps two weeks or more.

Thanks!

jimaman 11-08-2004 12:53 PM

An update: vsftpd is running but it doesn't show in the process list.

Action: Enough already! Although I'd love to spend more time to find the cause of this problem, it's not worth it anymore. I can't isolate the box and replace it with another so rebuilding it has become a reasonable option. I'm going to go to lunch and give others a chance to chime in. I'll still try any good suggestion (curiosity really has me in its grip here), but after lunch it will be time to nuke the installation.

Thanks!

jimaman 11-08-2004 02:32 PM

Having heard nothing over an extended lunch break, I've begun the re-installation process. It will be a clean job with all partitions on the 2nd HD removed, re-designated, and re-formatted. I'll post again once I can check the web and FTP server access. Thanks to all who offered suggestions.

jimaman 11-11-2004 05:14 PM

I did rebuild the drive, removing the Win2K3 partition/installation. The drive then had nothing on it but a clean installation of SuSE 9.1 PRO. That was Monday afternoon. The Apache2 server and FTP service were still not responding when I left. I just returned to the lab (Thursday) for this week's class. No one has used the Linux installation on the machine since I left on Monday. Nonetheless, the web server is now responding. FTP isn't, but that's probably just an error in the config file (chkconfig reports that the vsftpd is running).

So that wraps it up on this one. Thanks to those who offered advice. I appreciate if very much.


All times are GMT -5. The time now is 10:00 AM.