LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot access my website on Linux server (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-access-my-website-on-linux-server-317135/)

terrylmt 04-25-2005 08:46 PM

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!!

btmiller 04-25-2005 10:09 PM

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?

win32sux 04-25-2005 10:13 PM

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...


terrylmt 04-25-2005 10:30 PM

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. :(

terrylmt 04-25-2005 10:33 PM

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 :confused: ...

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..
:(

win32sux 04-25-2005 10:37 PM

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


win32sux 04-25-2005 10:41 PM

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??

terrylmt 04-25-2005 10:43 PM

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..

terrylmt 04-25-2005 10:44 PM

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..

win32sux 04-25-2005 10:46 PM

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??

terrylmt 04-25-2005 10:50 PM

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!

win32sux 04-25-2005 10:55 PM

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??


terrylmt 04-25-2005 11:13 PM

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)

win32sux 04-25-2005 11:57 PM

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...


terrylmt 04-26-2005 12:04 AM

I can't ping out.. seems like the network is an issue then?


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