Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

problem establishing a simple socket on win98

3 views
Skip to first unread message

vu...@yahoo.com

unread,
Mar 16, 2000, 3:00:00 AM3/16/00
to
Hi,

I'm very confused why this does not work for me. I have a very simple
test java program that tries to establish a connection to a known host.
The program works fine on my unix account at school that is running
solaris but the same exact program does not work at home on my win98
computer. I tried it on both of my win98 computers and I get the same
error each time. Note: I have a dialup connection and I am connected
when doing the test. Also everything else seems to be fine, ie: telnet,
ftp, web-browsing all works on my machine. And also I am able to ping
the host fine on win98 (at the command line type: ping
smtp.mail.yahoo.com). Does anyone know why my very simple socket
program does not work on win98? Just curious, can anyone else get the
programto run on win98? Below I will give the listing of the program
and also the trace when I run the program on win98 and from my unix
account.

thanks for any input.

/****listing of simple socket program*****/
import java.net.*;
public class test {
public static void main(String[] argv) {
new test(argv);
}

public test(String[] argv) {
try {
System.out.println("\nestablishing socket....");
Socket aTestSocket = new Socket("smtp.mail.yahoo.com", 25);
System.out.println("\nconnection established.");
} catch (Exception e) {
e.printStackTrace();
}
}
}

/****end listing of simple socket program**/

/****trace when running on win98**/
BASH.EXE-2.02$ java test

establishing socket....
java.net.SocketException: no further information (code=10051)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Compiled Code)
at java.net.PlainSocketImpl.connectToAddress
(PlainSocketImpl.java:125)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
at java.net.Socket.<init>(Socket.java:269)
at java.net.Socket.<init>(Socket.java:98)
at test.<init>(test.java:15)
at test.main(test.java:7)
BASH.EXE-2.02$

/****end trace when running on win98**/

/****trace when running on my unix account**/
> java test
establishing socket....
connection established.
>
/****end trace when running on my unix account**/


Sent via Deja.com http://www.deja.com/
Before you buy.

Jon Skeet

unread,
Mar 16, 2000, 3:00:00 AM3/16/00
to
vu...@yahoo.com wrote:

> I'm very confused why this does not work for me. I have a very simple
> test java program that tries to establish a connection to a known host.
> The program works fine on my unix account at school that is running
> solaris but the same exact program does not work at home on my win98
> computer. I tried it on both of my win98 computers and I get the same
> error each time. Note: I have a dialup connection and I am connected
> when doing the test. Also everything else seems to be fine, ie: telnet,
> ftp, web-browsing all works on my machine. And also I am able to ping
> the host fine on win98 (at the command line type: ping
> smtp.mail.yahoo.com). Does anyone know why my very simple socket
> program does not work on win98? Just curious, can anyone else get the
> programto run on win98? Below I will give the listing of the program
> and also the trace when I run the program on win98 and from my unix
> account.

Perhaps web browsing etc is going through a proxy? (Ping as well? Hmm...)
Do you have your "normal" mail clients set up to use smtp.yahoo.com?

--
Jon Skeet - sk...@pobox.com
http://www.pobox.com/~skeet/

vu...@yahoo.com

unread,
Mar 16, 2000, 3:00:00 AM3/16/00
to
Thanks for replying again Jon,

Cause of the problem known!
Hey thanks for your suggestion Jon. Your idea about the proxy made me
think about trying the sample program using an alternative internet
service provider I have. And guess what? The program works the way it
is supposed to. So I guess that means the other isp that I was using is
probably using a proxy server. phew!!!! i'm so glad i determined the
root of the problem now. Now I can get back to what I was doing with
javamail...

But just curious, is there anyway for me to get the program to work
using the bad isp I have since it is my main provider?

In article <MPG.133aee0ddfd39fb4989fca@news>,

Jon Skeet

