LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-25-2005, 09:46 PM   #1
terrylmt
Member
 
Registered: Apr 2005
Posts: 30

Rep: Reputation: 15
Cannot access my website on Linux server


Hi folks..

this is my first posting and it's regarding the legacy system which I inherited in my new office. I have not worked on Linux before and am at a total loss as to what to do.

From the vague notes scribbled by my predecessor, everytime the server restarts, I am supposed to:

1. Run Apache
2. Run MYSQL

(in the above sequence)

I follow the instructions and get "httpd started" when I run apache.

The problem is when I try to run MYSQL. After typing the command "./safe_mysqld" it just says it's starting the MySQL DB.. and it hangs there, i.e. no further movement, updates, etc. and my site is still down?

Need help desperately. Working in Singapore so the time zone here is GMT +8. Appreciate all the help I can get.

Thanks so much!!
 
Old 04-25-2005, 11:09 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Some basic information such as distribution and version, and version of MySQL would help. Also, what do you mean your site is still down? Can you not access the site at all? Once httpd (Apache) is running, the site should be accessible, although if MySQL isn't working, stuff that relies on it will be broken. Probably MySQL has actually started (don't think it backgrounds itself automatically so it's taken over your terminal). You can verify this by logging on on another terminal and checking the output of "ps aux" for MySQL processes. There should also be a mysqld.log (usually in /var/lib/mysql on Red Hat systems IIRC) that can be consulted.

You may have a connection problem to the site. Have you tried viewing it from the server machine itself?
 
Old 04-25-2005, 11:13 PM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 376Reputation: 376Reputation: 376Reputation: 376
welcome to LQ!!!

=)



it's weird that your predecessor didn't have those two daemons set to run automatically on startup... anyhow, when you say that your "site is still down", what exactly do you mean?? like, is there absoloutely nothing when you enter the URL, or are the pages actually loading but without the data from the base?? or is there an error page?? etc...


Last edited by win32sux; 04-25-2005 at 11:15 PM.
 
Old 04-25-2005, 11:30 PM   #4
terrylmt
Member
 
Registered: Apr 2005
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by btmiller
[B]Some basic information such as distribution and version, and version of MySQL would help.
Sorry.. I dunno how to check.. could you gimme details on how to check so that I can revert asap?

Quote:
Originally posted by btmiller
Also, what do you mean your site is still down? Can you not access the site at all?
Yeah. my site's URL is http://www.primary-learning.com. It's not loading the pages that it should be loading.

Quote:
Originally posted by btmiller
Once httpd (Apache) is running, the site should be accessible, although if MySQL isn't working, stuff that relies on it will be broken. Probably MySQL has actually started (don't think it backgrounds itself automatically so it's taken over your terminal). You can verify this by logging on on another terminal and checking the output of "ps aux" for MySQL processes. There should also be a mysqld.log (usually in /var/lib/mysql on Red Hat systems IIRC) that can be consulted.
How do I do this?

Quote:
Originally posted by btmiller
You may have a connection problem to the site. Have you tried viewing it from the server machine itself?
How do I do this?

So sorry. But I am totally inexperienced and have been thrust this system without any prior training/instruction.
 
Old 04-25-2005, 11:33 PM   #5
terrylmt
Member
 
Registered: Apr 2005
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by win32sux
welcome to LQ!!!

=)



it's weird that your predecessor didn't have those two daemons set to run automatically on startup... anyhow, when you say that your "site is still down", what exactly do you mean?? like, is there absoloutely nothing when you enter the URL, or are the pages actually loading but without the data from the base?? or is there an error page?? etc...
Thanks for the welcome..

I also dunno how to set them to run automatically on startup ...

My site URL is http://www.primary-learning.com and it is still inaccessible, i.e. no content is loaded. No error pages, nothing. ZIP, NADA..
 
Old 04-25-2005, 11:37 PM   #6
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 376Reputation: 376Reputation: 376Reputation: 376
there's no reply from the website... you need to find out why there isn't any access to the site before assuming it's a database issue... according to my nmap, there isn't even a daemon listening on your TCP port 80:

