java.jet.ConnectException: Connection refused, when connecting to remote EJB and opmn:ormi syntax used (Doc ID 359103.1)

Last updated on DECEMBER 05, 2016

Applies to:

Oracle Containers for J2EE - Version: 10.1.2.0.2 and later   [Release: AS10gR2 and later ]
Information in this document applies to any platform.

Symptoms

(Note: Problem believed to be generic, but so far only reported on MS Windows platforms)

Java client is requesting the remote EJB and get's following response

Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:

java.net.ConnectException: Connection refused: connect

even when java client is using code such as this:

env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "welcome");
env.put(Context.PROVIDER_URL, "opmn:ormi://<FQservername>:6003:ejbs/ejbsamples");
Context jndiCon = new InitialContext(env);


Note: for opmn listening into port 6003, oc4j instance ejbs and application named ejbsamples

The problem reproduces when requesting remotely only , if the ejb bclient is local, it works perfect

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms