Address already in use: connect

Dear all,I've got always this following exception, if I get three times the method getDimensionTree. This method simply reads one dimension tree in Essbaseand constructs a DataTreeModel (like JTree) with the member names.The source is like a sample code from Hyperion, but whyever it is crashing using the EES 6.5 with Essbase 6.5.3.I believe, that the connections aren't removed. But however the getConnections-iterator is always returning null. And I debug the logsbefore and after a connect and disconnect, to be sure everything is closed.I tried this with Essbase 7.0 and EDS 7.0 and it works perfect, but I am not allowed to use the version 7 because of other tools combination. There I am using the m_olapServer.connect(true, false), whichis not available at the 6.5 JAPI. Therefore there is apublic void connect(boolean useEesSvrAtOlapSvrNode) throws EssException with useEesSvrAtOlapSvrNode - If true, the enterprise server at the node where this olap server resides is used to traffic the requests between the JAPI client and the olap server. If false, the enterprise server that authenticated the user is used to traffic the requests.but I cannot understand the sense of the parameter flag. But I think that this doesn't matter.22:03:15,171 ERROR [EssbaseQuery] com.essbase.api.base.EssException: Cannot connect to enterprise server. Address already in use: connectcom.essbase.api.base.EssException: Cannot connect to enterprise server. Address already in use: connect at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:177) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.openConnection(EssOrbPluginTcpip.java:164) at com.essbase.api.session.EssOrbPluginTcpip.invokeMethod(EssOrbPluginTcpip.java:79) at com.essbase.api.session.EssOrbPluginTcpip.invokeMethod(EssOrbPluginTcpip.java:68) at com.essbase.api.session.EssOrbPlugin.getChildMemberNames(EssOrbPlugin.java:454) at com.essbase.api.base.EssCollection.getMembers(EssCollection.java:201) at com.essbase.api.base.EssCollection.<init>(EssCollection.java:59) at com.essbase.api.metadata.EssMember.getChildMembers(EssMember.java:871) at de.ebcot.bsctool.dw.essbase.EssbaseQuery.traverseDimension(EssbaseQuery.java:206)     public DataTreeModel getDimensionTree() throws DWException {          m_olapServer = (IEssOlapServer) m_domain.getOlapServer(m_config.getProperty(NamesEssbase.KEY_OLAP_SERVER_NAME));          // Open connection with olap server          m_olapServer.connect(true);          m_olapServer.setClientCachingEnabled(true);          m_olapServer.updatePropertyValues();        DataTreeModel   returnValue = null;        IEssCubeOutline cubeOutline = null;        try        {            cubeOutline = m_olapServer.getApplication(config.getProperty(NamesEssbase.KEY_APPLICATION_NAME)).getCube(config.getProperty(                    NamesEssbase.KEY_DATABASE_NAME)).openOutline();            IEssIterator  dims           = cubeOutline.getDimensions();            IEssDimension foundDimension = (IEssDimension) dims.getAt(0);            Node root = new Node(foundDimension.getDimensionRootMember().getName());            traverseDimension(root, foundDimension.getDimensionRootMember());            returnValue = new DataTreeModel(root);        } catch (EssException x) {            LOG.error(x, x);            throw new DWException("Failure while reading dimension members from cube: " + x.getMessage());        } finally {            try            {                if (cubeOutline.isOpen())                {                    LOG.debug("Closing cube...");                    cubeOutline.close();                    LOG.debug("Cube closed.");                } } catch (EssException x) {                LOG.error(x, x);                throw new DWException("Cannot close the cube: " + x.getMessage());            } } return returnValue; } // recursivley traverse of the tree to get every node private void traverseDimension(Node node, IEssMember mbr) throws EssException {           IEssIterator mbrs = mbr.getChildMembers(false);           for (int i = 0; i < mbrs.getCount(); i++)           {               NodeCombination child = new NodeCombination(((IEssMember) mbrs.getAt(i)).getName());               node.addNode(child);               traverseDimension(child, (IEssMember) mbrs.getAt(i));           } }Kind regards,Oliver Wolff

We are seeing a similar exception, after not many calls:
{http://xml.apache.org/axis/}stackTrace:java.net.BindException: Address already in use: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:391)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:252)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:239)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:385)
at java.net.Socket.connect(Socket.java:543)
at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)

