LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-13-2014, 09:41 AM   #1
stefzeer90
LQ Newbie
 
Registered: Mar 2014
Distribution: CentOS, Ubuntu
Posts: 8

Rep: Reputation: Disabled
Apache not working after system reboot


Just installed and configured my apache webserver on CentOS machine.
It was allright, I even assigned router to forward to the specific lan address and went public.
So I got that genius Idea : "Hey let's reboot and check if everything is fine after.
BANG! Can't connect to website neither with lan address nor my forwarded IP adress. It's simply GONE.
Apache service started and running (I added it to startup , but doublechecked),restarted it and what not.iptables listens on 80 , so it's ok too.
Please help I was so happy how everything ran smoothly and was about to upload my real website on the server.
 
Old 03-13-2014, 09:57 AM   #2
grim76
Member
 
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 308

Rep: Reputation: 50
Check your log files for errors. Also double-check your config to make sure that you did not typo something in a path.
 
Old 03-13-2014, 10:00 AM   #3
stefzeer90
LQ Newbie
 
Registered: Mar 2014
Distribution: CentOS, Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
No errors and httpd.conf was configured and working. Haven't touched it.Just rebooted the pc.
 
Old 03-13-2014, 10:01 AM   #4
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
Few things you can check
1. Check apache service running or not (ps ax | grep httpd)
2. Apache listening port (netstat -pnl | grep 80)
3. telnet to the port locally and remotely
4. wget to the url locally
5. Firewall rules
6. check the apache error.log

What do you mean apache is not working? is the apache service not running? or your website is not loading?
 
Old 03-13-2014, 10:04 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,623

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by stefzeer90 View Post
No errors and httpd.conf was configured and working. Haven't touched it.Just rebooted the pc.
As a shot in the dark, since you've checked the firewall and error logs...does your system have a static address? If not, it may have grabbed a different one from DHCP, which would explain why you can't see it at that address, and you have no errors.
 
Old 03-13-2014, 01:07 PM   #6
stefzeer90
LQ Newbie
 
Registered: Mar 2014
Distribution: CentOS, Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kirukan View Post
Few things you can check
1. Check apache service running or not (ps ax | grep httpd)
2. Apache listening port (netstat -pnl | grep 80)
3. telnet to the port locally and remotely
4. wget to the url locally
5. Firewall rules
6. check the apache error.log

What do you mean apache is not working? is the apache service not running? or your website is not loading?
Website not loading.
1.Running
2.port 80 Listening
3.Works remo.
4.failed : No route to host ???!?!
5.All set added rules manually ,worked before the reboot , and checked them again after.
 
Old 03-13-2014, 01:09 PM   #7
stefzeer90
LQ Newbie
 
Registered: Mar 2014
Distribution: CentOS, Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
As a shot in the dark, since you've checked the firewall and error logs...does your system have a static address? If not, it may have grabbed a different one from DHCP, which would explain why you can't see it at that address, and you have no errors.
Use DHCP from my router but i bound .102 ip from it to the server machine.Also forwarded my IP to that .102 lan adress.Worked all fine before reboot , and double checked after the epic fail.
 
Old 03-13-2014, 11:04 PM   #8
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
did you have a look at IPTABLES, can you post'em here ?
 
Old 03-14-2014, 09:11 AM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,623

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by stefzeer90 View Post
Use DHCP from my router but i bound .102 ip from it to the server machine.Also forwarded my IP to that .102 lan adress.Worked all fine before reboot , and double checked after the epic fail.
Confused about this. You say you use DHCP from your router, but you bound the .102 address FROM the router to the server??? Do you mean that you set the server to have the static address of .102, or that you did something on your router? Verify the server's IP address (the ifconfig -a command will show you). If it's not .102, you can change it and see if that resolves your immediate problem, and then we can help you modify things to always get that same address through reboots.
Quote:
Originally Posted by SAbhi
did you have a look at IPTABLES, can you post'em here ?
Read post #1 and #6, where the OP says they've already verified their IPtables rules, and that they were working correctly before the reboot.
 
Old 03-14-2014, 03:27 PM   #10
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
Hi,

What happens if locally via a browser on the webserver itself you type http://hostname i.e. if your machine name is web01 type http://web01

