Connection Refused Exception.

Hi! I have made a java server as an NT Service. This server and my client works fine when I run them from command prompt. But when I make the server as an NT service and then try to connect to it using this client, I get an exception saying connection refused. Can anyone help me with this, its urgent.
thanks
rahul

This is the client program
import java.net.*;
public class Client {
public static void main(String[] args)
try
Socket mySocket = new Socket("localhost", 4000);
System.out.println("Connected");
catch (Exception e)
System.err.println("Exception: " + e);
This is the Server Program
import java.io.*;
import java.util.Date;
class MyServer {
int m_port;
ServerSocket m_serverSocket;
public static void main(String[] args)
new MyServer(4000);
public MyServer(int port)
m_port=port;
try {
init();
catch (Exception e)
System.out.println("Caught : "+e);
public void init() throws Exception
m_serverSocket = new ServerSocket(m_port);
while(true)
Socket client = m_serverSocket.accept();
Thread clientThread = new Thread(new ClientHandler(client));
clientThread.start();
public void close() throws Exception { m_serverSocket.close(); } }
and this is the ClientHandler PRogram.
import java.io.*;
import java.net.*;
import java.util.Date;
class ClientHandler implements Runnable {
Socket m_socket;
public ClientHandler(Socket clientSocket) {
m_socket=clientSocket; }
public void run() {
try {
processRequests();
m_socket.close();
catch (Exception e) { System.out.println("Caught "+e); }
public void processRequests() throws IOException {
DataOutputStream dout= new DataOutputStream(m_socket.getOutputStream());
dout.writeChars((new Date()).toString()+"\n"); } }
...The point is that they run perfectly on command prompt but not when i make this server as nt service.
What could go Wrong ??
thanks
rahul

Similar Messages

  • Rmi client throws Connection Refused exception

    My Rmi client throws a Connection Refused exception when i try to run it on remote machine (in this case i run it on my virtualbox macine).
    The virtualbox machine network is in NAT mode (host machine ip should be 10.0.2.2).
    When rmi client starts get registry instance and print in standar output:
    RegistryImpl_Stub[UnicastRef2 [liveRef: [endpoint:[//10.0.2.2/:1099,util,RmiInstances$1@1275d39](remote),objId:[0:0:0, 0]]]]But when rmi client trys to use any of remote methods it throws Connection Refused, but it's to strange because the Connection Refused has 127.0.1.1 as ip.
    java.rmi.ConnectException: Connection refused to host: 127.0.1.1; ....In client RmiInstances code (this class contains all remote implementations) is:
    public class RmiInstances {
        private static RmiInstances instance;
        private IUserManage userManage;
        private IAnalysis analysis;
        private IPacientManage pacientManage;
        private IInsuranceManage insuranceManage;
        private Config config;
        private RmiInstances()
                throws RemoteException, NotBoundException, IOException {
            this.config = Config.getInstance();
            Registry registry = LocateRegistry.getRegistry(config.getServerUrl()+"/",
                    1099, new RMIClientSocketFactory() {
                @Override
                public Socket createSocket(String host, int port) throws IOException {
                    try {
                        URI uri = new URI(config.getServerUrl()+
                                ":"+config.getServerPort());
                        return new Socket(uri.getHost(), uri.getPort());
                    } catch (URISyntaxException ex) {
                        ex.printStackTrace();
                        return null;
            System.out.println(registry);
            userManage = (IUserManage)registry.lookup("RUserManage");
            analysis = (IAnalysis)registry.lookup("RAnalysis");
            pacientManage = (IPacientManage)registry.lookup("RPacientManage");
            insuranceManage = (IInsuranceManage)registry.lookup("RInsuranceManage");
    ...And server code is the next:
    public static void main(String[] args) {
         System.out.println("GNULab Server " + VERSION + " starting...");
         System.setProperty("java.rmi.server.codebase",
              "file:/home/zarovich/workspace/labserver/bin");
         try {
             // Loading config
             System.out.println("Loading config...");
             Config config = Config.getInstance();
             // inicializando rmi registry
             Registry registry;
             if (config.isSsl()) {
              registry = LocateRegistry.createRegistry(
                   config.getServerPort(), new RmiSSLClient(),
                   new RmiSSLServer());
             } else
              registry = LocateRegistry
                   .createRegistry(config.getServerPort());
             // instanciando implementaciones
             RAnalysis rAnalysis = new RAnalysis();
             RInsuranceManage rInsuranceManage = new RInsuranceManage();
             RPacientManage rPacientManage = new RPacientManage();
             RUserManage rUserManage = new RUserManage();
             // registrando interfaz rmi
             registry.rebind("RAnalysis", (IAnalysis) UnicastRemoteObject.exportObject(rAnalysis, 0));
             registry.rebind("RInsuranceManage", (IInsuranceManage) UnicastRemoteObject.exportObject(rInsuranceManage, 0));
             registry.rebind("RPacientManage", (IPacientManage) UnicastRemoteObject.exportObject(rPacientManage, 0));
             registry.rebind("RUserManage", (IUserManage) UnicastRemoteObject.exportObject(rUserManage, 0));
             System.out.println("GNULab Server " + VERSION + " listening ...");
             System.out.println("Registry instance: " + registry.toString());
         } catch (RemoteException e) {
             e.printStackTrace();
            * catch (MalformedURLException e) { e.printStackTrace(); }
            */catch (IOException e) {
             // TODO Auto-generated catch block
             e.printStackTrace();
         } catch (JDOMException e) {
             // TODO Auto-generated catch block
             e.printStackTrace();
    ...

    I'm solved my problem.
    I just need run my server with -Djava.rmi.serverhost=10.0.2.2 and my client running on my virtualbox machine works!

  • Connection refused Exception parsing an xml on a network drive

    I am getting a "java.net.ConnectException: Connection refused: connect" exception when I try to parse an xml file over a network drive with a url like "\\Host\shared\file.xml". The problem only happens if I use a full qualified url to the file, if I map the drive to the local server then it works fine. This means that "\\Host\shared\file.xml" fails while "G:\file.xml" works but the two point to the same file. The other thing is that it fails for JDK 1.4.0 but works file for JDK1.3.1. Same program, same classpath, same server: it works with JDK1.3.1 but throws the exception for JDK1.4.0. Following is the full exception trace:
    java.net.ConnectException: Connection refused: connect
    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 sun.net.NetworkClient.doConnect(NetworkClient.java:139)
    at sun.net.NetworkClient.openServer(NetworkClient.java:118)
    at sun.net.ftp.FtpClient.openServer(FtpClient.java:387)
    at sun.net.ftp.FtpClient.<init>(FtpClient.java:651)
    at sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.ja
    va:175)
    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnec
    tion.java:257)
    at java.net.URL.openStream(URL.java:955)
    at org.apache.xerces.readers.DefaultReaderFactory.createReader(DefaultRe
    aderFactory.java:149)
    at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocume
    nt(DefaultEntityHandler.java:491)
    at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:3
    12)
    at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1080)
    at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1122)

    From the stack trace posted it appears that URL.openStream decided to use FTP to access the file. Of course that won't work. But the key is that a URL is expected, at least that's what I infer from this line:
    at java.net.URL.openStream(URL.java:955)
    And \\Host\shared\file.xml isn't a URL. Looks like 1.4 has fixed something which broke that shortcut. Change it to a real URL, something like
    file:////Host/shared/file.xml
    Four / is probably correct, although you may have to try it with three.

  • Connection Refused Exception (imap protocol configuration in james server)

    hai if i use pop3 protocol i can read the message from the james server
    but if i use imap protocol i'm getting the exception connection refused.
    what shall i do?

    Sounds like a question to ask in the Apache James forum.
    The server doesn't seem to be set up to accept IMAP connections.

  • Erratic connection refused exception

    Hi all,
    I have a thread in my program that periodically tries to do a Naming.lookup to a remote machine, and proceeds to do other things if there is no exception (this may be compared roughly to pinging the remote server to see if it is up and running).
    While this works fine on most occasions, I sometimes get exceptions like:
            Connection refused to host: remotehost; nested exception is:
            java.net.ConnectException: Connection refused: no further informationfor no apparent reason. This persists for a few cycles of the thread, after which, again for no apparent reason, my client is able to do a Naming.lookup as usual.
    I've made sure that the network connection between the two machines is active, and both of them are alive when these exceptions occur, so I'm not able to pin down the problem.
    I'm starting up a rmiregistry instance in the remote server using LocateRegistry.createRegistry(1099), instead of starting the rmiregistry program from the command line. Could this be a cause for problem?
    I'm using Windows 2000 server with jre 1.3.1 on both machines.
    Thanks,
    Sudarshan

    1. Sometimes just putting in a retry works. Set up a loop and do a naming and if a connection error, wait a few seconds and try it again.
    2. Why do you need multiple look-ups? Once your client gets the remote object there is no longer any need for the RMI Registry. Save the remote object and call the Server directly.

  • Invocation time Exception (java.rmi.ConnectException: Connection refused to

    Hi folks,
    SERVER = LINUX
    CLIENT = WINDOWS 200
    JAVA VERSION : 1.4.2
    Object obj = Naming.lookup("rmi://x.x.x.x:5578/MyServer");
    System.out.println("Object ="+obj); // Works fine and return stub as shown in o/p
    MyServer_Stub server = (MyServer_Stub)obj;
    server.validate(); // throws following Connection refused exception
    -----OUTPUT-----
    Object =com.MyServer_Stub[RemoteStub [ref: [endpoint:[x.x.x.x:42360](remote),objID:[a981ca:10722cb9411:-8000, 0]]]]
    java.rmi.ConnectException: Connection refused to host: x.x.x.x.x; nested exception is:
         java.net.ConnectException: Connection refused: connect
         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 com.MyServer_Stub.validate(Unknown Source)/b]
         at tescasees.testbyexample.rmi.MyServerChangesTestApplication.main
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
         at java.net.Socket.connect(Socket.java:452)
         at java.net.Socket.connect(Socket.java:402)
         at java.net.Socket.<init>(Socket.java:309)
         at java.net.Socket.<init>(Socket.java:124)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
         ... 5 more
    Exception in thread "main"
    [b] Why does java system throws exception at invoke time not connection time at lookup time</b]
    Any suggestion...
    Regards,
    Manoj

    > Are you getting this from a lookup()? If so it means the Registry you are looking for at rmi://x.x.x.x:5578 is not present.
    I am getting it at the time when I invoke the method validate on the object returned from lookup.
    --Manoj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Connection refused is not raising an exception

    Hi, I am having problems getting my code to recognise that a url refuses a connection, eg "http://tigers.com.au".
    Opening the url in a browser correctly shows that a connection is refused.
    However, in Java (1.6_07) code as below, no exception is raised, and the response code is 200 OK.
    Even though no exception is raised, the content that is returned by the InputStream is actually from somewhere else (my local development server), so it seems that the connection is not actually successful.
    The code works fine for other urls that does accept a connection, eg it works fine for "http://www.tigers.com.au".
    Why is my code not raising an exception for cases where the url refuses a connection? Or is there a bug in Java?
    Grateful for any help.
              BufferedReader in = null;
              String s=null;
              HttpURLConnection urlCon = null;
              URL url = null;
              try {
                   url = new URL("http://tigers.com.au");
                   urlCon = (HttpURLConnection) url.openConnection(); 
                   urlCon.connect();
                   System.out.println("urlCon after connect: "+urlCon.getURL());
                         System.out.println("Response code: ["+urlCon.getResponseCode()+"] "+urlCon.getResponseMessage());
                   in = new BufferedReader( new InputStreamReader(urlCon.getInputStream()));
                   while ( (s=in.readLine()) != null) {
                        System.out.println("s: "+s);                    
              catch (Exception e) {
                   System.out.println("Exception: "+e);
              }

    Have found that wildcard addresses matches any address of the local system, and that in IPv4, the wildcard address is 0.0.0.0. Can check for this with InetAddress.isAnyLocalAddress().
    This means that I could potentially handle these cases by adding code to "ping" a host such as "tigers.com.au" using
    InetAddress address = InetAddress.getByName(name);
    if (InetAddress.isAnyLocalAddress() {
    .... do something, eg raise exception
    }But this is not fully satisfactory, as I would rather know that a "connection refused" exception is raised, which is actually the case with "tigers.com.au" (as all the browsers seem able to detect). I am not entirely sure what the relationship is between a site that has "connection refused" and it returning an ip address of 0.0.0.0. I don't think they are synonymous.
    Any thoughts?

  • RMI connection refused

    Hello to all,
    I have created and completed an RMI chat application and tested it on my localhost. It worked all right.
    Now I want to make it live i.e. run it through internet.
    Is it same as running on localhost only we have to change the IP address for locating registry.
    I have done that and uploaded the server file on host, also I have the IP address of that host.
    I have replaces localhost whit the give IP address but connection refused exception is thrown.
    I have located the registry on the server through IP address then when I use
    Registry reg=LocateRegistry("xx.xx.xx.xxx");
    System.out.println("1");
    chatAppIF chatStub=(chatAppIF)Naming.lookup("rmi://xx.xx.xx.xxx:xxxx/service");
    System.out.println("2");
    int i=chatStub.logMeIn(user,pass);
    System.out.println("3");Output screen shows
    1
    2
    Client exception: java.rmi.ConnectException: Connection refused to host: xx.xx.xx.xxx; nested exception is:
            java.net.ConnectException: Connection refused: connectWhile when i use
    Registry reg=LocateRegistry("xx.xx.xx.xxx");
    System.out.println("1");
    chatAppIF stub=(chatAppIF)reg.lookup("service");
    System.out.println("2");
    int i=chatStub.logMeIn(user,pass);
    System.out.println("3");it give output as
    1
    Client exception: java.rmi.ConnectException: Connection refused to host: xx.xx.xx.xxx; nested exception is:
            java.net.ConnectException: Connection refused: connectIs there is difference between naming.lookup() and reg.lookup() method?
    I think Naming.lookup() finds the registry but cannot find the method logMeIn() while reg.lookup() has no success.
    anyway why the connection is refused?

    The argument to Naming.bind()/rebind()/unbind() and Naming.lookup() is a URI of the form rmi://hostname[:port]/path.
    The argument to Registry.bind()/rebind()/unbind() and Registry.lookup() is just the path part.
    The data returned by Naming.list() is an array of URIs.
    The data returned by Registry.list() is an array of paths.
    In other words Naming.list() returns items which can be used as arguments to Naming.lookup(), and Registry.list() returns items which can be used as arguments to Registry.lookup().
    The reason is that when you construct a Registry, via LocateRegistry.getRegistry(), you supply the host and port at that point, so specifying it again in the bind/lookup string would be redundant. There's nothing stopping you doing that but the resulting name won't be compatible with what Naming.bind() would have done.

  • HttpConnection.getResponseCode generates a Connection Refused exeption

    I have the following problem:
    I connect to a webserver, this works fine. Then I write data to the webserver, this also works fine. After writing the data, I determine the http response code to see if everything was successfull. Every so often this generates a "connection refused" exception. This happens even after the connect and the write were successfull. I find this strange, since I was able to connect and write data (this data has arrived at the server because I can log it there without a problem).
    Can anyone explain this behaviour to me, because I am lost here.
    Mark

    Have found that wildcard addresses matches any address of the local system, and that in IPv4, the wildcard address is 0.0.0.0. Can check for this with InetAddress.isAnyLocalAddress().
    This means that I could potentially handle these cases by adding code to "ping" a host such as "tigers.com.au" using
    InetAddress address = InetAddress.getByName(name);
    if (InetAddress.isAnyLocalAddress() {
    .... do something, eg raise exception
    }But this is not fully satisfactory, as I would rather know that a "connection refused" exception is raised, which is actually the case with "tigers.com.au" (as all the browsers seem able to detect). I am not entirely sure what the relationship is between a site that has "connection refused" and it returning an ip address of 0.0.0.0. I don't think they are synonymous.
    Any thoughts?

  • 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 --------------------

  • Connection refused, but works on diff computer

    Ok, i'm opening a connection to a web server using ssl (jsse) and this WAS working great. But now when I try to run the same code that was working on this computer (and still works upstairs) i get:
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
    at ..............
    The line of code that is causing this problem is
    OutputStream outputStream = null;
    outputStream = conn.getOutputStream(); <- RIGHT HERE
    the conn was setup and is not null because I can getURL() on it and it's context has been setup, so everything seems to be ok with the connection but once I try to get an output stream it blows with that connection refused exception. I have set doOutput to true aswell:
    conn.setDoOutput(true);
    Like I said, this code works on a different computer now and used to work on this one. If anyone knows what could have happened to this machine I could appreciate any help.
    (used to work but now it doesn't box)
    JDK 1.4.1
    Intel processor
    Windows 2000
    (still works box)
    JRE 1.4.1 (no jdk)
    Intel processor
    Windows NT
    Thanks a bunch
    -Dave

    And can you ping the other computer from the one that doesn't work?

  • Connection refused with HTTPS

    Hello,
    We have created a webservice deployed to WebLogic Server 9.2. It requires secure transport using the annotation
    @UserDataConstraint(transport=UserDataConstraint.Transport.CONFIDENTIAL)
    We're able to test this successfully using an XSmiles client browser.
    However, I've written a Java client started with "clientgen" that runs successfully when connecting in nonsecure mode (annotation removed) to a local instance. But when I try to connect to our remote server in secure mode I get "connection refused" (the lengthy call stack is copied below).
    The client code is also copied below (a few strings and IPs were changed). It's able to retrieve the WSDL, but then bombs when calling a port method. This is probably something simple but I've followed tutorials and have not found reference to this particular error on forums or via Google. Any ideas would be appreciated!
    Thanks,
    CJ
    = = = = = = = =
    System.setProperty ("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
    java.security.Security.addProvider (new com.sun.net.ssl.internal.ssl.Provider());
    // must define .trustStoreType, .trustStore, and .trustStorePassword
    System.setProperty("javax.net.ssl.trustStore", "c:\\client-keytool.ts");
    System.setProperty("javax.net.ssl.trustStorePassword", "password");
    System.setProperty("javax.net.ssl.trustStoreType", "JCEKS");
    System.setProperty("weblogic.wsee.client.ssl.stricthostchecking", "false");
    System.out.println ("Connecting to the webservice...");
    PatientRegistrationService service = new PatientRegistrationService_Impl ("https://domain/ws/services/PatientRegistrationPort?WSDL");
    PatientRegistrationPort port = service.getPatientRegistrationPort();
    SecurityQuestionRequestType request = new SecurityQuestionRequestType();
    RequestHeaderType requestHeader = new RequestHeaderType();
    requestHeader.setApplication("x");
    requestHeader.setAppLoginId("x");
    requestHeader.setAppPassword("x");
    request.setRegistrationRequest (requestHeader);
    System.out.println ("Calling getSecurityQuestion method...");
    SecurityQuestionResponseType response = port.getSecurityQuestion (request);
    System.out.println ("...just called getSecurityQuestion.");
    = = = = = = = =
    Connecting to the webservice...
    Calling getSecurityQuestion method...
    Exception in thread "Main Thread" java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server] FaultString [Failed to send message using connection:(SoapClientConnection@41626058 <transport=(HTTPSClientTransport@41626055 <url=https://IPADDRESS:9223/domain/ws/PatientRegistrationPort>)>)Connection refused: connect] FaultActor [null] Detail [<detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0"></bea_fault:stacktrace>java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Ljava.net.InetAddress;II)V(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.Socket.connect(Socket.java:507)
         at java.net.Socket.connect(Socket.java:457)
         at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
         at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:280)
         at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:337)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:176)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:744)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:162)
         at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:836)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
         at weblogic.wsee.connection.transport.http.HTTPClientTransport.send(HTTPClientTransport.java:161)
         at weblogic.wsee.connection.soap.SoapConnection.send(SoapConnection.java:54)
         at weblogic.wsee.connection.soap.SoapClientConnection.send(SoapClientConnection.java:89)
         at weblogic.wsee.ws.dispatch.client.ConnectionHandler.handleRequest(ConnectionHandler.java:89)
         at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:127)
         at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:100)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:101)
         at weblogic.wsee.ws.WsStub.invoke(WsStub.java:89)
    </detail>]; nested exception is:
         javax.xml.rpc.soap.SOAPFaultException: Failed to send message using connection:(SoapClientConnection@41626058 <transport=(HTTPSClientTransport@41626055 <url=https://IPADDRESS:9223/domain/ws/PatientRegistrationPort>)>)Connection refused: connect
         at test.wsclient.PatientRegistrationPort_Stub.getSecurityQuestion(PatientRegistrationPort_Stub.java:337)
         at test.client.TestClient4.main(TestClient4.java:80)
    Caused by: javax.xml.rpc.soap.SOAPFaultException: Failed to send message using connection:(SoapClientConnection@41626058 <transport=(HTTPSClientTransport@41626055 <url=https://IPADDRESS:9223/domain/ws/PatientRegistrationPort>)>)Connection refused: connect
         at weblogic.wsee.codec.soap11.SoapCodec.decodeFault(SoapCodec.java:259)
         at weblogic.wsee.ws.dispatch.client.CodecHandler.decodeFault(CodecHandler.java:105)
         at weblogic.wsee.ws.dispatch.client.CodecHandler.decode(CodecHandler.java:90)
         at weblogic.wsee.ws.dispatch.client.CodecHandler.handleFault(CodecHandler.java:78)
         at weblogic.wsee.handler.HandlerIterator.handleFault(HandlerIterator.java:254)
         at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:224)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(ClientDispatcher.java:161)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:116)
         at weblogic.wsee.ws.WsStub.invoke(WsStub.java:89)
         at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:335)
         at test.wsclient.PatientRegistrationPort_Stub.getSecurityQuestion(PatientRegistrationPort_Stub.java:332)
         ... 1 more
    Caused by: weblogic.wsee.handler.InvocationException: Failed to send message using connection:(SoapClientConnection@41626058 <transport=(HTTPSClientTransport@41626055 <url=https://IPADDRESS:9223/domain/ws/PatientRegistrationPort>)>)
         at weblogic.wsee.ws.dispatch.client.ConnectionHandler.handleRequest(ConnectionHandler.java:91)
         at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:127)
         at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:100)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:101)
         ... 4 more
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Ljava.net.InetAddress;II)V(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.Socket.connect(Socket.java:507)
         at java.net.Socket.connect(Socket.java:457)
         at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
         at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:280)
         at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:337)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:176)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:744)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:162)
         at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:836)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
         at weblogic.wsee.connection.transport.http.HTTPClientTransport.send(HTTPClientTransport.java:161)
         at weblogic.wsee.connection.soap.SoapConnection.send(SoapConnection.java:54)
         at weblogic.wsee.connection.soap.SoapClientConnection.send(SoapClientConnection.java:89)
         at weblogic.wsee.ws.dispatch.client.ConnectionHandler.handleRequest(ConnectionHandler.java:89)
         at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:127)
         at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:100)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:101)
         at weblogic.wsee.ws.WsStub.invoke(WsStub.java:89)

    Never mind, my silly mistake!
    Thanks to http://jordan.fortwayne.com/oracle/oralinux.html
    I realized that I had forgotten to do 'lsnrctl start'
    R. Inamdar (guest) wrote:
    : I downloaded Oracle 805 for Linux. I was able to successfully
    : able to connect to the test database and issue queries with
    : SVRMGRL. However, I get a 'Connection Refused' exception
    : while connecting through the JDBC sample program.
    : How do I enable diagnostics. I tried
    : TRACE_LEVEL_LISTENER = SUPPORT
    : but no trace file was created.
    : What am I doing wrong. Thanks for the help...
    : My evironment is:
    : JDK1.1.7
    : Linux Red Hat 5.2
    : Thin JDBC driver
    : Code fragment:
    : DriverManager.registerDriver(new
    jdbc.driver.OracleDriver());
    : Connection conn =
    : DriverManager.getConnection (
    : "jdbc:oracle:thin:@localhost.localdomain:1521:test",
    : "system",
    : "manager"
    : I tried with "localhost" in place of "localhost.localdomain"
    : without success.
    : Following is my listener.ora
    : # Installation Generated Net8 Configuration
    : # Version Date: Jun-17-97
    : # Filename: Listener.ora
    : LISTENER =
    : (ADDRESS_LIST =
    : (ADDRESS= (PROTOCOL= IPC)(KEY= test))
    : (ADDRESS= (PROTOCOL= IPC)(KEY= PNPKEY))
    : (ADDRESS= (PROTOCOL= TCP)(Host=
    : localhost.localdomain)(Port= 1521))
    : SID_LIST_LISTENER =
    : (SID_LIST =
    : (SID_DESC =
    : (GLOBAL_DBNAME= localhost.localdomain.)
    : (ORACLE_HOME= /usr/local/oracle/805)
    : (SID_NAME = test)
    : (SID_DESC =
    : (SID_NAME = extproc)
    : (ORACLE_HOME = /usr/local/oracle/805)
    : (PROGRAM = extproc)
    : STARTUP_WAIT_TIME_LISTENER = 0
    : CONNECT_TIMEOUT_LISTENER = 10
    : TRACE_LEVEL_LISTENER = OFF
    : # TRACE_LEVEL_LISTENER = SUPPORT
    : # TRACE_FILE_LISTENER = lsnr
    : # TRACE_DIRECTORY_LISTENER=/usr/local/oracle/805/network/trace
    null

  • Error while deploying module with iasdeploy : Exception while createXmlDocument() : connection refused

    Hi to you all,
    I work with iAS 6.0 sp2 on Solaris.
    For 1 day, I get that exception when trying to deploy or remove my modules (servlets + JSP) with the iasdeploy tool :
    Exception while createXmlDocument()
    java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native method)
    at com.netscape.server.deployment.WebbAppReg.run(compiled code)
    at com.netscape.server.deployment.WebbAppReg.main(Unknown source)
    The war archive is put in the JAR directory, unpacked in the APPS/modules directory, but the servlets of the module have the null GUID in the registry ({000000 000000 000000}. And so, I have the GX error when trying to invoke them.
    What appends ? Is it a iAS process which is unable ?
    Please help !
    Paul-Emile

    I think you have not put the xml files in the war file.
    You need to put them under WEB-INF/ directory. Manually generate the guids using kguidgen script and try to deploy the war module. It should work fine. If it doesnot work please send me the file. So that I can further investigate and find out where exactly the problem is.Other wise you can use the deploytool.
    Please let me know if this works fine.
    Thanks for visiting our web forum.

  • Java.lang.Exception: IOException in sending Request :: Connection refused:

    Hi all,
    I am a new to Oracle 10g.I am using Enterprise manager for DBA jobs.After ogging in to enterprise manager, when i click the refresh button, i get the folllowing error
    " java.lang.Exception: IOException in sending Request :: Connection refused: connect"
    Please do help to slove this problem.
    Thanks

    I'm having the same error in my console header. Here is the content of the emagent.trc file.
    Running 10gR2 on Win 2K3 server. (bold added for readability)
    emctl status dbconsole responds with 'EM Daemon is not running'
    2007-03-29 14:02:23 Thread-1776 ERROR pingManager: nmepm_pingReposURL: Did not receive a response header from repository
    2007-03-29 14:02:23 Thread-1776 WARN main: clear collection state due to OMS_version difference
    2007-03-29 14:02:23 Thread-1776 WARN command: Job Subsystem Timeout set at 600 seconds
    2007-03-29 14:02:24 Thread-1776 WARN upload: Upload manager has no Failure script: disabled
    2007-03-29 14:02:24 Thread-1776 WARN upload: Recovering left over xml files in upload directory
    2007-03-29 14:02:24 Thread-2920 ERROR command: nmejcn: received no status header from repository at http://dB_Domain:5500/em/upload/
    2007-03-29 14:02:24 Thread-1776 WARN upload: Recovered 0 left over xml files in upload directory
    2007-03-29 14:02:25 Thread-1776 WARN metadata: Metric collectSnapshot does not have any data columns
    2007-03-29 14:02:27 Thread-1776 WARN metadata: Metric Disk_Path does not have any data columns
    2007-03-29 14:02:27 Thread-1776 WARN metadata: Metric osm_diskGroupPolicies does not have any data columns
    2007-03-29 14:02:53 Thread-1776 WARN TargetManager: Regenerating all Metadata
    2007-03-29 14:05:17 Thread-1776 ERROR util.files: ERROR: nmeufis_new: failed in lfiopn on file: E:\oracle\product\10.2.0\db_3\dB_Domain_SIGD\sysman\emd\agntstmp.txt. error = 2 (No such file or directory)
    2007-03-29 14:05:28 Thread-1776 ERROR collector: nmecs_validateStateFile(): state file invalid : E:\oracle\product\10.2.0\db_3\dB_Domain_SIGD\sysman\emd\state\snapshot
    2007-03-29 14:05:28 Thread-1776 ERROR collector: Collector state files cleaned, severity will be resent
    2007-03-29 14:05:35 Thread-3660 ERROR upload: Error in uploadXMLFiles. Trying again in 60.00 seconds.
    2007-03-29 14:05:48 Thread-676 ERROR upload: Failed to delete/move xml file C:\WINDOWS\TEMP\X11.uod, ret = -2 ; agent exiting
    2007-03-29 14:05:48 Thread-676 ERROR : Signalled to Exit with status 3
    2007-03-29 14:05:48 Thread-1776 ERROR main: EMAgent abnormal terminating
    2007-03-29 14:06:29 Thread-2996 WARN command: Job Subsystem Timeout set at 600 seconds
    2007-03-29 14:06:29 Thread-2996 WARN upload: Upload manager has no Failure script: disabled
    2007-03-29 14:06:29 Thread-2996 WARN upload: Recovering left over xml files in upload directory
    2007-03-29 14:06:29 Thread-2996 WARN upload: Recovered 5 left over xml files in upload directory
    2007-03-29 14:06:29 Thread-2996 WARN upload: Merging leftover data file named errors.dat
    2007-03-29 14:06:29 Thread-2996 WARN upload: Merging leftover data file named severity.dat
    2007-03-29 14:06:30 Thread-2996 WARN upload: Merging leftover data file named rawdata.dat
    2007-03-29 14:06:30 Thread-2996 WARN metadata: Metric collectSnapshot does not have any data columns
    2007-03-29 14:06:31 Thread-2996 WARN metadata: Metric Disk_Path does not have any data columns
    2007-03-29 14:06:31 Thread-2996 WARN metadata: Metric osm_diskGroupPolicies does not have any data columns
    2007-03-29 14:07:29 Thread-2328 ERROR util.files: nmeufile_getLength: Error in lfilen. Error = 2 (No such file or directory)
    2007-03-29 14:15:19 Thread-1960 WARN http: 268,-1: nmehl_httpListener: signaled to exit from emctl
    Thank you for your help!
    Message was edited by:
    david.d

  • Java.lang.Exception: IOException is sending Request :: Connection refused

    Hi, everybody.
    Oracle Database Control 10g displays on the home page the following message
    -- java.lang.Exception: IOException is sending Request :: Connection refused
    after killing some database lock that is impeding the users to successfully carry out their daily activities.
    What could be the reason ?

    agent come with db was not working on that time

Maybe you are looking for

  • Sleep/wake button not working - fixing in Israel?

    Hi all, I'm a proud owner of an iPhone 5. In the last week I've noticed that my Sleep/wake button is not functioning. I've Googled it a little and understood that it's a common problem, and if I'll step into a Apple store in the US they will replace

  • How to call java implementations from C language

    How to call java implementations from C language.... I know using JNI java can call C code....is the converse also possible???? -Rams

  • Very slow login window on wake

    My MacBook Air is very slow to wake to the login screen. It asks for my password every time, as I like it, but every time I open the lid, it's a good 10 seconds before I can even type my password. The screen turns on, but the text box isn't selected

  • Why doesn't Mail on my iPhone filter out Junk mail?

    Can anyone tell me why Mail on my iPhone 4 does not appear to filter out Junk mail? Maybe I'm oversimplifying things but I would have assumed the same features and functionality as in Mail for OS-X i.e. you can mark any mail received as 'Junk' if the

  • Cisco ap3700 802.11ac wireless brigde

    Can i use the 3702e with ios software and a directional antenne as an 802.11ac wireless bridge for inter-building connectivity ? What is the expected speed of a wireless bridge link with a typical inter-building distance of 40 to 60 m ?