BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

RMI: proxy causes connection timed out

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder CORBA/RMI
View previous topic :: View next topic  
Author Message
Christiaan
Guest





PostPosted: Mon Aug 09, 2004 3:56 pm    Post subject: RMI: proxy causes connection timed out Reply with quote



Hi all,
I 've been struggling with this problem for quite some days now so I hope
someone can help me! I 've created a simple rmi application and I am having
trouble deploying this with a client who is behind a proxy (which is causing
the problem, other clients dont have the problem). The client gets the
following error:
java.net.ConnectException: Connection timed out: connect
java.rmi.ConnectException: Connection refused to host: x.y.z.k; nested
exception is:
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
at client.ComputePi.main(ComputePi.java:14)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown
Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown
Source)
.... 7 more

I have set logging on to get more insight into this error:
.....
FINE: main: direct socket connection failed:
.....
FINE: main: trying with factory:
sun.rmi.transport.proxy.RMIHttpToPortSocketFact
ory@1415de6
9-aug-2004 13:39:31 sun.rmi.transport.proxy.RMIMasterSocketFactory
createSocket
FINE: main: trying with factory:
sun.rmi.transport.proxy.RMIHttpToPortSocketFact
ory@1415de6
9-aug-2004 13:39:31 sun.rmi.transport.proxy.HttpSendSocket <init>
FINER: main: host = x.y.z.k, port = 1099, url = http://x.y.z.k:109
9/
.....
FINE: main: failed to get input stream, exception:
java.io.IOException: Server returned HTTP response code: 504 for URL:
http://x.y.z.k:1099/
at sun.net.[url]www.protocol.http.HttpURLConnection.getInputStream(Unknown[/url] So
urce)

So the direct connections fails because of the proxy, after that,
http-to-port connection fails as well. (504 = Gateway timeout). If I
understand it correclty, the implemenation uses a HttpURLConnection. If I
create my own HttpURLConnection with http://x.y.z.k:1099/, the
httpurlconnection connects and does not give an exception??:
System.setProperty("proxySet", "true");
System.setProperty("http.proxyHost", "some.proxy.com");
System.setProperty("http.proxyPort", "80");
//not sure if this is necessary
System.setProperty("firewallSet", "true");
System.setProperty("firewallHost", "some.proxy.com");
System.setProperty("firewallPort", "80");
URL url = new URL("http://x.y.z.k:" + rmiport);
System.out.println("Opening HttpURLConnection at " + rmiport);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.connect(); //does not throw an exception

Can anyone help me with this problem?

kind regards,
Christiaan


Back to top
Christiaan
Guest





PostPosted: Fri Aug 13, 2004 2:27 pm    Post subject: Re: proxy causes connection timed out Reply with quote



do people use this forum anyway?

"Christiaan" <none (AT) nospam (DOT) com> schreef in bericht
news:41179e1a$1 (AT) newsgroups (DOT) borland.com...
Quote:
Hi all,
I 've been struggling with this problem for quite some days now so I hope
someone can help me! I 've created a simple rmi application and I am
having
trouble deploying this with a client who is behind a proxy (which is
causing
the problem, other clients dont have the problem). The client gets the
following error:
java.net.ConnectException: Connection timed out: connect
java.rmi.ConnectException: Connection refused to host: x.y.z.k; nested
exception is:
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
at client.ComputePi.main(ComputePi.java:14)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown
Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown
Source)
... 7 more

I have set logging on to get more insight into this error:
....
FINE: main: direct socket connection failed:
....
FINE: main: trying with factory:
sun.rmi.transport.proxy.RMIHttpToPortSocketFact
ory@1415de6
9-aug-2004 13:39:31 sun.rmi.transport.proxy.RMIMasterSocketFactory
createSocket
FINE: main: trying with factory:
sun.rmi.transport.proxy.RMIHttpToPortSocketFact
ory@1415de6
9-aug-2004 13:39:31 sun.rmi.transport.proxy.HttpSendSocket FINER: main: host = x.y.z.k, port = 1099, url = http://x.y.z.k:109
9/
....
FINE: main: failed to get input stream, exception:
java.io.IOException: Server returned HTTP response code: 504 for URL:
http://x.y.z.k:1099/
at sun.net.[url]www.protocol.http.HttpURLConnection.getInputStream(Unknown[/url] So
urce)

So the direct connections fails because of the proxy, after that,
http-to-port connection fails as well. (504 = Gateway timeout). If I
understand it correclty, the implemenation uses a HttpURLConnection. If I
create my own HttpURLConnection with http://x.y.z.k:1099/, the
httpurlconnection connects and does not give an exception??:
System.setProperty("proxySet", "true");
System.setProperty("http.proxyHost", "some.proxy.com");
System.setProperty("http.proxyPort", "80");
//not sure if this is necessary
System.setProperty("firewallSet", "true");
System.setProperty("firewallHost", "some.proxy.com");
System.setProperty("firewallPort", "80");
URL url = new URL("http://x.y.z.k:" + rmiport);
System.out.println("Opening HttpURLConnection at " + rmiport);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.connect(); //does not throw an exception

Can anyone help me with this problem?

kind regards,
Christiaan





Back to top
Paul Furbacher [TeamB]
Guest





PostPosted: Fri Aug 13, 2004 4:16 pm    Post subject: Re: proxy causes connection timed out Reply with quote



Christiaan wrote:

Quote:
do people use this forum anyway?

CORBA-RMI issues may be rather esoteric. So,
traffic in this newsgroup is generally pretty
low.

The only thing I can suggest is that you
do a Groups-Google search on keywords

corba "connection timed out" firewall


