still problem with networkprging -> localhost

still problem with networkprging -> localhost

Post by Reinic » Tue, 23 Oct 2001 17:27:54



hi,

i'm having a strange problem in socket-programming. I'm writing a
small program using UDP, connecting to an echo server. everything
works fine as long as i do not try either 'localhost' or '127.0.0.1'
as target. if i use my own ip, a connection is established and i am
getting correct replies. in case of localhost and 127.0.0.1 as targets
i get the error 'connection refused' ... ??

is there anything special about network programming for this case? i
can connect to eavery echo server i can find in the net, even to the
server running on my own machine, as long as i use the networkwide ip
address.....

i hope somebody can help me..

reinicke

 
 
 

still problem with networkprging -> localhost

Post by Reinic » Tue, 23 Oct 2001 22:53:43



> hi,

> i'm having a strange problem in socket-programming. I'm writing a
> small program using UDP, connecting to an echo server. everything
> works fine as long as i do not try either 'localhost' or '127.0.0.1'
> as target. if i use my own ip, a connection is established and i am
> getting correct replies. in case of localhost and 127.0.0.1 as targets
> i get the error 'connection refused' ... ??

> is there anything special about network programming for this case? i
> can connect to eavery echo server i can find in the net, even to the
> server running on my own machine, as long as i use the networkwide ip
> address.....

> i hope somebody can help me..

> reinicke

btw, "telnet localhost echo" works perfectly..... -> ???

reinicke

 
 
 

still problem with networkprging -> localhost

Post by David Schwart » Wed, 24 Oct 2001 02:38:52



> i'm having a strange problem in socket-programming. I'm writing a
> small program using UDP, connecting to an echo server. everything
> works fine as long as i do not try either 'localhost' or '127.0.0.1'
> as target. if i use my own ip, a connection is established and i am
> getting correct replies. in case of localhost and 127.0.0.1 as targets
> i get the error 'connection refused' ... ??

        Do a 'netstat -tan' and see if anything is listening to localhost.

        DS

 
 
 

still problem with networkprging -> localhost

Post by Reinic » Wed, 24 Oct 2001 17:51:06




> > i'm having a strange problem in socket-programming. I'm writing a
> > small program using UDP, connecting to an echo server. everything
> > works fine as long as i do not try either 'localhost' or '127.0.0.1'
> > as target. if i use my own ip, a connection is established and i am
> > getting correct replies. in case of localhost and 127.0.0.1 as targets
> > i get the error 'connection refused' ... ??

>    Do a 'netstat -tan' and see if anything is listening to localhost.

>    DS

yup! port 7 (echo) is listening.
 
 
 

1. fixing localhost -> DNS Server -> NAMED -> NDC -> NOTFOUND

I'm trying to make localhost work in netscape (instead of routing to
http://www.localhost.com as it does now) on Redhat 6.2 system on a local
lan connected to external internet via netopia analog router).

I set up a hosts file to define localhost as an alias for
localhost.cox.dom (internal fake names). While that once worked, I
touched something somewhere and it no longer does.

By following the cryptic syggestions at www.localhost.com, I decided I
needed to set up a DNS server for the local lan (8 machines) via
http://www.linuxdoc.org/HOWTO/DNS-HOWTO-3.html under "A caching only
name server">

All went well til the section "Starting named", which says type
"/usr/sbin/ndc start". There's nothing there by the name ndc, nor under

thing called under Redhat 6.2?

Or is setting up DNS the wrong thing altogether? I'm basically trying to
get a combined Windows 2000 Server, Linux, and Macintosh combined
network to cooperate.

2. Is it "grep'

3. localhost -> localhost?

4. O_APPEND reinvented

5. ping localhost -> OK, ping myhost -> dies

6. Computer expecting 8 bits, ISP sending 7

7. smail+term >> transport smtp: IP address for localhost not found

8. very strange problem - localhost -> myplaceontheweb.com??

9. sendmail problem (?) : telnet localhost 25 --> connection refused

10. FTP problem: linux>>win/SGI slow win/SGI>>linux fast

11. Samba problem: WinXP <-> ADSL <-> Internet <-> Cable <-> Linux