OC4j connection refused

Hi!
I have a problim with new application server connection from JDeveloper. Version 9.0.2.0.0.
I have installed Developer Suite. Started OC4j instance.
Checked it. Everything is running. I can see start page.
But cannot create connection to that local instance.
ran java -jaroc4j.jar -install and changed admin password.
But it doesn't help at all.
Whats up?

Addtitional info.
Seems like it's trying lookup JNDI.
I thought it's configured to use local XML file as storage.
How i can check it?

Similar Messages

  • Jdeveloper 11g TP4: Connection refused error for Embedded Oc4j

    Hi,
    I am getting following error whenever trying to deploy any application in embedded oc4j or whenever try to connect with embedded server on Resource palette.
    Error while getting remote MBeanServer for url: ormi://127.0.0.1:23891/default:
    Error reading application-client descriptor: Error communicating with server: Connection refused: connect; nested exception is:
         javax.naming.CommunicationException: Connection refused: connect [Root exception is java.net.ConnectException
    I am using Jdeveloper 11g TP 4 on windows XP.
    I have checked other links too related to above error and have checked following:
    Proper host name entry in host file
    No spaces in Jdveleoper installed directory name
    Proxy setting in Jdeveloper: excluded localhost and ip address
    Will be very thankful if anyone can help me to resolve this issue.
    Thanks in advance                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Don't spend to much time on this. JDev 11g is production and there will be no OC4J 11g!
    --olaf                                                                                                                                                                                               

  • Calling a WebServices From Java Stored Proc fails with Connection refused

    I have followed the example in Note:220662.1 on Metalink step by step.
    I am using two windows machines (2000 SP4). I have Oracle 9.2.0.5 EE on one of them and OC4J 9.0.4 standalone on the other(running on JVM 1.4.2_05-b04). The 2 servers "see" each other over the network.
    I can execute the stub from the database machine:
    C:\WebServices\HelloWorld>java HelloWorldImplWSStub
    Hello World - The current time is Sat Aug 21 11:56:20 EDT 2004When running it from the database, I get:
    SQL> select ws_hello_world from dual;
    select ws_hello_world from dual
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: [SOAPException:
    faultCode=SOAP-ENV:IOException; msg=Connection refused;
    targetException=java.net.ConnectException: Connection refused]
    Elapsed: 00:00:21.02The trace file generated on the database server machine looks like:
    [SOAPException: faultCode=SOAP-ENV:IOException; msg=Connection refused; targetException=java.net.ConnectException: Connection refused]
      at oracle.soap.transport.http.OracleSOAPHTTPConnection.send(OracleSOAPHTTPConnection.java:765)
      at org.apache.soap.rpc.Call.invoke(Call.java:261)
      at HelloWorldImplWSStub.sayHelloWorld(HelloWorldImplWSStub.java:52)Here is the stub code generated using JDeveloper 9.0.5.1:
    import oracle.soap.transport.http.OracleSOAPHTTPConnection;
    import org.apache.soap.encoding.SOAPMappingRegistry;
    import java.net.URL;
    import org.apache.soap.rpc.Call;
    import org.apache.soap.Constants;
    import java.util.Vector;
    import org.apache.soap.rpc.Response;
    import org.apache.soap.rpc.Parameter;
    import org.apache.soap.Fault;
    import org.apache.soap.SOAPException;
    import java.util.Properties;
    public class HelloWorldImplWSStub  {
      public HelloWorldImplWSStub() {
        m_httpConnection = new OracleSOAPHTTPConnection();
        m_smr = new SOAPMappingRegistry();
      public static String endpoint = "http://oc4jsrv:8888/MyWorkarea-OC4J-context-root/HelloWorldImplWS";
      public String getEndpoint() {
        return _endpoint;
      public void setEndpoint(String endpoint) {
        _endpoint = endpoint;
      private static OracleSOAPHTTPConnection m_httpConnection = null;
      private static SOAPMappingRegistry m_smr = null;
      public static String sayHelloWorld() throws Exception {
        String returnVal = null;
        URL endpointURL = new URL(_endpoint);
        Call call = new Call();
        call.setSOAPTransport(m_httpConnection);
        call.setTargetObjectURI("HelloWorldImplWS");
        call.setMethodName("sayHelloWorld");
        call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
        Vector params = new Vector();
        call.setParams(params);
        call.setSOAPMappingRegistry(m_smr);
        Response response = call.invoke(endpointURL, "");
        if (!response.generatedFault()) {
          Parameter result = response.getReturnValue();
          returnVal = (String)result.getValue();
        else {
          Fault fault = response.getFault();
          throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
        return returnVal;
      public void setMaintainSession(boolean maintainSession) {
        m_httpConnection.setMaintainSession(maintainSession);
      public boolean getMaintainSession() {
        return m_httpConnection.getMaintainSession();
      public void setTransportProperties(Properties props) {
        m_httpConnection.setProperties(props);
      public Properties getTransportProperties() {
        return m_httpConnection.getProperties();
       public static void main(String[] argv) throws Exception   {    
        HelloWorldImplWSStub hstub = new HelloWorldImplWSStub();    
        System.out.println(hstub.sayHelloWorld());  
    }The PL/SQL function code:
    CREATE OR REPLACE FUNCTION ws_hello_world RETURN VARCHAR2
    AS LANGUAGE JAVA
    NAME 'HelloWorldImplWSStub.sayHelloWorld() return java.lang.String';Any help would be greatly appreciated.

    Hello,I have the same problem. Did you find any solution to it?
    Thanks. Diego (Argentina)

  • Connection refused error running JSP on Jdev 10.1.3.0.3.3412 with MySL 5.0

    Hello,
    I'm using Jdeveloper 10.1.3.0.3.3412 on a Mac with a MySQL database. In Jdeveloper i can make a connection to the database and create adf business components
    I've made a JSP page with ADF on a single table. No errors when compiling. When I try to run the JSP Page using Embedded OC4J (on Mac OSX Tiger) I get the error:
    5/12/09 00:45:50 java.net.ConnectException: Connection refused
    05/12/09 00:45:50      at java.net.PlainSocketImpl.socketConnect(Native Method)
    05/12/09 00:45:50      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    05/12/09 00:45:50      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    05/12/09 00:45:50      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    05/12/09 00:45:50      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:428)
    05/12/09 00:45:50      at java.net.Socket.connect(Socket.java:507)
    05/12/09 00:45:50      at java.net.Socket.connect(Socket.java:457)
    05/12/09 00:45:50      at java.net.Socket.<init>(Socket.java:365)
    05/12/09 00:45:50      at java.net.Socket.<init>(Socket.java:207)
    05/12/09 00:45:50      at oracle.jdevimpl.runner.oc4j.Oc4jNotifier.sendMessage(Oc4jNotifier.java:98)
    05/12/09 00:45:50      at oracle.jdevimpl.runner.oc4j.Oc4jNotifier.postInitApplicationServer(Oc4jNotifier.java:55)
    05/12/09 00:45:50      at com.evermind.server.ApplicationServer.serverExtensionPostInit(ApplicationServer.java:1041)
    05/12/09 00:45:50      at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:927)
    05/12/09 00:45:50      at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:98)
    05/12/09 00:45:50      at java.lang.Thread.run(Thread.java:613)
    What am I doing wrong? The embedded OC4J library is added to the project. I've tried to use the javac compiler. It looks like the OC4J instance cannot make a connection to the db.
    Thanks,
    Martin

    Hello
    I've added the connection to the web.xml, but still get the same error.
    When I go to embedded OC4J preferences and change the JNDI-names of the datasources (global and current-workspace) to the same name (this was default), i get this error message:
    9-dec-2005 9:30:09 com.evermind.server.ApplicationStateRunning initNativeDataSource
    SEVERE: Error creating native data source. The location 'jdbc/MySQLConnectionCoreDS' is already in use.
    05/12/09 09:30:09 Application: current-workspace-app is in state FAILED
    05/12/09 09:30:09 Error instantiating application 'current-workspace-app' at file:/Users/martinsuijs/jdevhome/mywork/myWorldApp/myWorldApp-oc4j-app.xml: Error creating native data source. The location 'jdbc/MySQLConnectionCoreDS' is already in use.
    05/12/09 09:30:14 java.net.ConnectException: Connection refused
    grtz
    Martin

  • Error connecting to OPMN (is it running?): Connection refused:

    I have installed SOA in my laptop and started the SOA suite and completed the Hello world example program. To deploy I am trying to create Integration Server connection and selected connection Type as "Oracle Application Server 10g 10.1.3." and when I am trying to test the connection I am getting below error.
    Error getting OC4J process for: opmn-home+oc4j-localhost-6003-default:
    Error connecting to OPMN (is it running?): Connection refused: connect
    I have not changed any default values
    HostName : localhost OPMN Port : 6003
    OC4J Instance Name : home
    Could you please let me know if anything missing information.
    Regards
    Kiran Akkiraju

    I am able to create Connection now. System is defaulting port as 6003 instead of 6004. I have changed the port after seeking OPMN configuration XML file.
    Regards
    Kiran Akkiraju

  • Bi Server Connection Refused

    Hi, i've installed BI Server EE on a virtual machine.
    I press "Start OC4J" and the batch file starts as i think. When i try to start "BI publisher" i see a Java Exception "Connection Refused" Some idea?

    Hi MIcheal, i'm working on the same VM, i've got as the db as publisher on this VM, and i try connect to localhost.
    The error log is :
    <TIMESTAMP> NOTIFICATION connect to NQSSECONDARYCCS=;PORT=;SSLKEYSTOREPASSWORD=***;PRIMARYCCS=;TRUSTANYSERVER=;LOGFILEPATH=<PATH>;SECONDARYCCSPORT=;TRUSTSTOREPASSWORD=***;LOGLEVEL=;SSL=;HOST=VM_ODI;CATALOG=;PASSWORD=***;
    <timestamp> WARNING java.net.ConnectException: Connect Refused: connect
    java.sql.SQLException: java.net.ConnectException:Connection Refused: connect
    at oracle.bi.jdbc.AnaJdbcDriver.conncetToNQSNode<AnaJdbcDriver.java:413>

  • JNDI Connection refused error

    HI
    I am new to Java so please excuse my stupid questions and general lack of ignorance. I am trying to connect to an Oracle database using JNDI to retrieve a Datasource using a 'data-source.xml' file but I get a 'Connection refused' error I am at a total loss at what this can be, I just have a simple Java Class which gets an InitialContext then does a lookup from here but this is were it fails.
    Could anybody give me any idea as to where to look. Could it be a problem with the JNDI server itself?. I'm using JDeveloper 10.1.3 and am just trying to run it in the embedded server.
    Sorry for the general rambling nature of this post and please ask me to provide any extra information required.
    Any help would be much appreciated as I'm going nowhere with this at the moment and very frustrated as have searched everywhere with no results.
    Thanks
    Andy

    Hi
    Thanks for the reply. I have checked my data-sources.xml and this all seems fine. I can even connect to the DB using DriverManager rather than the JNDI method. One thing that confuses me is which data-sources.xml it is using as there appear to be many. In JDeveloper you can specify the data sources in 'embeeded oc4j preferences' plus create your own under meta-inf. Which is being used when run in embedded, maybe thats obvious the first one?
    thanks once again

  • Admin.jar connection refused

    I have an EAR file built in JBuilder 7 which I'm trying to deploy to my demonstration Application Server using the JBuilder 7 plug-in for OC4J. Whenever I try to deploy, I get
    ...\jdk1.3.1\bin\java -jar "...\ora90\j2ee\home\admin.jar" ormi://localhost:23791 admin narf -deploy -file "C:/devt/010Plus/010Plus.ear" -deploymentName 010Plus
    Error!!!: Error: javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:
         java.net.ConnectException: Connection refused: connect
    Now, doing anything "admin.jar" from the command line gives me the same result -
    ...\ora90\j2ee\home>java -jar admin.jar ormi://127.0.0.1:23791 admin narf -list
    Error: javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:
    java.net.ConnectException: Connection refused: connect
    I've been through the 9ias installation guide and the JBuilder plug-in documentation with a pretty fine-toothed comb, but still there is obviously something that eludes me. Help! Stuck!
    Anyone got any ideas? I'm pretty new to the Oracle side of this, so don't hold back on offering "obvious" tips - what may be "obvious" to you gurus will most likely be black magic to me at this point ;)
    Thanks for your help,
    =Per

    It's probably bad form to reply to my own post, but I've just repeated the problem on a clean machine, so I thought I'd submit a quick update.
    OS: Windows XP Professional
    Product: Oracle 9i Application Server Release 2 (9.0.3)
    1) Install 9iAS with WebCache
    2) Select "No Infrastructure"
    3) Complete installation
    4) Verify installation complete and 9iAS started -
    http://localhost:7777/
    5) Verify OC4J instance(s) created and started -
    http://localhost:1810/
    6) Attempt to list all sites -
    ...\j2ee\home>java -jar admin.jar ormi://127.0.0.1 admin password -list
    Error: javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:
    java.net.ConnectException: Connection refused: connect
    Ok - I admit it - I'm dumb. What did I miss/forget/not grok?
    Any pointers would be greatly appreciated.
    Cheers,
    =Per

  • Servlet connection refused: connect

    here my problem can any one help
    javax.servlet.ServletException: XML Parsing error: IOException: Connection refused: connect
         at net.athenet.cable.LocationSubmitAction.run(LocationSubmitAction.java:57)
         at net.athenet.cable.ControllerServlet.doPost(ControllerServlet.java:118)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)

    I am using Jdeveloper 10.1.3.0.4

  • Connection refuse

    Hi,
    I try to load test my web site using apache soap 2.2 for doing some web services. However, when I increase the number of threads in the load test. I got connection refused exception from OC4J and also find SOAPException : msg=Error opening socket...
    Is there a max. connection setting in oc4j?
    Can any one give me a hand in this issue?
    Thanks in advanced!
    Regards,
    --kenneth                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    The problem is addressed (see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4665037):
    Use this code to test the localhost, and I found that those successful machines returned hostname/correct IP, those unsuccessful machines returned hostname/127.0.0.1.
    ----------------- BEGIN SOURCE --------------------
    import java.net.*;
    public class LocalHostTest {
         public static void main(String[] args) {
              try {
                   System.out.println(InetAddress.getLocalHost());
              } catch (Exception e) { e.printStackTrace(); }
    ----------------- END SOURCE --------------------

  • Opmn fails with connection refused

    Hi all,
    I've successfully installed Oracle Application Server 10g AS R2.
    After installation I could successfull login and access both Infra and Middle Tier using OEM, which were configured under a single Farm.
    But unfortunately, after and when the server is restarted... opmnctl startall hangs with ons.log contents as below
    08/06/23 16:25:14 [4] ONS server initiated
    08/06/23 16:53:15 [4] Logging disabled
    08/06/23 16:57:43 [4] ONS server initiated
    08/06/23 16:57:43 [4] Connection 1,192.168.6.183,6201 connect (Connection refused)
    08/06/23 16:59:42 [4] Connection 1,192.168.6.183,6201 connect (Connection refused)
    08/06/23 17:01:41 [4] Connection 1,192.168.6.183,6201 connect (Connection refused)
    08/06/23 17:03:40 [4] Connection 1,192.168.6.183,6201 connect (Connection refused)08/06/23 17:04:00 [4] Logging disabled
    As a workaround I verified /etc/hosts file... it is as below
    127.0.0.1 localhost.localdomain localhost
    192.168.6.183 oravis.dsrc2.com oravis
    I'm performing the start-up & shutdown in the following order
    START DB Tier
    Start Database as
    Make sure your are in DB Home
    $ sqlplus "/as sysdba"
    SQL> startup
    Start DB Listener as
    Make sure your are in DB Home
    $ lsnrctl start RETEK
    Startup 10gAS Server
    Start Middle Tier iAS Console
    Make sure your are in Middle Tier Home
    cd $ORACLE_HOME/bin
    emctl start iasconsole
    Start Infra iAS Console
    Make sure your are in Infra Home
    cd $ORACLE_HOME/bin
    emctl start iasconsole
    Start Infra listener as
    $ lsnrctl start
    Start Infra Database as -
    $sqlplus "/as sysdba"
    SQL> startup
    Start Infra OC4J Services as
    Make sure your are in Infra Home
    $./opmnctl startall
    Start Middle Tier OC4J Services as
    Make sure your are in Middle Tier Home
    $./opmnctl startall
    Shutdown 10gAS Server
    Stop Middle Tier Services as
    Make sure your are in Middle Tier Home
    cd $ORACLE_HOME/opmn/bin
    $./opmnctl stopall
    Stop Infrastructure Services as
    Make sure your are in Infra Home
    $ ./opmnctl stopall
    Stop Infra Listener as
    Make sure your are in Infra Home
    $ lsnrctl stop [listener_name]
    Stop Infra Database as
    Make sure your are in Infra Home
    $ sqlplus "/as sysdba"
    SQL> shutdown immediate
    Stop Infra iAS Console
    Make sure your are in Infra Home
    cd $ORACLE_HOME/bin
    emctl stop iasconsole
    Stop Middle Tier iAS Console
    Make sure your are in Middle Tier Home
    cd $ORACLE_HOME/bin
    emctl stop iasconsole
    Stop DB Tier
    Stop Listener as
    Make sure your are in DB Home
    $ lsnrctl stop [listener_name]
    Stop Database as
    Make sure your are in DB Home
    $ sqlplus "/as sysdba"
    SQL> shutdown immediate
    Now... I'm able to access the Infra & Middle tier throgh OEM but the status is Unavailable. Moreover now they not under the Farm (Which they were earlier in).
    Also it is giving error connecting to repository database.
    Please anybody, who have come across this kind of problem, kindly guide me, where actually I'm missing.
    -Mahesh

    Hi Adith,
    Thanx a lot for the updates and correcting me. I've gone through the documents and corrected the way by which I was starting the services.
    But... when I try to do opmnctl startall, now I again got struck up with this strange error in ons.log
    08/06/24 10:26:02 [4] ONS server initiated
    08/06/24 10:47:51 [2] Connection 1,192.168.6.183,1521 SSL handshake failed
    08/06/24 10:47:51 [2] Handshake for 1,192.168.6.183,1521: nz error = 28864 interval = 0 (180 max)
    08/06/24 10:49:50 [2] Connection 1,192.168.6.183,1521 SSL handshake failed
    08/06/24 10:49:50 [2] Handshake for 1,192.168.6.183,1521: nz error = 28864 interval = 0 (180 max)
    08/06/24 10:51:49 [2] Connection 1,192.168.6.183,1521 SSL handshake failed
    08/06/24 10:51:49 [2] Handshake for 1,192.168.6.183,1521: nz error = 28864 interval = 0 (180 max)
    I've gone through metalink and found out that this is a problem with SSL Authentication which been stated as a bug.
    Can anybody answer my following queries...
    1. Is it mandatory to enable SSL in 10g AS? Can we run server without SSL?
    2. If not mandatory, then how to disable SSL?
    3. If the handshake error is a bug, how to fix? Do I need to apply any patch for this?
    Looking forward for immediate response,
    Regards
    -Mahesh

  • Connection refused error when trying to to lookup EJB in iAS

    Hi,
    I tried to write a client that uses an EJB in an 9.0.3 iAS running on windows NT SP6, and the JNDI lookup keeps failing with the following error:
    javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:
    java.net.ConnectException: Connection refused: connect
         java.lang.Object com.evermind.server.rmi.RMIContext.lookup(java.lang.String)
              RMIContext.java:134
         java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
              InitialContext.java:345
         void Samplecom.mind.ejb.stubs.AccountComplexStubClient.main(java.lang.String[])
              AccountComplexStubClient.java:24
    I am using the following properties for the lookup:
    env.putContext.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "ias_admin");
    env.put(Context.SECURITY_CREDENTIALS, "ias_admin1");
    env.put(Context.PROVIDER_URL, "ormi://localhost:23791/mindejb");
    Where:
    * 23791 is the port configured in the rmi.xml
    * mindejb is the name of the module
    * ias_admin1 is the correct password of ias_admin user
    Similar properties worked for a stand alone oc4j. What have I done wrong?
    Any help will be appreciated.
    Thanks,
    Avi

    Hi -
    I can resend what I think I would have said later on. No guarantees though ;-)
    What you need to do is to look at the RMI port range allocated in the opmn.xml file for the OC4J instance you are trying to connect to. OPMN basically looks at the first number, and determines if the port is free. If it is, it will use it. If it's not, it will go to the next sequential number and try that, etc.
    So if you have a defined port range of 3101-3200 and you only have one process, then it's a pretty safe bet (unless another rogue process has grabbed it) that the port you need will be the first one listed - 3101. If you specified two JVM processes to be started for the instance, then it's likely that 3101 and 3102 will be used.
    I think that's what I'd written in the truncated text.
    In our forthcoming 904 release, we're providing a port lookup service which will be able to be used by remote clients to discover the RMI ports used for OC4J instances. This will then avoid the client (and admins) needing to know and publish the specific ports used. Since OPMN itself knows which ports have been allocated, it can be queried by remote clients to find out where to connect. I've not seen the final spec, but I think this lookup will be transparent to the client in terms of code and will only require the addition of a prefix to the provider.url property used in jndi.propeties.
    It's likely to be of a format such as opmn:lookup:ormi://<known-ias-host-location>.
    Sorry about the truncation, it looks like that has now been rectified for the forums.
    -steve-

  • RMI Connection Refused through Firewall

    Hi,
    I am having problems making an RMI connection through a firewall. On the server outside the firewall I have my servlet application running in an OC4J container and inside the firewall I have an EJB listening on port 6666. I have setup the firewall to allow connections through on port 6666. If I telnet from the machine outside the firewall on port 6666 I am able to make a connection to the EJB. So I know the firewall has been setup to handle the connection.
    I run the servlet application and when it tries to make the connection it gives an error:
    javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused; nested exception is:
    java.net.ConnectException: Connection refused
    When I do a snoop on the external machine to see what data is trying to be sent to the internal machine there is no data. When doing the telnet test there was data.
    I have the same servlet application deployed on a machine internally and it is able to make a connection to the EJB. The only problem is either the configuration of the application server on the external machine or the firewall configuration.
    Anyone able to help me see what I am missing?
    Thanks
    Shawn Clark

    not sure what you mean by having a 'EJB listening' on port 6666. Do you mean actually having a socket listening within the EJB code? If so then that is a suspicious EJB activity.
    If not then i guess you mean the ORMI listening port of the OC4J application. This is normally set on port 23791 to allow the RMI communication to flow.
    -lp

  • When I try to log in from desktop I get "Connection Refused" message. How do I fix this?

    I tried to activate Mozilla Firefox today using the normal & routine method, clicking on the Firefox Icon.
    Each time I tried I got the same message "Connection Refused".
    I went to the Firefox site and read the message regarding disabling Java, so I opened ADD ONS and Plug Ins and disabled Java.
    Still no change, so I shut down and restarted my computer.
    I keep getting the same Connection Refused message.
    What needs to be done to restore Firefox?

    Another user also reported a problem with the AT&T Yahoo home page in the past few minutes. When you have a problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.
    (1) Bypass Firefox's Cache
    Use Ctrl+Shift+r to reload the page fresh from the server.
    Alternately, you also can clear Firefox's cache completely using:
    orange Firefox button (or Tools menu) > Options > Advanced
    On the Network mini-tab > Cached Web Content : "Clear Now"
    If you have a large hard drive, this might take a few minutes.
    (2) Remove the site's cookies (save any pending work first). While viewing a page on the site:
    * right-click and choose View Page Info > Security > "View Cookies"
    * Alt+t (open the classic Tools menu) > Page Info > Security > "View Cookies"
    Then try reloading the page. Does that help?

  • Connection refused when trying to getOutputStream from https connection

    Hi all !
    I want to make an https connection with a server to send/get the request/response
    What can be the cause of the following error in the following code testHttps.java?
    java.net.ConnectException: Connection refused: 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.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
    at Test.testHttps.main(testHttps.java:46)
    Exception in thread "main" java.net.ConnectException: Connection refused: 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.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
    at Test.testHttps.main(testHttps.java:51)
    testHttps.java
    package Test;
    import java.io.;
    import java.net.;
    import javax.net.ssl.*;
    public class testHttps {
    public static void main(String args[]) throws Exception {
    //System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
    // Create a trust manager that does not validate certificate chains
    TrustManager[] trustAllCerts = new TrustManager[]{
    new X509TrustManager() {
    public java.security.cert.X509Certificate[] getAcceptedIssuers() {
    return null;
    public void checkClientTrusted(
    java.security.cert.X509Certificate[] certs, String authType) {
    public void checkServerTrusted(
    java.security.cert.X509Certificate[] certs, String authType) {
    // Install the all-trusting trust manager
    try {
    SSLContext sc = SSLContext.getInstance("SSL");
    sc.init(null, trustAllCerts, new java.security.SecureRandom());
    HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
    } catch (Exception e) {
    System.out.println("Error" e);
    // Now you can access an https URL without having the certificate in the truststore
    try {
    URL url = new URL("https://..............");-->//address of the server given here
    URLConnection conn = url.openConnection();
    HttpsURLConnection urlConn = (HttpsURLConnection) conn;
    urlConn.setDoOutput(true);
    OutputStreamWriter wr = null;
    try{
    wr = new OutputStreamWriter(conn.getOutputStream());
    catch(Exception e){
    e.printStackTrace();
    BufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
    String str;
    while( (str=in.readLine()) != null) {
    System.out.println(str);
    } catch (MalformedURLException e) {
    System.out.println("Error in SLL Connetion" +e);
    HostnameVerifier hv = new HostnameVerifier()
    public boolean verify(String urlHostName, SSLSession session)
    System.out.println("Warning: URL Host: " urlHostName " vs. "
    session.getPeerHost());
    return true;
    want to ignore certificate validation.
    plese help me..
    hi brucechapman, as you suggested me, i posted in Core API- networking forum, now please gimme a solution
    Thanks in advance.

    hi brucechapman,
    ran the NetTest program, got the following exception:
    trigger seeding of SecureRandom
    done seeding SecureRandom
    Exception in thread "main" java.net.ConnectException: Connection refused: 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.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
         at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source)
         at sun.net.NetworkClient.doConnect(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
         at java.net.URL.openStream(Unknown Source)
         at Test.NetTest.main(NetTest.java:40)
    NetTest.java:40 -- InputStream is = url.openStream(); at this ling throwing exception.
    For the following program, i have added the argument -Djavax.net.ssl.trustStore=cacerts
    i have exported the certificate from IE and added to the keystore.
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.security.Security;
    import javax.net.ssl.SSLSocket;
    import javax.net.ssl.SSLSocketFactory;
    public class Communicator {
    public static void main(String[] args) {
    try {
    int port = 34443;
         String strReq = "xml content ";
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    SSLSocketFactory factory = (SSLSocketFactory) SSLSocketFactory.getDefault();
    SSLSocket socket = (SSLSocket) factory.createSocket("jyoti-win2k8-32", port);
    //Writer out = new OutputStreamWriter(socket.getOutputStream());
    //out.write("GET http://" + "hostname" + "/ HTTP 1.1\r\n");
    // out.write("\r\n");
    //out.write(strReq);
    //out.flush();
    OutputStreamWriter wr = null;
    try{
         wr = new OutputStreamWriter(socket.getOutputStream());
         catch(Exception e){
              e.printStackTrace();
         System.out.println("got output stream");
         try{
         wr.write(strReq);
         //System.out.println("response code : "+conn.getResponseCode());
         System.out.println("written");
         wr.flush();
         catch(IOException e){
              e.printStackTrace();
    InputStreamReader is = new InputStreamReader(socket.getInputStream(),"UTF8") ;
         BufferedReader rd = new BufferedReader(is);
         String line;int count=0;
         System.out.println("rd "+rd);
         while ((line = rd.readLine()) != null) {
              System.out.println("line "+line );
              System.out.println(count++);
              // Process line...
         System.out.println(count);
    rd.close();
    BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    int c;
    while ((c = in.read()) != -1) {
    System.out.write(c);
    //out.close();
    in.close();
    socket.close();
    } catch(IOException ex) {
    ex.printStackTrace();
    Exception :
    javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
         at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
         at sun.nio.cs.StreamEncoder.implFlushBuffer(Unknown Source)
         at sun.nio.cs.StreamEncoder.implFlush(Unknown Source)
         at sun.nio.cs.StreamEncoder.flush(Unknown Source)
         at java.io.OutputStreamWriter.flush(Unknown Source)
         at Test.Communicator.main(Communicator.java:55)
    Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
         at sun.security.validator.PKIXValidator.<init>(Unknown Source)
         at sun.security.validator.Validator.getInstance(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.getValidator(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
         ... 7 more
    Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
         at java.security.cert.PKIXParameters.setTrustAnchors(Unknown Source)
         at java.security.cert.PKIXParameters.<init>(Unknown Source)
         at java.security.cert.PKIXBuilderParameters.<init>(Unknown Source)
         ... 19 more
    java.net.SocketException: Socket is closed
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getInputStream(Unknown Source)
         at Test.Communicator.main(Communicator.java:66)
    please help me and provide me suggestion/solution. how to get rid off this trustanchor paramater exception
    what is it actualy?
    Thanks in advance.

Maybe you are looking for

  • HT1349 itunes tv series download

    I purchased the first season of the Good Wife and accidentally deleted it.  I have tried to re-purchse it but it says "purchsed" and then won't let me download it. How do I get this back on my ipad

  • Audio output via firewire

    I can not get audio working through firewire on my late 2013 MacBook Pro 13". If I test channels in channel setup it gives me static, but if I play iTunes od Spybot nothing happens. Internal speakers work fine. Any ideas what to do?

  • Apex Theme Editing

    Hi all, i found a nice vista-style toolbar on the net and want to implement it in apex. but unfortunately it does not load the images specified in css file here´s what i´d like to do: [http://apex.oracle.com/pls/otn/f?p=200801:2012:586436219181608::N

  • Ipod touch shows the apple but does not respond to anyting any tips

    I can not do anything with it. My version is the 8 G

  • Problem with reading mpeg files from Sony DCR-SR100 30GB Handycam

    I just purchased a new Sony DCR-SR100 Handycam. I can upload successfully to my desktop (PowerBook G4)via a USB cable. I have all the latest updates for iLife, iMovie, Final Cut Pro and Quicktime. None of those applications will open the imported mpe