Does the webserver deliver web pages to itself.

I know you mentioned that your apache log files contain no errors on starting the service, but please restart the httpd service and post log entries that correspond with that particular time / restart. i.e. /var/log/httpd/access_log /var/log/httpd/error_log and also /var/log/messages

Regards,

Rawcous!
 
Old 03-14-2014, 11:30 PM   #11
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
yeah had another look on all comments saw wget did'nt worked locally so as for http://localhost/your_web_name/some_page this too ?
this may not be a issue as you are able to telnet to the port.. but lets have a look once..

Last edited by SAbhi; 03-14-2014 at 11:32 PM.
 
Old 03-16-2014, 08:54 AM   #12
stefzeer90
LQ Newbie
 
Registered: Mar 2014
Distribution: CentOS, Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Confused about this. You say you use DHCP from your router, but you bound the .102 address FROM the router to the server??? Do you mean that you set the server to have the static address of .102, or that you did something on your router? Verify the server's IP address (the ifconfig -a command will show you). If it's not .102, you can change it and see if that resolves your immediate problem, and then we can help you modify things to always get that same address through reboots.

Read post #1 and #6, where the OP says they've already verified their IPtables rules, and that they were working correctly before the reboot.
I have set the server to always get .102 address on my lan network and then forwarded all incomming connections on my public ip adress to that local .102 addres and it worked at first.
ifconfig shows inet addr:192.168.0.102 just as it should double checked with the router connection tables and the mac of my webserver has .102 ip again all good on that field
 
Old 03-16-2014, 09:02 AM   #13
stefzeer90
LQ Newbie
 
Registered: Mar 2014
Distribution: CentOS, Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rawcous View Post
Hi,

What happens if locally via a browser on the webserver itself you type http://hostname i.e. if your machine name is web01 type http://web01

Does the webserver deliver web pages to itself.

I know you mentioned that your apache log files contain no errors on starting the service, but please restart the httpd service and post log entries that correspond with that particular time / restart. i.e. /var/log/httpd/access_log /var/log/httpd/error_log and also /var/log/messages

Regards,

Rawcous!
Code:
[Sun Mar 16 19:06:58 2014] [error] Exception KeyError: KeyError(-1215666352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Sun Mar 16 19:06:58 2014] [error] Exception KeyError: KeyError(-1215666352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Sun Mar 16 19:06:58 2014] [error] Exception KeyError: KeyError(-1215666352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Sun Mar 16 19:06:58 2014] [error] Exception KeyError: KeyError(-1215666352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Sun Mar 16 19:06:58 2014] [notice] caught SIGTERM, shutting down
[Sun Mar 16 19:07:00 2014] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Sun Mar 16 19:07:00 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Mar 16 19:07:00 2014] [notice] Digest: generating secret for digest authentication ...
[Sun Mar 16 19:07:00 2014] [notice] Digest: done
[Sun Mar 16 19:07:00 2014] [warn] mod_wsgi: Compiled for Python/2.6.2.
[Sun Mar 16 19:07:00 2014] [warn] mod_wsgi: Runtime using Python/2.6.6.
[Sun Mar 16 19:07:00 2014] [notice] Apache/2.2.15 (Unix) DAV/2 mod_auth_kerb/5.4 mod_nss/2.2.15 NSS/3.12.10.0 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_wsgi/3.2 $
[Sun Mar 16 19:07:00 2014] [error] avahi_entry_group_add_service_strlst("localhost") failed: Invalid host name
[Sun Mar 16 19:07:00 2014] [error] avahi_entry_group_add_service_strlst("localhost") failed: Invalid host name
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware-current need a double reboot command to really reboot the system sardinha Slackware 11 09-12-2012 03:19 PM
Ubuntu Feisty - Sound was working, but mysteriously stops working after reboot. woodsy934 Linux - Software 7 07-04-2011 06:39 PM
[linux auto reboot] content"reboot system boot" hunter_cao7 Linux - Server 1 11-12-2007 06:09 PM
Reboot the system by apache Bassam Programming 3 10-28-2005 01:16 AM
spontaneous system-reboot when working with X-environment Boldie Linux - Software 1 07-18-2001 09:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration