Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Sep 14, 2008 4:08 pm 
Offline
Senior Newbie

Joined: Sun Jul 27, 2008 2:36 pm
Posts: 5
I have two linodes, www1 (web server) and db1 (db server). www1 runs Apache/PHP, db1 runs mysqld and searchd (Sphinx search daemon). www1 talks to mysqld and searchd on db1 over the backend network. Most of the time this works fine, however after there has been no network traffic for ~2 min, the first attempt to connect (that can be either mysqld or searchd) will consistently get a errno=111 "Connection Refused" error. Subsequent connects then work fine again. Since the same thing happens consistently for either mysqld and searchd, I assume it's not their fault. Also, if I tunnel into db1 through SSH I can access both mysqld and searchd and never get this problem. And if I use telnet to connect from www1 to mysqld/searchd on db1, I observe the same thing - get a "connection refused" error the first time (sometimes the second time, too actually), afterwards it connects fine. So my wild guess is that the problem is with db1's firewall settings. Here's the rules I use on db1:

Incoming packets (INPUT)

Accept If input interface is lo
Reject If destination is 127.0.0.0/255.0.0.0 and input interface is not lo
Accept If state of connection is RELATED,ESTABLISHED
Accept If protocol is TCP and source is 192.168.133.238 and input interface is eth1 and destination port is 3306 and state of connection is NEW
Accept If protocol is TCP and source is 192.168.133.238 and input interface is eth1 and destination port is 3312 and state of connection is NEW
Accept If protocol is TCP and input interface is eth0 and destination port is 52181 and state of connection is NEW
Accept If protocol is TCP and input interface is eth0 and destination port is 22777 and state of connection is NEW
Accept If protocol is ICMP and ICMP type is 8
Reject Always

Forwarded packets (FORWARD)

Reject Always

Outgoing packets (OUTPUT)

Accept Always

Maybe it's not the firewall, but something else though. Any clues would be appreciated.

Thanks so much!
Markus


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group