Pedro,

If you can get your server to listen on the host name instead of IP
address, you can setup the DNS outside the firewall to map the host
name to 192.xxx and the DNS inside the firewall (or the local hosts
file on the server box) to map the host name to 10.xxx. We have plenty
of customers using this technique with success (though not with JBoss).

> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED] Behalf Of Pedro Salazar
> Sent: Friday, 12 December 2003 5:54 a.m.
> To: [EMAIL PROTECTED]
> Subject: Invoking EJB but using *name* instead *IP*
>
>
> Greetings,
>
> I'm trying to invoke a remote interface of a EJB. However, my server has
> 1 network interface card which is viewed as 10.xxx and as 192.xxx,
> dependent of the network (the 192.xxx is translated by NAT in the
> firewall).
>
> When I invoke my EJB (even over HTTP) if the client is in the network
> 10.xxx all works fine. When the client is in the 192.xxx network it
> hangs on the lookup() for a while (about 1-2 min) and then it will hang
> for long time in the create() until an exception is thrown:
>
> "
> initial context...
> lookup...
> narrow...
> create...
> java.rmi.ConnectException: Connection refused to host: 10.112.80.4;
> nested exception is:
>         java.net.ConnectException: Connection timed out
>         at
> sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
>         at
> sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
>         at
> sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
>         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
>         at
> org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
>         at
> org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPI
> nvokerProxy.java:135)
>         at
> org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96)
>         at
> org.jboss.proxy.TransactionInterceptor.invoke(TransactionIntercept
> or.java:46)
>         at
> org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
>         at
> org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
>         at
> org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
>         at $Proxy1.create(Unknown Source)
>         at pt.ptinovacao.teste.ejb.TesteEJB.main(TesteEJB.java:32)
> Caused by: java.net.ConnectException: Connection timed out
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
>         at
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
>         at java.net.Socket.connect(Socket.java:425)
>         at java.net.Socket.connect(Socket.java:375)
>         at java.net.Socket.<init>(Socket.java:290)
>         at java.net.Socket.<init>(Socket.java:118)
>         at
> sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDir
> ectSocketFactory.java:22)
>         at
> sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMas
> terSocketFactory.java:122)
>         at
> sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
>         ... 12 more
> "
>
> I don't know but you may clarify me this, independent of the invocation
> way (directly or over HTTP), the RMI callbacks are always made directly
> to client, right?
>
> Any ideas how to solve this problem?
>
> I'm using the name of the host instead the IP address, but it throws
> the error of connection refused to host 10.xxx!!! Why is using the ip
> address instead the network name? In my application server (JBOSS) I
> already put in the jboss-service all  JNDI references to the host name.
>
> thanks.
>
> regards,
> Pedro Salazar.
> --
> PS
> [EMAIL PROTECTED]
> PGP:0E129E31D803BC61
>
> ==================================================================
> =========
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to