Code:
bash-3.00$ nmap -p 80 -P0 primary-learning.com

Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2005-04-25 22:38 EST
Interesting ports on primary-learning.com (202.172.233.179):
PORT   STATE    SERVICE
80/tcp filtered http

Nmap run completed -- 1 IP address (1 host up) scanned in 12.082 seconds

Last edited by win32sux; 04-25-2005 at 11:42 PM.
 
Old 04-25-2005, 11:41 PM   #7
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 376Reputation: 376Reputation: 376Reputation: 376
do some basic tests... do an "ifconfig" to verify that the network interfaces are up and running... then see if you can ping the local IPs, and then see if you are able to ping an internet IP from the server...

is the server behind a firewall??
 
Old 04-25-2005, 11:43 PM   #8
terrylmt
Member
 
Registered: Apr 2005
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by win32sux
there's no reply from the website... you need to find out why there isn't any access to the site before asuming it's a database issue... according to my nmap, there isn't even a daemon listening on port 80:

Code:
bash-3.00$ nmap -p 80 -P0 primary-learning.com

Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2005-04-25 22:38 EST
Interesting ports on primary-learning.com (202.172.233.179):
PORT   STATE    SERVICE
80/tcp filtered http

Nmap run completed -- 1 IP address (1 host up) scanned in 12.082 seconds
ok.. thanks for the advice.. So how do I check the IP of the linux machine and reassign it?

Sorry to trouble..
 
Old 04-25-2005, 11:44 PM   #9
terrylmt
Member
 
Registered: Apr 2005
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by win32sux
do some basic tests... do an "ifconfig" to verify that the network interfaces are up and running... then see if you can ping the local IPs, and then see if you are able to ping an internet IP from the server...

is the server behind a firewall??
so i just type "./ifconfig" ?

ping is the same as the win32 ping, i.e. ping <IP address>

And yes, it's behind a firewall..
 
Old 04-25-2005, 11:46 PM   #10
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 376Reputation: 376Reputation: 376Reputation: 376
without the dot and the slash...
Code:
ifconfig
yeah, the ping is the same...

what kinda firewall?? are you sure the firewall isn't blocking the access??
 
Old 04-25-2005, 11:50 PM   #11
terrylmt
Member
 
Registered: Apr 2005
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by win32sux
without the dot and the slash...
Code:
ifconfig
yeah, the ping is the same...

what kinda firewall?? are you sure the firewall isn't blocking the access??
according to my network manager, it isn't.

But is there any way to check?

thanks so much for all ur help! appreciate it!
 
Old 04-25-2005, 11:55 PM   #12
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 376Reputation: 376Reputation: 376Reputation: 376
keep in mind that the firewall's administrator will need to do port-forwarding on the firewall for machines on the internet to be able to reach your server if it's sitting behind the firewall...

i assume he's already doing this if the server was working before... right??

did you confirm that the network card is up and you can ping the local IP, the firewall, and an Internet address (for example google.com) from the server??

 
Old 04-26-2005, 12:13 AM   #13
terrylmt
Member
 
Registered: Apr 2005
Posts: 30

Original Poster
Rep: Reputation: 15
this is what I get when i run ifconfig:

eth0 Link encap:Ethernet HWaddr 00:30:48:11:0D:CE
inet addr:203.125.225.133 Bcast:203.125.225.143 Mask:225.225.225.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:69943 errors:0 dropped:0 overruns:0 frame:0
TX packets:32554 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 texqueuelen:0
RX bytes:7402881 (7.0Mb) TX bytes:1367268 (1.3Mb)
Interrupt:9 Base address:0x6000

lo Link encap:Local loopback
inet addr:127.0.0.1 Mask:225.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:19590 errors:0 dropped:0 overruns:0 frame:0
TX packets:19590 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 texqueuelen:0
RX bytes:1415141 (1.3Mb) TX bytes:1415141 (1.3Mb)
 
Old 04-26-2005, 12:57 AM   #14
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 376Reputation: 376Reputation: 376Reputation: 376
Quote:
Originally posted by terrylmt
this is what I get when i run ifconfig:

