[2616] in java-interest
Re: Sockets dump
daemon@ATHENA.MIT.EDU (Roger Day)
Fri Oct 6 07:10:16 1995
Date: Fri, 6 Oct 1995 09:36:06 +0100
From: roger@ssynth.co.uk (Roger Day)
To: Arthur.Vanhoff@Eng.Sun.COM
Cc: JAVA-INTEREST@java.sun.com
Hi,
I believe the sockets dumps is due to the inability of Java to deal with nis+ or dns....on Scott Fraize's suggestion, I stuck the following line in nsswitch.conf:
hosts: files nisplus dns [NOTFOUND=return] files
This stopped the dump - for local hosts - any other addresses core-dumped.
However, I now get the following problem...
we are here in meme with host: caligula and port: 5046
are we here
an IO exception occurred: Connection refused
java.net.SocketException Connection refused
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java)
at java.net.Socket.<init>(Socket.java)
at java.net.Socket.<init>(Socket.java)
at TestClient.connect(TestClient.java:45)
at TestClient.main(TestClient.java:65)
which confuses me slightly, as the normal socket routines "like" port 5046.
Why is it being refused? And how can I get around it?
As ever, Solaris 2.4 on a Sparc 20 (using nis+).
The fragment of code is as follows
try {
socket = new Socket(host, portnumber);
in = new DataInputStream(new
BufferedInputStream(socket.getInputStream()));
out = new DataOutputStream(new
BufferedOutputStream(socket.getOutputStream()));
} catch (UnknownHostException e){
System.out.println("an Unknown host exception: " + e.getMessage());
e.printStackTrace();
} catch (IOException e) {
System.out.println("an IO exception occurred: " + e.getMessage());
e.printStackTrace();
}
Cheers,
Roger
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com