[lug] Socket Error

Scott A. Herod herod at interact-tv.com
Thu Aug 23 13:50:47 MDT 2001


Hi David,

  Let me see if I understand, you can connect to a remote machine
with a socket but not a local file?  Is it possible that your function
call is still trying to make a connection to a socket.  Hmmm, but your
loopback interface should be open according to the ipchains stuff you
sent, so that's not it.  ( Check by telneting to the socket on your
local machine. )

  If it's not that funny language with all the parentheses that you
like, :-) can you send a bit of the code?

Scott

David wrote:
> 
> I think that I have a Linux (firewall?, or ?) configuration error; but
> it needs a little background explanation.
> 
> I am successfully accessing a remote machine over the net using a
> socket, which is established by a function call in a programme; the
> calling source code sees the socket access as a byte stream.  I have a
> lot of development to do and decided to create a stream by accessing a
> local file instead of the net; there is a standard call in the
> programming language to do this kind of access.  The changes in the
> function call are trivially different for the two cases, which makes
> me think that I have a Linux system problem.  Also, the error messages
> strongly indicate something outside the programme.  I am hoping that
> someone will recognise symptoms of a Linux problem.
> 
> If the file does not exist I get this; pretty good: "No such file or
> directory".
> Error: creating a socket and connecting to remote socket nil resulted
>        in error (code 2): No such file or directory.
> 
> If the file exists I get this, even if the file permissions are wide
> open 777 all the way from /
> Error: "Connection refused" (errno 111) occured while
>        creating a socket and connecting to remote socket.
> 
> Since I am using a socket I wonder if my firewall, or ?, is getting in
> the way.
> 
> # Firewall configuration written by lokkit
> # Manual customization of this file is not recommended.
> # Note: ifup-post will punch the current nameservers through the
> #       firewall; such entries will *not* be listed here.
> :input ACCEPT
> :forward ACCEPT
> :output ACCEPT
> -A input -s 0/0 -d 0/0 -i lo -j ACCEPT
> -A input -s 216.17.128.1 53 -d 0/0 -p udp -j ACCEPT
> -A input -s 216.17.128.2 53 -d 0/0 -p udp -j ACCEPT
> -A input -s 0/0 -d 0/0 -p tcp -y -j REJECT
> -A input -s 0/0 -d 0/0 -p udp -j REJECT
> 
> dajo
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug



More information about the LUG mailing list