eth0 Link encap:Ethernet HWaddr 00:30:48:11:0D:CE
inet addr:203.125.225.133 Bcast:203.125.225.143 Mask:225.225.225.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:69943 errors:0 dropped:0 overruns:0 frame:0
TX packets:32554 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 texqueuelen:0
RX bytes:7402881 (7.0Mb) TX bytes:1367268 (1.3Mb)
Interrupt:9 Base address:0x6000

lo Link encap:Local loopback
inet addr:127.0.0.1 Mask:225.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:19590 errors:0 dropped:0 overruns:0 frame:0
TX packets:19590 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 texqueuelen:0
RX bytes:1415141 (1.3Mb) TX bytes:1415141 (1.3Mb)
that's strange, cuz 203.125.225.133 is not the IP address that primary-learning.com resolves to - at least not on my ISP's DNS servers... AFAIK, it resolves to 202.172.233.179, which looks dead to me as far as http service is concerned:
Code:
bash-3.00$ ping -c 3 primary-learning.com
PING primary-learning.com (202.172.233.179) 56(84) bytes of data.

--- primary-learning.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2012ms

bash-3.00$ nmap -p 80 -P0 primary-learning.com

Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2005-04-25 23:50 EST
Interesting ports on primary-learning.com (202.172.233.179):
PORT   STATE    SERVICE
80/tcp filtered http

Nmap run completed -- 1 IP address (1 host up) scanned in 12.052 seconds
this made me think that maybe it was a DNS issue, but by looking at 203.125.225.133 directly i get the same results:
Code:
bash-3.00$ ping -c 3 203.125.225.133     
PING 203.125.225.133 (203.125.225.133) 56(84) bytes of data.

--- 203.125.225.133 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2017ms

bash-3.00$ nmap -p 80 -P0 203.125.225.133     

Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2005-04-25 23:54 EST
Interesting ports on 203.125.225.133:
PORT   STATE    SERVICE
80/tcp filtered http

Nmap run completed -- 1 IP address (1 host up) scanned in 17.057 seconds
this is what you would want it to look like:
Code:
bash-3.00$ ping -c 3 google.com     
PING google.com (216.239.37.99) 56(84) bytes of data.
64 bytes from 216.239.37.99: icmp_seq=1 ttl=242 time=143 ms
64 bytes from 216.239.37.99: icmp_seq=2 ttl=242 time=107 ms
64 bytes from 216.239.37.99: icmp_seq=3 ttl=242 time=96.7 ms

--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2017ms
rtt min/avg/max/mdev = 96.739/115.828/143.360/19.950 ms
bash-3.00$ nmap -p 80 google.com     

Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2005-04-26 00:04 EST
Interesting ports on 216.239.57.99:
PORT   STATE SERVICE
80/tcp open  http

Nmap run completed -- 1 IP address (1 host up) scanned in 3.416 seconds
if your server was behind a NAT firewall, it would usually have a private IP assigned to it, instead of a public one like 203.125.225.133... i'm not sure what kinda setup you have over there... are you talking about a software firewall (iptables) on the server itself?? what do the iptables rules on the server look like?? post the output of these:
Code:
iptables -L
Code:
iptables -t nat -L
did you verify that you were able to ping the Internet from the server??

judging by the:
Quote:
RX bytes:7402881 (7.0Mb) TX bytes:1367268 (1.3Mb)
i would assume the connection IS working...


Last edited by win32sux; 04-26-2005 at 01:04 AM.
 
Old 04-26-2005, 01:04 AM   #15
terrylmt
Member
 
Registered: Apr 2005
Posts: 30

Original Poster
Rep: Reputation: 15
I can't ping out.. seems like the network is an issue then?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Using a Linux Browser I can't access Website Echo Kilo Linux - Software 13 12-05-2004 09:21 PM
Is this website installed on linux server? futurist LQ Suggestions & Feedback 3 03-29-2003 01:09 PM
Unable to access to a website on apache web server bisbane Linux - Networking 3 07-11-2001 10:18 AM
Unable to access to a website on apache web server bisbane General 3 07-10-2001 12:03 PM
remote access to a website on apache web server bisbane Linux - Newbie 0 07-09-2001 07:24 PM


All times are GMT -5. The time now is 11:56 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration