Why can't I connect to a local service ?

2008-04-14 Thread Oded Arbel
I have a really weird problem - maybe it was always like that or it only
happened since I upgraded, I'm not sure - 

I have a CentOS 5.1 box and for some weird reason I can't connect using
TCP to a server running on the same machine, either through localhost or
through the eth0 IP address. Connections from outside work great and the
httpd is happily serving users across the network.

When I try to connect, even something simple such as
telnet localhost 80
I get a timeout:
# strace -f telnet localhost 80
 ...
connect(3, {sa_family=AF_INET, sin_port=htons(80),
sin_addr=inet_addr(127.0.0.1)}, 16) = -1 ETIMEDOUT (Connection timed
out)
write(2, telnet: connect to address 127.0..., 59) = 59
close(3)= 0
write(2, telnet: Unable to connect to rem..., 63

/etc/hosts.deny was the immediate suspect, but its empty. IPTables was
on, but is set to always allow lo (and port 80 among others) and
turning it off didn't help. So what can I check next ?

Thanks in advance

-- 
Oded



Re: Why can't I connect to a local service ?

2008-04-14 Thread Yedidyah Bar-David
On Tue, Apr 15, 2008 at 07:30:18AM +0300, Oded Arbel wrote:
 I have a really weird problem - maybe it was always like that or it only
 happened since I upgraded, I'm not sure - 

Works for me (on CentOS 5.1).

 
 I have a CentOS 5.1 box and for some weird reason I can't connect using
 TCP to a server running on the same machine, either through localhost or
 through the eth0 IP address. Connections from outside work great and the
 httpd is happily serving users across the network.
 
 When I try to connect, even something simple such as
 telnet localhost 80
 I get a timeout:
 # strace -f telnet localhost 80
  ...
 connect(3, {sa_family=AF_INET, sin_port=htons(80),
 sin_addr=inet_addr(127.0.0.1)}, 16) = -1 ETIMEDOUT (Connection timed
 out)
 write(2, telnet: connect to address 127.0..., 59) = 59
 close(3)= 0
 write(2, telnet: Unable to connect to rem..., 63
 
 /etc/hosts.deny was the immediate suspect, but its empty. IPTables was
 on, but is set to always allow lo (and port 80 among others) and
 turning it off didn't help. So what can I check next ?

How about
tcpdump -n -i lo
?

Also strace httpd?
-- 
Didi


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Why can't I connect to a local service ?

2008-04-14 Thread Lior Kaplan


Oded Arbel wrote:
  I have a really weird problem - maybe it was always like that or it
 only happened since I upgraded, I'm not sure -
 
 I have a CentOS 5.1 box and for some weird reason I can't connect using
 TCP to a server running on the same machine, either through localhost or
 through the eth0 IP address. Connections from outside work great and the
 httpd is happily serving users across the network.

Maybe it's only listening on the external address ?

Try netstat -an --tcp  |grep LISTEN

-- 
Lior Kaplan
[EMAIL PROTECTED]

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Why can't I connect to a local service ?

2008-04-14 Thread Michael Tewner
Centos comes with iptables pre-configured to block almost everything.
There is a tool to configure it - system-config-firewall
or just /etc/init.d/iptables stop :-)



On Tue, Apr 15, 2008 at 12:49 AM, Yedidyah Bar-David
[EMAIL PROTECTED] wrote:
 On Tue, Apr 15, 2008 at 07:30:18AM +0300, Oded Arbel wrote:
   I have a really weird problem - maybe it was always like that or it only
   happened since I upgraded, I'm not sure -

  Works for me (on CentOS 5.1).


  
   I have a CentOS 5.1 box and for some weird reason I can't connect using
   TCP to a server running on the same machine, either through localhost or
   through the eth0 IP address. Connections from outside work great and the
   httpd is happily serving users across the network.
  
   When I try to connect, even something simple such as
   telnet localhost 80
   I get a timeout:
   # strace -f telnet localhost 80
...
   connect(3, {sa_family=AF_INET, sin_port=htons(80),
   sin_addr=inet_addr(127.0.0.1)}, 16) = -1 ETIMEDOUT (Connection timed
   out)
   write(2, telnet: connect to address 127.0..., 59) = 59
   close(3)= 0
   write(2, telnet: Unable to connect to rem..., 63
  
   /etc/hosts.deny was the immediate suspect, but its empty. IPTables was
   on, but is set to always allow lo (and port 80 among others) and
   turning it off didn't help. So what can I check next ?

  How about
  tcpdump -n -i lo
  ?

  Also strace httpd?
  --
  Didi


  =
  To unsubscribe, send mail to [EMAIL PROTECTED] with
  the word unsubscribe in the message body, e.g., run the command
  echo unsubscribe | mail [EMAIL PROTECTED]



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Why can't I connect to a local service ?

2008-04-14 Thread Michael Tewner
..or perhaps, I should read your entire email before replying...

netstat -an | grep LISTENING shows that the service is listening on 0.0.0.0:80 ?


On Tue, Apr 15, 2008 at 1:12 AM, Michael Tewner [EMAIL PROTECTED] wrote:
 Centos comes with iptables pre-configured to block almost everything.
  There is a tool to configure it - system-config-firewall
  or just /etc/init.d/iptables stop :-)





  On Tue, Apr 15, 2008 at 12:49 AM, Yedidyah Bar-David
  [EMAIL PROTECTED] wrote:
   On Tue, Apr 15, 2008 at 07:30:18AM +0300, Oded Arbel wrote:
 I have a really weird problem - maybe it was always like that or it only
 happened since I upgraded, I'm not sure -
  
Works for me (on CentOS 5.1).
  
  

 I have a CentOS 5.1 box and for some weird reason I can't connect using
 TCP to a server running on the same machine, either through localhost or
 through the eth0 IP address. Connections from outside work great and the
 httpd is happily serving users across the network.

 When I try to connect, even something simple such as
 telnet localhost 80
 I get a timeout:
 # strace -f telnet localhost 80
  ...
 connect(3, {sa_family=AF_INET, sin_port=htons(80),
 sin_addr=inet_addr(127.0.0.1)}, 16) = -1 ETIMEDOUT (Connection timed
 out)
 write(2, telnet: connect to address 127.0..., 59) = 59
 close(3)= 0
 write(2, telnet: Unable to connect to rem..., 63

 /etc/hosts.deny was the immediate suspect, but its empty. IPTables was
 on, but is set to always allow lo (and port 80 among others) and
 turning it off didn't help. So what can I check next ?
  
How about
tcpdump -n -i lo
?
  
Also strace httpd?
--
Didi
  
  
=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]
  
  


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Downloading flash video from reshet.tv

2008-04-14 Thread Oded Arbel

On Thu, 2008-04-10 at 16:08 +0300, Gilboa Davara wrote:

 On Wed, 2008-04-09 at 12:40 +0300, Ira Abramov wrote:
  can't remember what streaming technology it was, but way back I managed
  to capture and save to the disk the UDP broadcasts of Galatz using
  mplayer.
  
  Find yourself a pre-compiled mplayer with all the borowed dlls from
  windows and you may be in luck.
  
 
 xine/gstreamer-plugin-bad and xine/gstreamer-plugin-bad both play (and
 dump) Galey-Zahal, Galgalataz and Reshet Bet streaming radio just
 fine.

The streaming MS server used by the a lot of israel radio and TV
internet broadcasts is using a proprietary protocol called MMS, and can
be captured using mimms (short for MiMMS isn't an MMS Message Sender)
which dumps the stream to a file as fast as it can get it without
needing to actually play it (unlike mplayer -dump). 


 In my experience, the same configuration (xine/mplayer + gstreamer)
 cannot be used to play Reshet streaming videos.

Reshet's video machine is using a standard flash video service (which
was quite surprise to me, as castup normally don't support technologies
that can work outside the MS stack). I can't tell you how to find the
FLVs url for them without playing it with a browser and Adobe Flash, but
once you do that you can use firebug's network monitor to see the FLV
urls, or use wireshark to scan the network traffic for them - for
example the following tshark [1] based script will dump the URLs for the
castup FLVs you are watching to the console, ripe for easy picking by
wget or something :-)