Here's one hit which may be relevant:

http://tinyurl.com/4m8v7


--


Paul Furbacher (TeamB)

Save time, search the archives:
http://www.borland.com/newsgroups/ngsearch.html

Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html

Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.

Back to top
Christiaan
Guest





PostPosted: Tue Aug 17, 2004 7:01 am    Post subject: Re: proxy causes connection timed out Reply with quote

Thnx for the reply. I already did a lot of searching on the subject, but
didn't find any satisfying solutions. I was under the impression that rmi is
the way to go for distributed computing (we make use of a framework that
only allows rmi for communication). Can you tell me what a more common used
technology is?


"Paul Furbacher [TeamB]" <pfurbacher (AT) mac (DOT) com> schreef in bericht
news:411ce94d$1 (AT) newsgroups (DOT) borland.com...
Quote:
Christiaan wrote:

do people use this forum anyway?

CORBA-RMI issues may be rather esoteric. So,
traffic in this newsgroup is generally pretty
low.

The only thing I can suggest is that you
do a Groups-Google search on keywords

corba "connection timed out" firewall


Here's one hit which may be relevant:

http://tinyurl.com/4m8v7


--


Paul Furbacher (TeamB)

Save time, search the archives:
http://www.borland.com/newsgroups/ngsearch.html

Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html

Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.



Back to top
Paul Furbacher [TeamB]
Guest





PostPosted: Tue Aug 17, 2004 5:40 pm    Post subject: Re: proxy causes connection timed out Reply with quote

Christiaan wrote:

Quote:
[...] I was under the impression that rmi is
the way to go for distributed computing (we make use of a framework that
only allows rmi for communication). Can you tell me what a more common used
technology is?

"Paul Furbacher [TeamB]" <pfurbacher (AT) mac (DOT) com> schreef in bericht
news:411ce94d$1 (AT) newsgroups (DOT) borland.com...

Christiaan wrote:

do people use this forum anyway?

CORBA-RMI issues may be rather esoteric. So,
traffic in this newsgroup is generally pretty
low.

Ah, I can see how what I wrote could be taken as
saying "not too many people use RMI". Thanks
for catching me up on poor communication skills.
What I guess I tried to say was that the topic itself
is esoteric (compared to say Swing or java.lang issues),
and may not attract a lot of readers, especially among
those who are most skilled at it. That's what I meant.

Sorry that I cannot help you out with the particular
problem. Although I did some limited work with RMI
some four or more years ago, I cannot say that I know
much about it, let alone CORBA. I was hoping that the
one Google hit would do it. Apparently not.


--


Paul Furbacher (TeamB)

Save time, search the archives:
http://www.borland.com/newsgroups/ngsearch.html

Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html

Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.

Back to top
Adrian Pitulac
Guest





PostPosted: Tue Aug 24, 2004 9:53 pm    Post subject: Re: proxy causes connection timed out Reply with quote

It is hard to get real support for RMI. I have also destroyed my nerves on
some problems connected to RMI. Please give me an e-mail with detailed info
about your problem and i'll try to help you solve it.. My e-mail is
[email]john_doe252 (AT) yahoo (DOT) com[/email] Please mail me because it's an big event when i read
the newsgroup. You can also contact me on Yahoo IM.

Bye
"Christiaan" <none (AT) nospam (DOT) com> wrote

Quote:
Hi all,
I 've been struggling with this problem for quite some days now so I hope
someone can help me! I 've created a simple rmi application and I am
having
trouble deploying this with a client who is behind a proxy (which is
causing
the problem, other clients dont have the problem). The client gets the
following error:
java.net.ConnectException: Connection timed out: connect
java.rmi.ConnectException: Connection refused to host: x.y.z.k; nested
exception is:
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
at client.ComputePi.main(ComputePi.java:14)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown
Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown
Source)
... 7 more

I have set logging on to get more insight into this error:
....
FINE: main: direct socket connection failed:
....
FINE: main: trying with factory:
sun.rmi.transport.proxy.RMIHttpToPortSocketFact
ory@1415de6
9-aug-2004 13:39:31 sun.rmi.transport.proxy.RMIMasterSocketFactory
createSocket
FINE: main: trying with factory:
sun.rmi.transport.proxy.RMIHttpToPortSocketFact
ory@1415de6
9-aug-2004 13:39:31 sun.rmi.transport.proxy.HttpSendSocket FINER: main: host = x.y.z.k, port = 1099, url = http://x.y.z.k:109
9/
....
FINE: main: failed to get input stream, exception:
java.io.IOException: Server returned HTTP response code: 504 for URL:
http://x.y.z.k:1099/
at sun.net.[url]www.protocol.http.HttpURLConnection.getInputStream(Unknown[/url] So
urce)

So the direct connections fails because of the proxy, after that,
http-to-port connection fails as well. (504 = Gateway timeout). If I
understand it correclty, the implemenation uses a HttpURLConnection. If I
create my own HttpURLConnection with http://x.y.z.k:1099/, the
httpurlconnection connects and does not give an exception??:
System.setProperty("proxySet", "true");
System.setProperty("http.proxyHost", "some.proxy.com");
System.setProperty("http.proxyPort", "80");
//not sure if this is necessary
System.setProperty("firewallSet", "true");
System.setProperty("firewallHost", "some.proxy.com");
System.setProperty("firewallPort", "80");
URL url = new URL("http://x.y.z.k:" + rmiport);
System.out.println("Opening HttpURLConnection at " + rmiport);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.connect(); //does not throw an exception

Can anyone help me with this problem?

kind regards,
Christiaan





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder CORBA/RMI All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.