unread,
Mar 17, 2000, 3:00:00 AM3/17/00
to
vu...@yahoo.com wrote:
> Thanks for replying again Jon,
>
> Cause of the problem known!
> Hey thanks for your suggestion Jon. Your idea about the proxy made me
> think about trying the sample program using an alternative internet
> service provider I have. And guess what? The program works the way it
> is supposed to. So I guess that means the other isp that I was using is
> probably using a proxy server. phew!!!! i'm so glad i determined the
> root of the problem now. Now I can get back to what I was doing with
> javamail...

Goodo :)

> But just curious, is there anyway for me to get the program to work
> using the bad isp I have since it is my main provider?

Well, does Yahoo let you use normal mail clients at all? If it *only*
provides web mail, it could be that smtp.yahoo.com will only accept
connections from its web servers. Bit of a shame, but that's life. As a
bizarre idea, you could perhaps write your own Transport object which
sent mail by emulating a user's actions on the Yahoo web site. Not sure.

Karl Schmidt

unread,
Mar 17, 2000, 3:00:00 AM3/17/00
to
>>>>>>>>>>>>>>>>>> Ursprüngliche Nachricht <<<<<<<<<<<<<<<<<<

Am 17.03.00, 08.07.32, schrieb Jon Skeet <sk...@pobox.com> zum Thema Re:
problem establishing a simple socket on win98:


> Well, does Yahoo let you use normal mail clients at all? If it *only*
> provides web mail, it could be that smtp.yahoo.com will only accept
> connections from its web servers. Bit of a shame, but that's life. As
a
> bizarre idea, you could perhaps write your own Transport object which
> sent mail by emulating a user's actions on the Yahoo web site. Not
sure.

I have a yahoo account. There is now problem using any smtp / pop
client with this account.

--
//------------------------------------------------------
!! Karl Schmidt, E-Mail: Karl_Schmidt AT t-online DOT de
!! Homepage: http://home.t-online.de/home/Karl_Schmidt
!! Message from Fr 17.Mrz 00, 17:22
!! Created with StarOffice (OS/2)


Ken Kalish

unread,
Mar 18, 2000, 3:00:00 AM3/18/00
to
On Fri, 17 Mar 2000 08:07:32 -0000, Jon Skeet <sk...@pobox.com> wrote:

>vu...@yahoo.com wrote:

>Goodo :)
>
>> But just curious, is there anyway for me to get the program to work
>> using the bad isp I have since it is my main provider?

you could use your ISP's own MX.

Btw, I don't think it's a 'bad' or inferior ISP (unless it's Sprint :); they
just don't have privileges on yahoo's MX.

Also btw, as an interesting project, you could write a Java smtp relay, run it
off your secondary dialup, and sedn through it from your main ISP to
smtp.yahoo.com :)

>
>Well, does Yahoo let you use normal mail clients at all? If it *only*
>provides web mail, it could be that smtp.yahoo.com will only accept
>connections from its web servers. Bit of a shame, but that's life.

I can't connect to that MX, so the odd thing is why he can connect from the
school (or the other ISP) at all... unless Yahoo is contracting out their MX
services. Which surprisingly might be the case, since the canonical name for
that server is smarthost.yahoo.com Or maybe it's a smarthost only for yahoo's
webservers <shrug>

Or maybe, since it apparently isn't used for inbound smtp, and only takes
outbound from selected IPs, it's an internal relay with some sort of loophole...
and on and on :)

> As a
>bizarre idea, you could perhaps write your own Transport object which
>sent mail by emulating a user's actions on the Yahoo web site. Not sure.

it's a good idea. In fact, I believe that there are clients ou tthere that will
poll all of your various webmail accounts and alert you if you have mail, and
maybe even download it for you.
===

Regards,

Ken Kalish

There is no java cartel.


Ken Kalish

unread,
Mar 18, 2000, 3:00:00 AM3/18/00
to
On Sat, 18 Mar 2000 03:15:54 GMT, mcr...@iname.com (Ken Kalish) wrote:

or, more likely, Lloyd Morgan would just say that Sprint is probably providing
MX smarthosting to 2 out of the 3 (and also leasing dialup to the one ISP)

0 new messages