sudo tshark -V -R http.request | perl -nle 'm|GET (\S+.flv)| and $uri=
$1; m|Host:\s+(\S+dl\.castup[^\\]+)| and print http://; . $1 . $uri;'

[1] tshark or tethereal is the command line version of the GUI
application. It does about the same and lets you use it in scripts. very
handy.

--
Oded


Re: Why can't I connect to a local service ?

2008-04-14 Thread Oded Arbel
[top posting for a bit, sorry]

httpd is listening on all interfaces (default configuration: Listen *),
and is serving outside requests just fine. Other services have the same
problem - I just used httpd as an example - Specifically I want a local
LDAP server to work, and I can't connect to it, and MySQL only works
using unix sockets - TCP fails the same way.


On Tue, 2008-04-15 at 01:14 -0400, Michael Tewner wrote:
 ...or perhaps, I should read your entire email before replying...
 
 netstat -an | grep LISTENING shows that the service is listening on 
 0.0.0.0:80 ?
 


On Tue, 2008-04-15 at 08:12 +0300, Lior Kaplan wrote:
 Maybe it's only listening on the external address ?
 
 Try netstat -an --tcp |grep LISTEN
 


On Tue, Apr 15, 2008 at 07:30:18AM +0300, Oded Arbel wrote:
 
  I have a CentOS 5.1 box and for some weird reason I can't connect 
  using
  TCP to a server running on the same machine, either through localhost 
  or
  through the eth0 IP address. Connections from outside work great and 
  the
  httpd is happily serving users across the network.
 
  When I try to connect, even something simple such as
  telnet localhost 80
  I get a timeout:
  # strace -f telnet localhost 80
   ...
  connect(3, {sa_family=AF_INET, sin_port=htons(80),
  sin_addr=inet_addr(127.0.0.1)}, 16) = -1 ETIMEDOUT (Connection timed
  out)
  write(2, telnet: connect to address 127.0..., 59) = 59
  close(3)= 0
  write(2, telnet: Unable to connect to rem..., 63
 
  /etc/hosts.deny was the immediate suspect, but its empty. IPTables was
  on, but is set to always allow lo (and port 80 among others) and
  turning it off didn't help. So what can I check next ?



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]