wood burning stoves 2.0*
The moose likes Sockets and Internet Protocols and the fly likes Connection refused Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Connection refused" Watch "Connection refused" New topic
Author

Connection refused

yogesh naravane
Greenhorn

Joined: Dec 29, 2000
Posts: 9
usage:java GetMessageExample host username password
e.g. java GetMessageExample www.yahoo.com <username> <password>
error:Connection refused
In the program i am using following lines:
// Get the store
Store store = session.getStore("imap");//("pop3");
store.connect(host, username, password);
is the error in above code .Also if i use pop3 gives error as
NoSuchProvider for pop3.
what should i do?
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
Hum, only a guess because I'm not familiar with yahoo's server. However my provider www.kiski.net is the address for the http site. The address for the mail server is kiski.net. change your call to
java GetMessageExample yahoo.com < username> < password>
Let me know the results.


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
yogesh naravane
Greenhorn

Joined: Dec 29, 2000
Posts: 9
C:\yogesh>java GetMessageByPop3 128.11.68.63 <username> <password>
Exception in thread "main" java.net.NoRouteToHostException: Operation timed out:
no further information
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:312)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
at java.net.Socket.<init>(Socket.java:273)
at java.net.Socket.<init>(Socket.java:100)
at injektilo.net.Pop3Connection.open(Pop3Connection.java:182)
at GetMessageByPop3.main(GetMessageByPop3.java:18)
what might be the error.
i am using injektilo pop3 server
the code contains pop3.open(mail.server.com);
is error in above line?
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340


the code contains pop3.open(mail.server.com);
is error in above line?

Without seeing the rest of the code, That would be my assumption. I had expected something along the lines of
pop3.open(args[0]);
Please post more of your code, If it's too big for the forum, zip it up and email it to me and I'll take a look see
yogesh naravane
Greenhorn

Joined: Dec 29, 2000
Posts: 9
NoRoutetoHostException error encountered
i am using injektilo pop3 server
yogesh naravane
Greenhorn

Joined: Dec 29, 2000
Posts: 9
NoRoutetoHostException error encountered
i am using injektilo pop3 server
pop3.connect(pop.mail.yahoo.com);
gives following error www.siski.com is not working for my application

------------------
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
Originally posted by yogesh naravane:
NoRoutetoHostException error encountered
i am using injektilo pop3 server
pop3.connect(pop.mail.yahoo.com);
gives following error www.siski.com is not working for my application


I don't know if Yahoo is a POP3 host! Thats what you are trying to connect to. In order to run this they way it looks like you are trying, the host that you connect to must be a POP3 Host. If
you have a injektilo pop3 server that's what you need to connect to not Yahoo. Yahoo as far as I know is strictly HTTP and not POP3.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection refused