Similar Messages

  • Closed TCP connection throws "Address already in use:connect"

    Hello,
    I am writing a deamon that has to connect to a server from a well-specified local port number.(very imp. constraint)
    Evry time I have to write something on server's output stream I do:
    public synchronized void sendMsg(byte[] msg) throws IOException {
         //#1
         clientSocket = new Socket();
         clientSocket.setReuseAddress(true); //so i can bind even when in TIME_WAIT
         clientSocket.setKeepAlive(false); //optional, but i guess no harm here
         clientSocket.bind(localSocketAddress); //local address is correct
         clientSocket.connect(hostSocketAddress); //.. and so is the host address
         //#2
         clientSocket.getOutputStream().write(msg);
         clientSocket.getOutputStream().flush();
         clientSocket.shutdownOutput();//optional..
         clientSocket.close();// so I DO close the socket
    After the 1st successfull attempt to write to the server,
    a call to sendMsg(..) is throwning a "Address already in use: connect" IOExc.
    The problem comes from clientSocket.connect() but that's odd since I closed the socket in earlier call..
    I think the physical connection is not closed, although the clientSocket.close() returned..
    So I put the code from //#1 to //#2 into a loop that catches the exception, attempts to close and sleeps
    for a while(1 sec).. but no use! it seems looping forever...
    Is there a way I can force the connection be closed so I can create a new one safely?
    [I can't reuse the same connection for multiple calls - it's ugly and the server may close it anyway..]
    Any hint, ideea?
    Thank you
    L

    1st becasue it's ugly to maintain a connection for
    daysYes. But it is also ugly to continuely close and open a socket.
    The solution is to add a timeout which closes the connection if it has not been used for a certain amount of time.
    2nd because the server may close it [and i can't stop
    him for doing that]
    So you add retry logic. But given that you are using TCP you must be guaranteeing delivery so you have to have retry logic if the server isn't up in the first place right? The same logic is used if the connection has failed.

  • Web Service Client, BindException, Address already in use, saaj.SOAPExcepti

    Hello,
    Am caught up with an error and i can't get past it, need some help here.
    My application is a batch processing web service client, reads some input rows, sends web service requets, processes the responses and logs it.
    The application runs well in normal mode, but under load(more thread count), I get this wierd error and I can't make it go away.
    java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
    Caused by: java.net.BindException: Address already in use: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    I have properly closed the connections after each web service calls, but it still says Address in use. Please refer below for the complete stack trace and a piece of the code. Am using SAAJ and JWSDP and am not using AXIS api. I have searched the web but couldn't find any solutions.
    This is not an error that server is not closing connections properly as I was able to test with SOAPUI and LoadRunner with even higher threads and it ran without problems. SOAPUI and LoadRunner scripts were executed from the same client machine as my application uses. Please help.
    For each inputrow
    SOAPConnection connection = null;
    try
    SOAPConnectionFactory soapConnFactory = SOAPConnectionFactory.newInstance();
    connection = soapConnFactory.createConnection();
    SOAPMessage request = getRequest(inputRow);
    SOAPMessage response = connection.call(request, "http://<<server>>:<<port no>>/Domain/Services/Mgmt");
    finally
    if (connection != null)
    connection.close();                         
    }catch(SOAPException se){
    System.out.println("Error while closing connection. " + se.getMessage());
    connection = null;
    } // End of for loop
    Stack Trace:
    java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptio
    nImpl: Message send failed
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
    PConnection.java:121)
    at ClientImpl.getResponse(ClientImpl.java:440)
    at input.InputSampler$MyCallable.call(Sampler.java:63)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
    at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
    PConnection.java:325)
    at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
    ost.run(HttpSOAPConnection.java:150)
    ... 12 more
    Caused by: java.net.BindException: Address already in use: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at 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.http.HttpClient.<init>(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
    Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour
    ce)
    at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown S
    ource)
    at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
    PConnection.java:282)
    Is there something like connection pooling for web services, is that the answer to this issue, if yes, please let me know where i should start.
    Thanks
    Dev

    Move server socket creation out of while loop. You don't need to create new server socket every time.

  • Error establishing socket. Address already in use

    Running CFMX 6.1 on Win2k3, I just recently started getting
    these errors from connections to one of our SQLServer database
    servers (2000, enterprise):
    quote:
    Error Executing Database Query.[Macromedia][SQLServer JDBC
    Driver]Error establishing socket. Address already in use: connect
    Any ideas what might cause this?

    ok. well, if you think that was useless, you might as well
    not read on... this isnt a coldfusion error. it only appears that
    way because you are using cfml. this is a most probably an SQL
    issue. i say most probably, because there are many reasons this
    could be happening. try doing things in these steps as they are in
    degrees of harshness.
    1. check the server event log, see if you have an entry like
    this
    'You are running a version of Microsoft SQL Server 2000 or
    Microsoft SQL Server 2000 Desktop Engine (also called MSDE) that
    has known security vulnerabilities when used in conjunction with
    the Microsoft Windows Server 2003 family. To reduce your computer's
    vulnerability to certain virus attacks, the TCP/IP and UDP network
    ports of Microsoft SQL Server 2000, MSDE, or both have been
    disabled. To enable these ports, you must install a patch, or the
    most recent service pack for Microsoft SQL Server 2000 or MSDE from
    [L=http://www.microsoft.com/sql/downloads/default.asp]http://www.microsoft.com/sql/downlo ads/default.asp[/L]
    [L=http://www.microsoft.com/sql/downloads/default.asp'</[/L]]http://www.microsoft.com/sql/downloads/default.asp'</[/L][/L]
    install sp4
    [L=http://www.microsoft.com/sql/downloads/2000/sp4.mspx]http://www.microsoft.com/sql/down loads/2000/sp4.mspx[/L]
    2. change your database server name to its IP (if that doesnt
    work, you might as well change it back)
    3. make sure you are authenticating with an SQL account.
    windows integrated authentication does not work well ... in your
    SQL enterprise manager, set it to mixed authentication in the
    security tab, select SQL server and windows authentication. the
    microsoft driver seems to not handle the windows authentication
    properly. i wouldnt use the the SA account, create another one just
    for this purpose.
    4. under the general tab in your enterprise manager click
    network configuration. enable TCP/IP which is not enabled by
    default
    5. Install SQL Server 2000 sp3 or sp4
    and here are some other useless articles you might want to
    read...
    Know bug in SQL Server preventing it from listening on port
    1433
    [L=http://support.microsoft.com/default.aspx?scid=kb;en-us;306865]http://support.microsoft .com/default.aspx?scid=kb;en-us;306865[/L]
    [L=http://support.microsoft.com/default.aspx?scid=kb;en-us;329329]http://support.microsoft .com/default.aspx?scid=kb;en-us;329329[/L]
    info on clustered SQL servers
    [L=http://support.microsoft.com/default.aspx?scid=kb;en-us;815431]http://support.microsoft .com/default.aspx?scid=kb;en-us;815431[/L]

  • JDBC "Address already in use"

    CF7 on Windows 2003, using a separate Win2K3 box for SQL 2000
    db...
    Of late, we are seeing web application errors and
    intermittent log entries like these:
    "Error","jrpp-11","03/20/08","23:34:56","mycfdnsname","Error
    Executing Database Query.[Macromedia][SQLServer JDBC Driver]Error
    establishing socket to host and port: dbserver1:1433. Reason:
    Address already in use: connect The specific sequence of files
    included or processed is:
    D:\hosting\mysite.com\httpdocs\myfile.cfm, line: 45 "
    Coupled with that, SQL 2000's SQL Profiler tool indicates
    that many connections (ExistingConnection) are being created for
    that CF DSN (and others on the server), even though that DSN is
    marked for connection pooling (Maintain Connections). Restarting CF
    solves the problem temporarily, but after a while, it begins to
    happen again.
    We are up-to-date on all patches and JDBC drivers. I'm not
    sure what this error means, let alone how to troubleshoot it
    properly. Suggestions?

    scferda wrote:
    > Of late, we are seeing web application errors and
    intermittent log entries like
    > these:
    >
    >
    "Error","jrpp-11","03/20/08","23:34:56","mycfdnsname","Error
    Executing
    > Database Query.[Macromedia][SQLServer JDBC Driver]Error
    establishing socket to
    > host and port: dbserver1:1433. Reason: Address already
    in use: connect The
    > specific sequence of files included or processed is:
    > D:\hosting\mysite.com\httpdocs\myfile.cfm, line: 45 "
    You are running ut of ephemeral ports. Set a lower
    TcpTimedWaitDelay and
    a higher MaxUserPort in your registry. MS has a KB article on
    that.
    Jochem
    Jochem van Dieten
    Adobe Community Expert for ColdFusion

  • Address already in use: JVM_Bind error in DOS

    Hello,
    I am writing a multi threaded client server (Both client and server are multi threaded) program.where I have set of clients performing secure file transfer amongst them self. Here there is a Indexing server who is keeping record of all the files contained by clients. A client will make a request for a file to the Indexing Server which intern return the port no. and address of the client having that file. Now this client will connect to another client (Which now will act as server) to get the file and public key .
    Now I am connecting to server by using fix port number.
    Socket client = new Socket("127.0.0.1",2345)
    Also since the request for file from another client can come therefor I am creating a thread to start listning port on client side by,
    serverSocket serversocket = new serverSocket(client.getLocalport);
    //provided that connection to server with port 2345 already made.
    but when I am running this program through "DOS" it is giving me an error Address already in use: JVM_Bind.
    //checked through netstat and found that localport for the client is bound to 2345 (That is obvious)
    But when I am running this program in unix I am getting no error.

    ServerSocket.setReuseAddress(true) does not work on vista. Why? The following code is OK on XP, but throw the above exception on vista.
         @Test
         public void test() throws Throwable {
              Thread t = new Thread() {
                   public void run() {
                        ServerSocket ss;
                        try {
                             ss = new ServerSocket( 11111 );
                             System.out.println( "In Thread: " + ss );
                             System.out.println( "In Thread: " + ss.accept() );
                        } catch (IOException e) {
                             e.printStackTrace();
              t.start();
              Socket cs = new Socket( (String)null, 11111 );
              System.out.println( cs );
              ServerSocket s = new ServerSocket();
              s.setReuseAddress( true );
              s.bind( new InetSocketAddress( cs.getLocalPort() ) );
              System.out.println( s );
         }

  • "BindException: Address already in use" error all the time!

    I made a simple program that streams lines of text across the network/internet and a simple client program to display that text. The problem is, regardless of what port I choose, I always get this exception on the server's side:
    C:\Users\Nathan\Desktop>java LyricalUploader
    Started Listening
    Bound
    Started Listening
    Starting.java.net.BindException: Address already in use: JVM_Bind
            at java.net.PlainSocketImpl.socketBind(Native Method)
            at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
            at java.net.ServerSocket.bind(ServerSocket.java:319)
            at java.net.ServerSocket.<init>(ServerSocket.java:185)
            at java.net.ServerSocket.<init>(ServerSocket.java:97)
            at LyricalUploader.main(LyricalUploader.java:11)What bothers me is it creates the ServerSocket just fine (that's what the output saying "Bound" means) and if I replace the new LyricalThread(ss.accept()).start(); line in the code below with new LyricalThread(ss.accept()).run();, it works fine, It just can't handle more than one client. I have tried many many ports and they all have the same result. What am I doing wrong?
    Here is the code:
    import java.net.*;
    import java.io.*;
    import javax.swing.JFileChooser;
    public class LyricalUploader{
    public static void main(String args[]){
      ServerSocket ss = null;
      int c=0;
      try{
        while(true){
          System.out.println("Started Listening");
          ss = new ServerSocket(49625);
          System.out.println("Bound");
          new LyricalThread(ss.accept()).start();
      catch(Exception e){
        e.printStackTrace();
        System.exit(1);
    import java.net.*;
    import java.io.*;
    public class LyricalThread extends Thread{
      Socket s = null;
      public LyricalThread(Socket so){
        s=so;
      public void run(){
        try{
          System.out.print("Starting.");
          PrintWriter out = new PrintWriter(s.getOutputStream());
          BufferedReader fin =new BufferedReader(new FileReader("Lyrics.txt"));
          System.out.print(".");
          String line = fin.readLine();
          System.out.println(".Done!");
          while(true){
            while(line!=null){
              out.println(line);
              //System.out.println(line);
              line=fin.readLine();
              Thread.sleep(1600);
            fin.close();
            System.out.println("End of Lyrics.txt file.");
            fin =new BufferedReader(new FileReader("Lyrics.txt"));
        catch(Exception e){
          e.printStackTrace();
          return;
      public static void main(String arg[]){
        new LyricalThread(null).start();
    }And the Client code:
    import java.net.*;
    import java.io.*;
    import javax.swing.JFileChooser;
    public class LyricalReader{
      public static void main(String args[]) throws Exception{
        Socket s = null;
        BufferedReader sin = null;
        FileOutputStream out = null;
        try{
          System.out.println("Started");
          System.out.print("Connecting...");
          s = new Socket("2.9.19.94",49625);
          System.out.println("Done!");
          System.out.print("Finding song...");
          sin = new BufferedReader(new InputStreamReader(s.getInputStream()));
          String line = sin.readLine();
          System.out.println("Done!\nStarted reading:\n\n\n\n\n\n");
          while(true){
            System.out.println(line);
            line = sin.readLine();
        }catch(Exception e){
          e.printStackTrace();
          sin.close();
          s.close();
          out.close();
        System.exit(0);
    }

    Hi,
    your Server must create only one ServerSocket, not multiples! So write
      try{
        ss = new ServerSocket(49625);
        System.out.println("Bound");
        while(true){
          System.out.println("Started Listening");
          new LyricalThread(ss.accept()).start();
      catch(Exception e){
        e.printStackTrace();
        System.exit(1);
      }and take the creation of the ServerSocket outside the while-loop.
    Martin

  • Ftp (GNU inetutils) 1.6 error : [ftp: bind: Address already in use]

    hi,
    recently I discovered that I cant connect to many ftp servers using the common command line ftp client from a 64bit archlinux box.
    I tried connecting from other PCs at the same network (iMac) and it works without problems, the error is general, shows with every ftp server I tried,
    the client connects and then freezes or returns an error (depending on the ftp server)
    ftp: bind: Address already in use
    I got no firewall or iptables rules, I installed ncftp with pacman and it works, so I assume it's a ftp (GNU) client error,
    thanks
    GL

    Hi,
    see
    http://forum.java.sun.com/thread.jsp?forum=136&thread=417946
    http://forum.java.sun.com/thread.jsp?forum=136&thread=430814
    -- markus.

  • Address already in use

    Hi Guys!
    I'm using Oracle9ias 9.0.3. When I execute
    $opmnctl startall, I get the next error in all instances (<instance>.default_island.1):
    java.net.BindException: Address already in use
    at java.net.PlainSocketImpl.socketBind(Native Method)
    I have 3 instances, each one with different port rmi, configured in opmn.xml.
    I used -Drmi.debug=true -Drmi.verbose=true in java-options and I got in the log:
    RMIServer.DEBUG: using OPMN, address is ZERO_ADDRESS, use local address instead
    RMIServer.DEBUG: creating RMIServer ServerSocket for address: antares.txp/127.0.0.1 port: 3114
    RMIServer.DEBUG: Launching RMIServer thread
    RMIServer.DEBUG: creating RMIServer ServerSocket for local address: antares.txp/127.0.0.1 port: 3114
    at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:447)
    at java.net.ServerSocket.<init>
    Any idea??
    Thanks!
    Carlos Guerra

    Try to use netstat -an to see if there is anything listening on this port (you should see "LISTEN" on far right on line). There is no process id or whatever, you just know there is a server socket open - might be a different program, might be a running instance incorrectly shuted down...
    On the left there is a local address, on right there is a remote address (might be a connection from the same host, of course)
    If there is nothing running before starting server, there is probably a port mismatch in your settings (i. e. rmi port for next started instance is the same as jms or http port of prevous one... I don't know about all of the ports settings.
    Sometimes, especially on Windows there is a situation when server socket is not correctly closed and you have to restart Windows itself.
    Myrra

  • Address already in use: make_sock

    Hi folks,
    I am getting an error with iAS 10.1.2.0.2. When it happens I cannot connect to my httpd server. The error log shows errors like
    [Tue Nov 28 05:11:24 2006] [crit] (98)Address already in use: make_sock: could not bind to address 127.0.0.1 port 7201
    I know that the obvious answer is that there is some other process that is using port 7201 on the machine, however there is no evidence of there being one.
    $ opmnctl status
    Processes in Instance: GAR.pserv0082.us.oracle.com
    ------------------------------------------------+---------
    ias-component | process-type | pid | status
    ------------------------------------------------+---------
    DSA | DSA | N/A | Down
    LogLoader | logloaderd | N/A | Down
    dcm-daemon | dcm-daemon | N/A | Down
    OC4J | home | 13931 | Alive
    OC4J | oc4j_GAR | 13930 | Alive
    HTTP_Server | HTTP_Server | 13932 | Alive
    # lsof | grep '7201 '
    httpd 13932 ora10gr2 15u IPv4 411698105 TCP localhost.localdomain:7201 (LISTEN)
    httpd 13958 ora10gr2 15u IPv4 411698105 TCP localhost.localdomain:7201 (LISTEN)
    httpd 13960 ora10gr2 15u IPv4 411698105 TCP localhost.localdomain:7201 (LISTEN)
    httpd 13961 ora10gr2 15u IPv4 411698105 TCP localhost.localdomain:7201 (LISTEN)
    httpd 13962 ora10gr2 15u IPv4 411698105 TCP localhost.localdomain:7201 (LISTEN)
    httpd 13963 ora10gr2 15u IPv4 411698105 TCP localhost.localdomain:7201 (LISTEN)
    httpd 13964 ora10gr2 15u IPv4 411698105 TCP localhost.localdomain:7201 (LISTEN)
    httpd 13965 ora10gr2 15u IPv4 411698105 TCP localhost.localdomain:7201 (LISTEN)
    # netstat -a | grep 7201 | more
    tcp 0 0 localhost.localdomain:7201 *:* LIST
    EN
    While ompn is running only the iAS user is accessing the port 7201.
    Now we will shut the iAS down.
    $ opmnctl stopall
    opmnctl: stopping opmn and all managed processes...
    $ opmnctl status
    Unable to connect to opmn.
    Opmn may not be up.
    # lsof | grep '7201 '
    # netstat -a | grep 7201 | more
    So from what I can make out, no other process is using port 7201.
    Port 7201 is referenced in dms.conf
    Listen 127.0.0.1:7201
    OpmnHostPort http://127.0.0.1:7201
    Any views on what might be causing the error.

    Hi All, thank you all for your replies. I think I may have found the culprit for this error.
    When we see the following
    $ grep 7200 *.conf
    dms.conf:Redirect /dms0/AggreSpy http://127.0.0.1:7200/dmsoc4j/AggreSpy
    dms.conf:Listen 127.0.0.1:7200
    dms.conf:OpmnHostPort http://127.0.0.1:7200
    dms.conf:<VirtualHost 127.0.0.1:7200>
    The error I got was
    [Fri Dec  1 04:31:45 2006] [crit] (98)Address already in use: make_sock: could not bind to address 127.0.0.1 port 7200
    I decided to remove the virtual host (using iasconsole) and changed the The dms.conf opmn directives to a completely different value
    When we see the following
    dms.conf:Redirect /dms0/AggreSpy http://127.0.0.1:20000/dmsoc4j/AggreSpy
    dms.conf:Listen 127.0.0.1:20000
    dms.conf:OpmnHostPort http://127.0.0.1:20000
    I then used iasconsole to recreate the VirtualHost.
    So far, the error has not occured in nearly 4 days, so it's looking pretty good. It is strange that I'm getting this error having just completed a default install. If the error does happen again, I'll update this post.
    Thanks again for all of your suggestions.

  • Address already in use,Please help me!

    I install solaris in vm6.
    At first ,it will run fine,but today when i restart it , I get these error
    inetd[337]:Failed to bind to the port of service instance svc:/network/swat/tcp:default,proto tcp:Address already in use.
    Too many bind failures for instance svc:/network/swat/tcp/:default, transitioning to maintenance
    in.ndpd[333] :solicit_event:giving up on pcn0
    syslogd:line 24:WARNING:loghost could not be solved.then i can login but when i connect it with ssh , I will be disconnected every 1-2 minutes,Please help me,
    Thanks very much

    Have you received any help on this issue..I'm seeing the same thing on one of my servers, alhoug I don't get disconnected...This error is spitting out to the console upon boot up..

  • Error: Address already in use - on loading publisher portlets

    Hi Guys,
    We get the following error msg when we access our portal homepage (which contains a set of publisher portlets: Error details: OKHttpException - Exception occured while processing HTTP request.
    Request processing stage was [1 - Trying to establish a socket connection to the remote host.]
    Bytes sent: [0]; Bytes received: [0]
    Error description: [Address already in use: no further information].
    I'll appreciate if anyone has come across this before and can give a pointer as to what is causing it and how it can be fixed. e.g. What address is already in use? BTW, the error seem to occur very infrequently; as in occassionally, and when one refreshes the page, the content items are then rendered ok. Any clues will be greatly appreciated. Thnks.
    Edited by obkalu at 11/16/2007 12:53 PM

    Control-Z does "stop" the process, but it doesn't kill it. Use Control-C to do that. Then, you may have to wait a couple of minutes for the OS to free up your socket until you can try again.

  • Bind address already in use

    Hello all,
    I have a strange problem with TCP sokets.
    on a SunOS5.9 Sparc machine i am running a server progam
    which has the sequence,
    socket()
    bind()
    listen()
    connect().....
    do lots of processing with the clients (around 28 clients)
    close()
    sleep(30)
    server restart the above sequence
    when restarting i get a bind error:
    Address already in Use.
    i have verifeid that the socket is close, return value of close is 0.
    Is it possible that socket resources are not released by kernel?
    Is tuning the value of tcp_time_wait_interval to a low value will help to get the code running.
    Or is there any other tunbale parameter to be tuned out.
    Please help me to resolve this.
    Thanks.

    Hello all,
    I have a strange problem with TCP sokets.
    on a SunOS5.9 Sparc machine i am running a server progam
    which has the sequence,
    socket()
    bind()
    listen()
    connect().....
    do lots of processing with the clients (around 28 clients)
    close()
    sleep(30)
    server restart the above sequence
    when restarting i get a bind error:
    Address already in Use.
    i have verifeid that the socket is close, return value of close is 0.
    Is it possible that socket resources are not released by kernel?
    Is tuning the value of tcp_time_wait_interval to a low value will help to get the code running.
    Or is there any other tunbale parameter to be tuned out.
    Please help me to resolve this.
    Thanks.

  • Ipv4 mapped addresses bind problem: address already in use.

    Hello. It's me again with another, may be newbie, question.
    This time I observe different behavior binding different type of ip addresses on tcp sockets. For instance
    - when I bind ipv4 mapped addresses, if there is a remaining old socket in TIME_WAIT state from a previous run
    I get the error 'Address already in use', event with SO_REUSEADDR set.
    - when I bind another type of ipv6 or just ipv4 addresses. if there if a remaining old socket in TIME_WAIT state from
    a previous run, the bind is successful (SO_REUSEADDR is set).
    How can be explained this behavior?
    Thanks a lot.
    Details
    =======
    I made a small program to test this. This program:
    - dump the addresses to be used in bind() and connect()
    - creates a LISTEN SOCKET calling
    - socket(AF_INET6, SOCK_STREAM, 0)
    - fcntl(F_SETFD, fcntl(F_GETFD) | FD_CLOEXEC)
    - fcntl(F_SETFL, fcntl(F_GETFL) | O_NONBLOCK),
    - setsockopt(SO_REUSEADDR),
    - setsockopt(SO_KEEPALIVE),
    - setsockopt(TCP_NODELAY),
    - bind()
    - listen()
    - creates a CONNECTING SOCKET calling
    - socket(AF_INET6, SOCK_STREAM, 0)
    - fcntl(F_SETFD, fcntl(F_GETFD) | FD_CLOEXEC)
    - fcntl(F_SETFL, fcntl(F_GETFL) | O_NONBLOCK),
    - setsockopt(SO_REUSEADDR),
    - setsockopt(SO_KEEPALIVE),
    - setsockopt(TCP_NODELAY),
    - connect()
    - creates a ACCEPTED SOCKET calling
    - accept()
    - fcntl(F_SETFD, fcntl(F_GETFD) | FD_CLOEXEC)
    - fcntl(F_SETFL, fcntl(F_GETFL) | O_NONBLOCK),
    - setsockopt(SO_REUSEADDR),
    - setsockopt(SO_KEEPALIVE),
    - setsockopt(TCP_NODELAY),
    - issue a std::system( "netstat -an | grep 10329" )
    - wait with select() for a write event in the CONNECTING SOCKET
    - wait with select() for a write event in the ACCEPTED SOCKET
    - close the accepted socket
    - close the connecting socket
    - close the listen socket
    - issue another std::system( "netstat -an | grep 10329" )
    - exit(0)
    Note: please don't get confused with my notation of addresses, the last component, after the last colon, is the port.
    I run it with ipv4 mapped listen address, with this result:
    $ ./test_reuseaddr listen_address=0.0.0.0:10329 connect_address=127.0.0.1:10329
    Listener in *'::ffff:0.0.0.0:10329'*
    1a 00 28 59 00 00 00 00 00 00 00 00 00 00 00 00 |..(Y............|
    00 00 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 |................|
    Connect to '::ffff:127.0.0.1:10329'
    1a 00 28 59 00 00 00 00 00 00 00 00 00 00 00 00 |..(Y............|
    00 00 ff ff 7f 00 00 01 00 00 00 00 00 00 00 00 |................|
    Creating listen socket
    Creating connecting socket
    Creating accepted socket
    netstat -an | grep 10329
    *.10329 *.* 0 0 49152 0 LISTEN
    127.0.0.1.35114 127.0.0.1.10329 49152 0 49152 0 ESTABLISHED
    127.0.0.1.10329 127.0.0.1.35114 49152 0 49152 0 ESTABLISHED
    Closing connecting socket
    Closing accepted socket
    Closing listen socket
    netstat -an | grep 10329
    *127.0.0.1.10329 127.0.0.1.35114 49152 0 49152 0 TIME_WAIT*
    Immediately run it again the same way, with this result (Address already in use):
    $ ./test_reuseaddr listen_address=0.0.0.0:10329 connect_address=127.0.0.1:10329
    Listener in *'::ffff:0.0.0.0:10329'*
    1a 00 28 59 00 00 00 00 00 00 00 00 00 00 00 00 |..(Y............|
    00 00 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 |................|
    Connect to '::ffff:127.0.0.1:10329'
    1a 00 28 59 00 00 00 00 00 00 00 00 00 00 00 00 |..(Y............|
    00 00 ff ff 7f 00 00 01 00 00 00 00 00 00 00 00 |................|
    Creating listen socket
    *### SYSCALL ERROR: bind(): 125, Address already in use*
    Wait and verify that the TIME_WAIT socket has disappeared
    $ sleep 120
    $ netstat -an | grep 10329
    Now run the same program with normal ipv6 listen addresses
    $ ./test_reuseaddr listen_address=*::0*:10329 connect_address=127.0.0.1:10329
    Listener in *':::10329'*
    1a 00 28 59 00 00 00 00 00 00 00 00 00 00 00 00 |..(Y............|
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
    Connect to '::ffff:127.0.0.1:10329'
    1a 00 28 59 00 00 00 00 00 00 00 00 00 00 00 00 |..(Y............|
    00 00 ff ff 7f 00 00 01 00 00 00 00 00 00 00 00 |................|
    Creating listen socket
    Creating connecting socket
    Creating accepted socket
    netstat -an | grep 10329
    *.10329 *.* 0 0 49152 0 LISTEN
    127.0.0.1.35115 127.0.0.1.10329 49152 0 49152 0 ESTABLISHED
    127.0.0.1.10329 127.0.0.1.35115 49152 0 49152 0 ESTABLISHED
    *.10329 *.* 0 0 49152 0 LISTEN
    Closing connecting socket
    Closing accepted socket
    Closing listen socket
    netstat -an | grep 10329
    *127.0.0.1.10329 127.0.0.1.35115 49152 0 49152 0 TIME_WAIT*
    Immediately run it again the same way (no error this time)
    $ ./test_reuseaddr listen_address=*::0*:10329 connect_address=127.0.0.1:10329
    Listener in *':::10329'*
    1a 00 28 59 00 00 00 00 00 00 00 00 00 00 00 00 |..(Y............|
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
    Connect to '::ffff:127.0.0.1:10329'
    1a 00 28 59 00 00 00 00 00 00 00 00 00 00 00 00 |..(Y............|
    00 00 ff ff 7f 00 00 01 00 00 00 00 00 00 00 00 |................|
    Creating listen socket
    Creating connecting socket
    Creating accepted socket
    netstat -an | grep 10329
    127.0.0.1.10329 127.0.0.1.35115 49152 0 49152 0 TIME_WAIT
    *.10329 *.* 0 0 49152 0 LISTEN
    127.0.0.1.35116 127.0.0.1.10329 49152 0 49152 0 ESTABLISHED
    127.0.0.1.10329 127.0.0.1.35116 49152 0 49152 0 ESTABLISHED
    *.10329 *.* 0 0 49152 0 LISTEN
    Closing connecting socket
    Closing accepted socket
    Closing listen socket
    netstat -an | grep 10329
    *127.0.0.1.10329 127.0.0.1.35115 49152 0 49152 0 TIME_WAIT*
    *127.0.0.1.10329 127.0.0.1.35116 49152 0 49152 0 TIME_WAIT*
    Run it againg many times with no error.

    sunlover1984 wrote:
    Sorry, to use such short forms in forums as i dont know much about this. i rarly use java forum. well, i removed the code that i gave u for server starting. but still it is giving me the same error. this time i put it in a java bean file.(Hint "u" is just another short form).
    Did you try the suggestion to put a log statement just before you start the server? Or put a breakpoint at that line and see how often it is reached.
    Because the only reason for this problem is that something is already listening at that port.
    And if there's really nothing listening before you start you application, then only your application itself can listen there already, so the logical conclusion for me would be that you're starting the Server twice.

  • Unable to bind socket: Address already in use

    Hi,
    I get the following error whenever I start my Application Server on Linux machine.
    If I deploy the EJB application onto a OC4J instance, the server is refusing the connection by throwing Connection Refused error.
    Any insight about this issue will be helpful.
    Thanks,
    Mohan
    04/07/08 17:14:42 Error starting ORMI-Server. Unable to bind socket: Address already in use
    04/07/08 17:14:44 Oracle Application Server Containers for J2EE 10g (9.0.4.0.0) initialized
    04/07/08 17:14:44 java.lang.NullPointerException
    04/07/08 17:14:44 at com.evermind.server.rmi.RMIServer.run(RMIServer.java:470)
    04/07/08 17:14:44 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Releasabl
    eResourcePooledExecutor.java:186)
    04/07/08 17:14:44 at java.lang.Thread.run(Thread.java:534)

    have you checked to see what is running before you start your oracle app server on your ports? you can use netstat for one

Maybe you are looking for

  • "get all new data request by request" after compressing source Cube

    Hi I need to transfer data from one Infocube to another and use the Delta request by request. I have tried this when data on Source Infocube was not compressed and it worked. Afterwards some requests were compressed and after that the delta request b

  • IAS 9i R2 on Windows 2003

    Hello, I didn't try to install iAS9iR2 (9.0.2.0.1) on WIN2003, so could someone tell me is there some problem during this instalation, i meen is posible to install iAS 9.0.2.0.1 on WIN2003. I saw that mentioned iAS is not certified for WIN2003. Must

  • Blank panel in Photoshop CS5

    people, please help... http://incomum.mine.nu/10-06-17asdf/Capturar.JPG When I load the panel, it comes blank,

  • Tare weight specific to HU level - how calc. total Tare ?

    Working on 4.7 ext. set 200 Wish to implement Handling Unit Management. When a HU is generated the system appears to only take in to account the packaging specific to that level when calculating the Tare weight. For example Gross weight of carton + c

  • Newland Tours

    I'm reading Dreamweaver 8 with ASP, ColdFusion, and PHP: Training from the Source Lesson 11: Building Search Interfaces I'm having trouble with diplaying multiple recordsets. I did everything that the book told me to do, but it just doesn't work. I j