LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-19-2012, 03:26 PM   #1
kwatts59
Member
 
Registered: Aug 2012
Posts: 34

Rep: Reputation: Disabled
The connection has timed out The server at <ip address> is taking too long to respond


Dear Linux Users,
I installed a software program called Galaxy on my server.
I started up the Galaxy server process.
When I open FIrefox on the server and type in the following into the address bar the program starts successfully.
http://<ip address>:8080
However, when I open up Firefox on my PC and type in the exact same address, i get the following error
"The connection has timed out The server at <ip address> is taking too long to respond"
I contacted the Galaxy people and they said there is nothing wrong with their software, it is a server issue.
From my PC, I can ping the server and I can access my webpage.
I'm sure it is something simple.
Any advice would be greatly appreciated.
 
Old 08-19-2012, 04:21 PM   #2
abrinister
Member
 
Registered: Dec 2010
Location: Boston, MA, USA
Distribution: Arch Linux
Posts: 460

Rep: Reputation: 38
Quote:
my webpage.
Which webpage? Is this running on the same server?

Alex Brinister
 
Old 08-19-2012, 04:52 PM   #3
kwatts59
Member
 
Registered: Aug 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
Yes, my webpage is on the same server as the Galaxy software and I can access the webpage from any PC.
Here is the webpage: http://shenlab.sols.unlv.edu/shenlab/

I can only run the Galaxy software when I am in the server room and logged directly onto the server.
 
Old 08-19-2012, 05:43 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,398

Rep: Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780
Sounds like a firewall issue.
Can you try
Code:
# show us your distro+ver
cat /etc/*release*

#show firewall
iptables -nvL
 
Old 08-20-2012, 10:00 AM   #5
abrinister
Member
 
Registered: Dec 2010
Location: Boston, MA, USA
Distribution: Arch Linux
Posts: 460

Rep: Reputation: 38
I can't believe I didn't ask this earlier, but what distro are you running? Posting the output of "/etc/*release*", as chrism suggested, would help in that.

Are you running even running a firewall?

Alex Brinister
 
Old 08-20-2012, 01:16 PM   #6
kwatts59
Member
 
Registered: Aug 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
I did a "cat /etc/*release*" and below is the output

Fedora release 13 (Goddard)
Fedora release 13 (Goddard)
Fedora release 13 (Goddard)
cpe:/o:/fedoraproject:fedora:13

I did a "ls *release*" and there were 4 files
fedora-release
redhat-release
system-release
system-release-cpe


I type "sudo iptables -nvL" and below is the output (I apologize for typos, I manually typed the output)

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
447K 129M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
44 2878 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
309 18540 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:21
24 1292 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
1107 61900 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:80
380K 50M REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

I hope this helps
 
Old 08-20-2012, 01:48 PM   #7
abrinister
Member
 
Registered: Dec 2010
Location: Boston, MA, USA
Distribution: Arch Linux
Posts: 460

Rep: Reputation: 38
Have you looked here? Your setup seems kinda similar...

Alex Brinister
 
Old 08-20-2012, 03:10 PM   #8
kwatts59
Member
 
Registered: Aug 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
I issued the following command to add an entry into the IP tables.
sudo /sbin/iptables -A INPUT -p tcp --dport 8080 -j ACCEPT


Now when I issue the command "sudo iptables -nvL" the following line appears:

0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080

I restarted the Galaxy process and I am still getting the same errors when I try accessing Galaxy from my PC.
 
Old 08-20-2012, 06:33 PM   #9
abrinister
Member
 
Registered: Dec 2010
Location: Boston, MA, USA
Distribution: Arch Linux
Posts: 460

Rep: Reputation: 38
What happens when you disable iptables completely? Does Galaxy work?

Alex Brinister
 
Old 08-20-2012, 07:47 PM   #10
kwatts59
Member
 
Registered: Aug 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
WHOOOOT!!!!
Now we are getting somewhere.
I entered the following commands to turn off the firewall
$ sudo /etc/init.d/iptables save
$ sudo /etc/init.d/iptables stop

Then voila!!! I can access the server from my PC.

Then when I entered the following command to turn the firewall back on
$ sudo /etc/init.d/iptables start

the shirt hit the fan and I got the "Connection has timed out" error.

So how do I set the firewall to allow access to the server?
 
Old 08-20-2012, 08:01 PM   #11
abrinister
Member
 
Registered: Dec 2010
Location: Boston, MA, USA
Distribution: Arch Linux
Posts: 460

Rep: Reputation: 38
Code:
iptables -I INPUT -i <interface> -p <tcp or udp> --dport <your port> -j ACCEPT
I found that here.

Alex Brinister
 
Old 08-20-2012, 08:02 PM   #12
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,398

Rep: Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780
The firewall rules are stored in /etc/sysconfig/iptables.
You should back that up, then edit it.
The problem I think you have is that you used -A = append to the input chain, but this rule
Code:
 380K 50M REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
would precede it and its REJECTing all(!) protocols.

Actually, I prefer to use the fail secure method of setting the INPUT chain Policy of DROP instead; that way any pkt not specifically matched by a rule is DROPped.

See these links http://www.linuxhomenetworking.com/w...Using_iptables
http://www.cyberciti.biz/tips/linux-...-examples.html
http://www.linuxtopia.org/online_boo...-iptables.html

PS: F13 is well out of date; currently F17 is the go

Last edited by chrism01; 08-20-2012 at 08:10 PM.
 
Old 08-20-2012, 08:14 PM   #13
abrinister
Member
 
Registered: Dec 2010
Location: Boston, MA, USA
Distribution: Arch Linux
Posts: 460

Rep: Reputation: 38
That's a good call, chrism, especially since the command I gave him put an already existing rule into his iptables policy .

Alex Brinister
 
Old 08-20-2012, 08:22 PM   #14
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,398

Rep: Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780
Yeah, trying to Append/Insert rules is do-able, but frankly a PITA.
Much easier/clearer to edit the real file; just need to be careful.
 
  


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
qmail taking too long to respond failure delivery jnyunt Linux - Server 2 06-05-2010 06:03 PM
sendmail: getting stat=Deferred: Connection timed out with server - any help? samengr Linux - Server 4 11-11-2009 01:00 PM
Connection to server X.X.X.X timed out in thunderbird megerdin Linux - General 6 06-11-2008 04:57 AM
sendmail - Connection timed out [dsn=4.0.0 stat=Deferred: Connection timed out] ananthak Linux - Software 0 04-24-2007 07:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:47 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
Open Source Consulting | Domain Registration