Problem managing keepalive with sockets

Hello friends, I am finding difficulty to manage keepalives in my socket-based client/server app. Please help.
I want to set a socket timeout so that the connection is closed by server after a set inactivity time. Theoretically, this is a cakewalk, because I can setSoTimeout on the socket. I set it to 30 min. This works fine in my local machine. But after I deploy the server on the remote machine (OS Linux Redhat), the soTimeout setting doesn't work. Client stops responding after about 5 minutes of inactivity. My problem is why this is happening and how can I solve this.
The code I am using is like this:
Socket  socket = ...;//obtain socket somehow
InputStream in = socket.getInputStream();
try{
  socket.setSoTimeout(30*60*1000);
  String fromClient = in.readLine();//blocking read
  //..do something with the message
catch(Exception e){
  System.out.println(e);
}When the connection goes dead (after about 5 min), no exception is caught at the above catch clause, why?
My guess is that a socket timeout of 5 min is set somewhere in the host machine, but if it is so, I have no idea where to check and how to reset. If the solution lies on the Linux side rather than on the Java side, ideally I would like to set a timeout value per socket (per app basis) so that my setting would not mess with other apps.
As an alternative, the client can be programmed (but have not tried yet) to send a dummy message every 2 or 3 min to keep the connection alive. But doing so would keep connection alive for ever, which I don't want.
What options are available to me?

the socket get disconnected once when there is no reply from the client ,so your time out won't work in case there is no reply from client , program such a way that a dummy conversation occurs between the client and server ,when there is no actual conversation ,then the timeout could work for you.

Similar Messages

  • Problems managing ipod with itunes

    I can no longer exchange music from my ipod or my music server with itunes.  I used to be able to.  Now itunes just freezes up:  task manager says "not responding" and I have to shut down.

    Hello bertoydvm,
    It sounds like your iTunes application is becoming unresponsive when it tries accessing the library on your server. I would use the troubleshooting in the following article to help you out there, named:
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    Thank you for using Apple Support Communities.
    Regards,
    Sterling

  • Big Fish Games stop working in Mavericks.  What do I do? I have re-installed them and the manager app, and nothing.  I have not gotten an answer from Big Fish tech staff.  Thought the problem might be with Maverick.  all the games worked with Snow Leopard

    Big Fish Games stop working in Mavericks.  What do I do? I have re-installed them and the manager app, and nothing.  I have not gotten an answer from Big Fish tech staff.  Thought the problem might be with Maverick.  all the games worked with Snow Leopard
    Any body have this kind of problem.  What was done to correct it. . .

    I can't wait to get a new phone as well. LG Revolution owners should be comped for this phone if Verizon intends to keep them as customers.

  • Problem managing keys/certificates with SunPKCS11

    Hi:
    I am trying to create a small applet to manage certificates stored on a smart card using SunPKCS11. I can successfully import a key/certificate from a P12 file, however I have some problems managing keys and certificates that appears to be related.
    First, creating a KeyStore entry creates one object with one alias. But reading the card from another application such as safesign, I see a public object with the chosen alias but the private key appears with no alias specified. if I import the whole certificate chain, only the certificate will have the chosen alias the others will have no defined alias.
    Everything works ok, I can sign with the certificate on the card. But managing certificates and keys becomes incompatible with other applications, if multiple keys . Is there some way I can specify the alias so it will show for the private object?
    Secondly, I cannot get the installed certificate from my java application without authenticating. Other applications can read the certificate, authentication is required only to access the private object.
    I see further that if I delete the private object with safesign but let the certificates remain, I no longer get any certificates or keys when listing from SunPKCS11, while safesign still lists the certificates. Also, I can't access the card read only to list certificates.
    I think these things are related: SunPKCS11 creates and sees only one object which is protected if it has been created with SetKeyEntry.
    Is there any way to gain more fine grained control over the key store with SunPKCS11?
    Thanks, Erik

    i came up with the same problem. Can you tell me your way to deal with it ?
    thanks!
    [email protected]

  • Newbie with Sockets. Speed problem

    Hi. I am newbie with Sockets. I have read java socket tutorials and wrote these two classes. The client tries to transfer file of 13MB to the server. This is done in internal network. Client and Server use 100Mb network cards. The problem I have is speed of transfer. It takes 4-5 sec to transfer this file.
    13MB * 8 / 5sec = 20Mb/s
    It seems slow to me considering that network cards are 100Mbit. I would expect to get at least 50-70Mb/s. It is my home network and noone else is using it.
    So, what I am doing wrong?
    public class Client {
    public Client() {
    public static void main(String[] args) {
    try {
    FileInputStream in1 = new FileInputStream("c:\\Documents and Settings\\Pavel\\jbproject\\untitled1\\src\\tryw\\test.txt");
    InetAddress addr = InetAddress.getByName("server");
    Socket s = new Socket(addr, 5000);
    OutputStream out = s.getOutputStream();
    BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
    System.out.println((new Date(System.currentTimeMillis())).toString());
    byte[] buffer1 = new byte[1024];
    int g;
    while ((g=in1.read(buffer1))!=-1 ) {
    out.write(buffer1);
    System.out.println((new Date(System.currentTimeMillis())).toString());
    s.close();
    System.out.println((new Date(System.currentTimeMillis())).toString());
    }catch(Exception e){System.out.println(e.getMessage()); }}}
    public class Server {
    public Server() {
    public static void main(String[] args) {
    ServerSocket s = null;
    try {
    s = new ServerSocket(5000);
    while (true) {
    StringBuffer buffer = new StringBuffer();
    // Wait for a connection request from a client
    System.out.println("Waiting");
    Socket clientConn = s.accept();
    InputStream in = clientConn.getInputStream();
    OutputStream out = clientConn.getOutputStream();
    PrintWriter outp = new PrintWriter(out, true);
    BufferedReader inp = new BufferedReader(new InputStreamReader(in));
    String inputLine = null;
    Date date = new Date(System.currentTimeMillis());
    System.out.print(date.toString());
    while ((inputLine = inp.readLine()) != null) {
    buffer.append(inputLine);
    if (inputLine.equals("Bye."))
    break;
    Date date1 = new Date(System.currentTimeMillis());
    System.out.println(date1.toString());
    System.out.println(buffer.length());
    }catch(Exception e){System.out.println(e.toString());try {s.close();}catch(Exception he) {}}}}

    you probably want the buffering to occur under the PrintWriter, not the other way around, ie the buffering should be closest to the raw socket.
    You can bump up the size of the Buffering in the ctor, that might help.
    You can also gulp bigger blocks on the read.

  • Manage it with File or with Socket Programming?

    I want to view a directory in a FTP Server and it's sub directory
    I think there are 3 method to achieve it :
    first, with Socket.For this one,I have to read the FTP protocol.
    second, transform that directory into a InputStream.
    Then read every line from the InputStream and judge every line if it's a directory or a file.Then read the sub directory,so and so on.
    This is a very heavy method.
    Third,new a File from the directory.But "File(URI uri)" requires a URI with a "file" scheme.
    I know that there is a package sun.net.ftp, but it's not pure java.
    so,
    How can I get a File class from a FTP resource?
    or is there any other method that I can achieve it?

    I wonder if I can achieve it in Pure Java.
    Because my software will be used in many different
    platform
    There is also samba:
    http://jcifs.samba.org/
    jCIFS is not Samba and yes it's 100% Java. In fact it's quite small and fast. Faster than the C clients believe it or not (although it uses more system resources).
    Mike

  • Error starting managed server with JRockit VM

    I getting this error when i start the server with Jrockit VM 3.1 with -Xthinthreads
    option on. The OS is NT. Any clues , please ?
    exception: couldn't initialize IOPort: The parameter is incorrect.
    (error 87, fd 824) - with nested exception:
    [java.lang.RuntimeException: java.io.IOException: couldn't initialize IOPort
    e parameter is incorrect.
    D:\i252\services>runtxnserver
    JRockit build 3.1.4-CROSIS-20020429-1505, Thin Threads, Generational Concurr
    Garbage Collector, started.
    [JRockit] Starting Management Server on port 7090
    Starting WebLogic Server ....
    Connecting to http://ocncat2:7991...
    <May 10, 2002 11:50:59 AM PDT> <Error> <NT Performance Pack> <Problem on fd:
    4', socket: 'weblogic.rjvm.t3.T3JVMConnection@111'
    java.io.IOException: couldn't initialize IOPort: The parameter is incorrect.
    (error 87, fd 824)
    at weblogic.socket.NTSocketMuxer.registerSockInIoPort(Native Method)
    35c4a
    at weblogic.socket.NTSocketMuxer.register(Compiled Code)@23e34e90
    at weblogic.rjvm.t3.T3JVMConnection.createConnection(Compiled Code)@
    2410
    at weblogic.rjvm.Protocol.createConnection(Compiled Code)@23e321b0
    at weblogic.rjvm.ConnectionManager.findOrCreateConnection(Compiled C
    @23e31b90
    at weblogic.rjvm.ConnectionManager.bootstrap(Compiled Code)@23e315b0
    at weblogic.rjvm.ConnectionManager.bootstrap(Compiled Code)@23e30d00
    at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(Compiled Cod
    3e30810
    at weblogic.rjvm.RJVMManager.findOrCreate(Compiled Code)@23e307b0
    at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(Compiled Code)@
    0660
    at weblogic.rjvm.RJVMFinder.findOrCreate(Compiled Code)@23e3001c
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(Compiled Code)@23d7fa00
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(C
    led Code)@23d7ec10
    at weblogic.jndi.Environment.getContext(Compiled Code)@23d7e600
    at weblogic.jndi.Environment.getInitialContext(Compiled Code)@23d7e5
    at weblogic.management.Admin.initializeRemoteAdminHome(Compiled Code
    d7db70
    at weblogic.management.Admin.start(Compiled Code)@23d7c060
    at weblogic.t3.srvr.T3Srvr.initialize(Compiled Code)@23590d00
    at weblogic.t3.srvr.T3Srvr.run(Compiled Code)@23590240
    at weblogic.Server.main(Compiled Code)@23590050
    --- End of stack trace
    >
    <May 10, 2002 11:51:00 AM PDT> <Emergency> <Configuration Management> <Error
    tected attempting to connect to admin server at http://ocncat2:7991 during i
    alization of managed server ( null:7551 ). The reported error was: < java.io
    xception: couldn't initialize IOPort: The parameter is incorrect.
    (error 87, fd 824) > This condition generally results when the managed and
    n servers are using the same listen address and port.>
    <May 10, 2002 11:51:00 AM PDT> <Emergency> <Server> <Unable to initialize th
    rver: 'Fatal initialization exception
    Throwable: weblogic.management.configuration.ConfigurationException: java.io
    xception: couldn't initialize IOPort: The parameter is incorrect.
    (error 87, fd 824) - with nested exception:
    [java.lang.RuntimeException: java.io.IOException: couldn't initialize IOPort
    e parameter is incorrect.
    (error 87, fd 824)]
    java.lang.RuntimeException: java.io.IOException: couldn't initialize IOPort:
    parameter is incorrect.
    (error 87, fd 824)
    at weblogic.socket.NTSocketMuxer.register(Compiled Code)@23e34e90
    at weblogic.rjvm.t3.T3JVMConnection.createConnection(Compiled Code)@
    2410
    at weblogic.rjvm.Protocol.createConnection(Compiled Code)@23e321b0
    at weblogic.rjvm.ConnectionManager.findOrCreateConnection(Compiled C
    @23e31b90
    at weblogic.rjvm.ConnectionManager.bootstrap(Compiled Code)@23e315b0
    at weblogic.rjvm.ConnectionManager.bootstrap(Compiled Code)@23e30d00
    at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(Compiled Cod
    3e30810
    at weblogic.rjvm.RJVMManager.findOrCreate(Compiled Code)@23e307b0
    at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(Compiled Code)@
    0660
    at weblogic.rjvm.RJVMFinder.findOrCreate(Compiled Code)@23e3001c
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(Compiled Code)@23d7fa00
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(C
    led Code)@23d7ec10
    at weblogic.jndi.Environment.getContext(Compiled Code)@23d7e600
    at weblogic.jndi.Environment.getInitialContext(Compiled Code)@23d7e5
    at weblogic.management.Admin.initializeRemoteAdminHome(Compiled Code
    d7db70
    at weblogic.management.Admin.start(Compiled Code)@23d7c060
    at weblogic.t3.srvr.T3Srvr.initialize(Compiled Code)@23590d00
    at weblogic.t3.srvr.T3Srvr.run(Compiled Code)@23590240
    at weblogic.Server.main(Compiled Code)@23590050
    --- End of stack trace
    --------------- nested within: ------------------
    weblogic.management.configuration.ConfigurationException: java.io.IOExceptio
    ouldn't initialize IOPort: The parameter is incorrect.
    (error 87, fd 824) - with nested exception:
    [java.lang.RuntimeException: java.io.IOException: couldn't initialize IOPort
    e parameter is incorrect.
    (error 87, fd 824)]
    at weblogic.management.Admin.initializeRemoteAdminHome(Compiled Code
    d7db70
    at weblogic.management.Admin.start(Compiled Code)@23d7c060
    at weblogic.t3.srvr.T3Srvr.initialize(Compiled Code)@23590d00
    at weblogic.t3.srvr.T3Srvr.run(Compiled Code)@23590240
    at weblogic.Server.main(Compiled Code)@23590050
    --- End of stack trace
    '>
    The WebLogic Server did not start up properly.
    Exception raised: weblogic.management.configuration.ConfigurationException:
    .io.IOException: couldn't initialize IOPort: The parameter is incorrect.
    (error 87, fd 824) - with nested exception:
    [java.lang.RuntimeException: java.io.IOException: couldn't initialize IOPort
    e parameter is incorrect.
    (error 87, fd 824)]
    java.lang.RuntimeException: java.io.IOException: couldn't initialize IOPort:
    parameter is incorrect.
    (error 87, fd 824)
    at weblogic.socket.NTSocketMuxer.register(Compiled Code)@23e34e90
    at weblogic.rjvm.t3.T3JVMConnection.createConnection(Compiled Code)@
    2410
    at weblogic.rjvm.Protocol.createConnection(Compiled Code)@23e321b0
    at weblogic.rjvm.ConnectionManager.findOrCreateConnection(Compiled C
    @23e31b90
    at weblogic.rjvm.ConnectionManager.bootstrap(Compiled Code)@23e315b0
    at weblogic.rjvm.ConnectionManager.bootstrap(Compiled Code)@23e30d00
    at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(Compiled Cod
    3e30810
    at weblogic.rjvm.RJVMManager.findOrCreate(Compiled Code)@23e307b0
    at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(Compiled Code)@
    0660
    at weblogic.rjvm.RJVMFinder.findOrCreate(Compiled Code)@23e3001c
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(Compiled Code)@23d7fa00
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(C
    led Code)@23d7ec10
    at weblogic.jndi.Environment.getContext(Compiled Code)@23d7e600
    at weblogic.jndi.Environment.getInitialContext(Compiled Code)@23d7e5
    at weblogic.management.Admin.initializeRemoteAdminHome(Compiled Code
    d7db70
    at weblogic.management.Admin.start(Compiled Code)@23d7c060
    at weblogic.t3.srvr.T3Srvr.initialize(Compiled Code)@23590d00
    at weblogic.t3.srvr.T3Srvr.run(Compiled Code)@23590240
    at weblogic.Server.main(Compiled Code)@23590050
    --- End of stack trace
    --------------- nested within: ------------------
    weblogic.management.configuration.ConfigurationException: java.io.IOExceptio
    ouldn't initialize IOPort: The parameter is incorrect.
    (error 87, fd 824) - with nested exception:
    [java.lang.RuntimeException: java.io.IOException: couldn't initialize IOPort
    e parameter is incorrect.
    (error 87, fd 824)]
    at weblogic.management.Admin.initializeRemoteAdminHome(Compiled Code
    d7db70
    at weblogic.management.Admin.start(Compiled Code)@23d7c060
    at weblogic.t3.srvr.T3Srvr.initialize(Compiled Code)@23590d00
    at weblogic.t3.srvr.T3Srvr.run(Compiled Code)@23590240
    at weblogic.Server.main(Compiled Code)@23590050
    --- End of stack trace

    I found the solution . The reason for this is that JRockit's High Performance Thread
    System uses asynchrounous I/O "under the hood". Weblogic's Native I/O is also asynchronous.
    The two asynchronous I/O systems clash and the result is the error you see.
    There are two ways around this problem. Either disable JRockit's High Performance
    Thread System (or thinthreads) by using the -Xnativethreads command line flag, or
    disable Weblogic's Native I/O.
    For Weblogic 6.0 and higher, edit the config.xml file. Find the line saying NativeIOEnabled="true"
    and change this to NativeIOEnabled="false".
    For Weblogic 5.1 you edit the file weblogic.properties and change the line weblogic.system.nativeIO.enable=true
    to
    weblogic.system.nativeIO.enable=false
    "Manoj jayadevan" <[email protected]> wrote:
    >
    I getting this error when i start the server with Jrockit VM 3.1 with -Xthinthreads
    option on. The OS is NT. Any clues , please ?
    exception: couldn't initialize IOPort: The parameter is incorrect.
    (error 87, fd 824) - with nested exception:
    [java.lang.RuntimeException: java.io.IOException: couldn't initialize IOPort
    e parameter is incorrect.
    D:\i252\services>runtxnserver
    JRockit build 3.1.4-CROSIS-20020429-1505, Thin Threads, Generational Concurr
    Garbage Collector, started.
    [JRockit] Starting Management Server on port 7090
    Starting WebLogic Server ....
    Connecting to http://ocncat2:7991...
    <May 10, 2002 11:50:59 AM PDT> <Error> <NT Performance Pack> <Problem on
    fd:
    4', socket: 'weblogic.rjvm.t3.T3JVMConnection@111'
    java.io.IOException: couldn't initialize IOPort: The parameter is incorrect.
    (error 87, fd 824)
    at weblogic.socket.NTSocketMuxer.registerSockInIoPort(Native Method)
    35c4a
    at weblogic.socket.NTSocketMuxer.register(Compiled Code)@23e34e90
    at weblogic.rjvm.t3.T3JVMConnection.createConnection(Compiled Code)@
    2410
    at weblogic.rjvm.Protocol.createConnection(Compiled Code)@23e321b0
    at weblogic.rjvm.ConnectionManager.findOrCreateConnection(Compiled
    C
    @23e31b90
    at weblogic.rjvm.ConnectionManager.bootstrap(Compiled Code)@23e315b0
    at weblogic.rjvm.ConnectionManager.bootstrap(Compiled Code)@23e30d00
    at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(Compiled
    Cod
    3e30810
    at weblogic.rjvm.RJVMManager.findOrCreate(Compiled Code)@23e307b0
    at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(Compiled Code)@
    0660
    at weblogic.rjvm.RJVMFinder.findOrCreate(Compiled Code)@23e3001c
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(Compiled Code)@23d7fa00
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(C
    led Code)@23d7ec10
    at weblogic.jndi.Environment.getContext(Compiled Code)@23d7e600
    at weblogic.jndi.Environment.getInitialContext(Compiled Code)@23d7e5
    at weblogic.management.Admin.initializeRemoteAdminHome(Compiled
    Code
    d7db70
    at weblogic.management.Admin.start(Compiled Code)@23d7c060
    at weblogic.t3.srvr.T3Srvr.initialize(Compiled Code)@23590d00
    at weblogic.t3.srvr.T3Srvr.run(Compiled Code)@23590240
    at weblogic.Server.main(Compiled Code)@23590050
    --- End of stack trace
    >
    <May 10, 2002 11:51:00 AM PDT> <Emergency> <Configuration Management> <Error
    tected attempting to connect to admin server at http://ocncat2:7991 during
    i
    alization of managed server ( null:7551 ). The reported error was: < java.io
    xception: couldn't initialize IOPort: The parameter is incorrect.
    (error 87, fd 824) > This condition generally results when the managed
    and
    n servers are using the same listen address and port.>
    <May 10, 2002 11:51:00 AM PDT> <Emergency> <Server> <Unable to initialize
    th
    rver: 'Fatal initialization exception
    Throwable: weblogic.management.configuration.ConfigurationException: java.io
    xception: couldn't initialize IOPort: The parameter is incorrect.
    (error 87, fd 824) - with nested exception:
    [java.lang.RuntimeException: java.io.IOException: couldn't initialize IOPort
    e parameter is incorrect.
    (error 87, fd 824)]
    java.lang.RuntimeException: java.io.IOException: couldn't initialize IOPort:
    parameter is incorrect.
    (error 87, fd 824)
    at weblogic.socket.NTSocketMuxer.register(Compiled Code)@23e34e90
    at weblogic.rjvm.t3.T3JVMConnection.createConnection(Compiled Code)@
    2410
    at weblogic.rjvm.Protocol.createConnection(Compiled Code)@23e321b0
    at weblogic.rjvm.ConnectionManager.findOrCreateConnection(Compiled
    C
    @23e31b90
    at weblogic.rjvm.ConnectionManager.bootstrap(Compiled Code)@23e315b0
    at weblogic.rjvm.ConnectionManager.bootstrap(Compiled Code)@23e30d00
    at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(Compiled
    Cod
    3e30810
    at weblogic.rjvm.RJVMManager.findOrCreate(Compiled Code)@23e307b0
    at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(Compiled Code)@
    0660
    at weblogic.rjvm.RJVMFinder.findOrCreate(Compiled Code)@23e3001c
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(Compiled Code)@23d7fa00
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(C
    led Code)@23d7ec10
    at weblogic.jndi.Environment.getContext(Compiled Code)@23d7e600
    at weblogic.jndi.Environment.getInitialContext(Compiled Code)@23d7e5
    at weblogic.management.Admin.initializeRemoteAdminHome(Compiled
    Code
    d7db70
    at weblogic.management.Admin.start(Compiled Code)@23d7c060
    at weblogic.t3.srvr.T3Srvr.initialize(Compiled Code)@23590d00
    at weblogic.t3.srvr.T3Srvr.run(Compiled Code)@23590240
    at weblogic.Server.main(Compiled Code)@23590050
    --- End of stack trace
    --------------- nested within: ------------------
    weblogic.management.configuration.ConfigurationException: java.io.IOExceptio
    ouldn't initialize IOPort: The parameter is incorrect.
    (error 87, fd 824) - with nested exception:
    [java.lang.RuntimeException: java.io.IOException: couldn't initialize IOPort
    e parameter is incorrect.
    (error 87, fd 824)]
    at weblogic.management.Admin.initializeRemoteAdminHome(Compiled
    Code
    d7db70
    at weblogic.management.Admin.start(Compiled Code)@23d7c060
    at weblogic.t3.srvr.T3Srvr.initialize(Compiled Code)@23590d00
    at weblogic.t3.srvr.T3Srvr.run(Compiled Code)@23590240
    at weblogic.Server.main(Compiled Code)@23590050
    --- End of stack trace
    '>
    The WebLogic Server did not start up properly.
    Exception raised: weblogic.management.configuration.ConfigurationException:
    .io.IOException: couldn't initialize IOPort: The parameter is incorrect.
    (error 87, fd 824) - with nested exception:
    [java.lang.RuntimeException: java.io.IOException: couldn't initialize IOPort
    e parameter is incorrect.
    (error 87, fd 824)]
    java.lang.RuntimeException: java.io.IOException: couldn't initialize IOPort:
    parameter is incorrect.
    (error 87, fd 824)
    at weblogic.socket.NTSocketMuxer.register(Compiled Code)@23e34e90
    at weblogic.rjvm.t3.T3JVMConnection.createConnection(Compiled Code)@
    2410
    at weblogic.rjvm.Protocol.createConnection(Compiled Code)@23e321b0
    at weblogic.rjvm.ConnectionManager.findOrCreateConnection(Compiled
    C
    @23e31b90
    at weblogic.rjvm.ConnectionManager.bootstrap(Compiled Code)@23e315b0
    at weblogic.rjvm.ConnectionManager.bootstrap(Compiled Code)@23e30d00
    at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(Compiled
    Cod
    3e30810
    at weblogic.rjvm.RJVMManager.findOrCreate(Compiled Code)@23e307b0
    at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(Compiled Code)@
    0660
    at weblogic.rjvm.RJVMFinder.findOrCreate(Compiled Code)@23e3001c
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(Compiled Code)@23d7fa00
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(C
    led Code)@23d7ec10
    at weblogic.jndi.Environment.getContext(Compiled Code)@23d7e600
    at weblogic.jndi.Environment.getInitialContext(Compiled Code)@23d7e5
    at weblogic.management.Admin.initializeRemoteAdminHome(Compiled
    Code
    d7db70
    at weblogic.management.Admin.start(Compiled Code)@23d7c060
    at weblogic.t3.srvr.T3Srvr.initialize(Compiled Code)@23590d00
    at weblogic.t3.srvr.T3Srvr.run(Compiled Code)@23590240
    at weblogic.Server.main(Compiled Code)@23590050
    --- End of stack trace
    --------------- nested within: ------------------
    weblogic.management.configuration.ConfigurationException: java.io.IOExceptio
    ouldn't initialize IOPort: The parameter is incorrect.
    (error 87, fd 824) - with nested exception:
    [java.lang.RuntimeException: java.io.IOException: couldn't initialize IOPort
    e parameter is incorrect.
    (error 87, fd 824)]
    at weblogic.management.Admin.initializeRemoteAdminHome(Compiled
    Code
    d7db70
    at weblogic.management.Admin.start(Compiled Code)@23d7c060
    at weblogic.t3.srvr.T3Srvr.initialize(Compiled Code)@23590d00
    at weblogic.t3.srvr.T3Srvr.run(Compiled Code)@23590240
    at weblogic.Server.main(Compiled Code)@23590050
    --- End of stack trace

  • Deployment Manager Error with Oracle Weblogic Server 10.3.1

    I have installed Identity Manager 9.1.0.2 (patch upgraded from 9.1.0.1) on OEL 5.3 64bit and Weblogic 10.3.1
    Database:Oracle 11gR2 (remote machine).
    **I am aware that IM 9.1.0.2 is not certified on Weblogic 10.3.1 (it is only certified on 10.3),
    The installation was successful and OIManager is up and running. Able to create Users, Resources etc. as well.
    As part of configuring OIM Connectors tried to Import .xml file using Import option from Deployment Management section as below and the following error was displayed.
    "Either your session timed out or you are trying to access a page without logging in".
    Did all workarounds like enabling java, changing browsers, restarting machine etc as per the below discussion but in vain.
    Deployment Manager Error with Oracle Weblogic Server
    Can any one suggest any workaround or solution for this problem.
    Or atleast can any one confirm there is no Identity manager available on this date which is compatible with 10.3.1? and cannot be continued further.
    Thanks in Advance
    Sudheer
    Edited by: SudheerPrabhala on Oct 20, 2009 1:26 AM

    You are facing this issue because you're using a non certified combination.
    Other folks who tried to use OIM in 10.3.1 ended up in the same problem you're facing.

  • Problem in dealing with special-character filename

    Hi,
    I am facing a weird problem while dealing with a file which has a special character in its name. That character is the big-hyphen, i.e. '–' (not the normal hyphen we can type from keyboard), you would have seen this character in MS Word.
    My java program is running on HP-UX OS, and its basically trying to copy this file to a Windows target system through socket. But while executing it, I am getting Broken Pipe Exception.
    I am applying UTF-8 encoding while running my program (by specifying the argument "-Dfile.encoding=UTF-8" in the java process), and I am also confirming that the file-encoding is being applied to UTF-8 properly by putting a debug in the beginning of the program. My understanding is UTF-8 supports all the characters exist in this world.
    Any suggestion / pointers would be really appreciated.
    Thanks,
    Rajiv

    Fine..... but is there any way to know which encoding has been applied on it ..
    Let's say if you create any file on unix-based system in any application, which encoding gets applied there by default ?
    This file is basically nothing but an html page created using 'Save As' from the browser.
    The person who has created the file is a non-technical .. and won't know much about this all stuff... encoding etc.

  • Problem when working with package???Please, help me!!!

    I got 3 .java files from one Java tutorial as follow:
    Server.java (in package mygame.server)
    Utilities.java (in package mygame.shared)
    Client.java (in package mygame.client)
    All the above files are placed in "E:\Java Programmes\source"
    After compiling, i got correspponding .class files:
    Server.class (placed in "E:\Java Programmes\class\mygame\server")
    Utilities.class (placed in "E:\Java Programmes\class\mygam\shared")
    Clients.class (placed in "E:\Java Programmes\class\mygame\client")
    But when i run Server.class which contains main method, i got error as follow:
    E:\Java Programmes>java class\mygame\server\Server
    Exception in thread "main" java.lang.NoClassDefFoundError: class\mygame\server\S
    erver (wrong name: mygame/server/Server)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    That was very puzzled for me. I cannot find out what wrong with my files. Please., any boby, help me!!! I always got this problem when working with package and managing files. Thanls a lot.

    java -cp "E:\Java Programmes\class" mygame.server.Server

  • Need help with sockets!

    I am fairly new to network programming. All help is very appreciated!
    I know how to work with sockets and serversockets, and how to transmit data between the host and the clients. My problem is that I have no idea how to get my working program to work online.
    -It works fine when I have both the client and host programs running on my computer.
    -It works fine when I have the host on one computer (192.168.1.103), and the client running on another one (192.168.1.102 I think). I guess in this case I'm just using the linksys network, not the internet.
    -IT DOES NOT WORK WHEN I upload the files to my website, and run them from there. I am not sure what the cause is; the host correctly creates the serversocket and waits, but never receives a connection to the client. The client seems to connect; it does not throw any exceptions, and creates a socket, but never actually communicates with the host.
    Could the problem be with my applets' permissions?
    What hostname/IP should I have the client connect to? It is on the same server, so would localhost work, or do I need to connect to my websites ip, or to the hostname?
    What other problems could there be?!?!?!?!
    Thank you so much for your help!!!!!!!!!!

    Donv7 wrote:
    1) Is the server program running on the same machine as the webserver?
    2) How are you opening this Socket in the applet? You mentioned something about localhost, that would be wrong. You should use the www hostname. Same as the host that served the HTML that the applet lives in.1- My server program and client program are actually the same thing. This doesn't sound too good.
    And applet is not a suitable endpoint for a P2P application. An applet is going to be a client. Not a server.
    Are you actually running a server (of your program) on the webserver? Or are you hoping that two applets will talk to each other with one acting as a server? Because that's not going to work.

  • Error by submitting objects with socket

    Hallo,
    I allways get the following error massage:
    Error:
    java.net.ConnectException: Connection timed out: connect
    Exception in thread "Thread-0" java.lang.NullPointerException
    at com.Receiver.read(Receiver.java:36)
    at Input.write(Kommunicator.java:111)
    at Input.run(Kommunicator.java:137)
    Error:
    java.net.ConnectException: Connection timed out: connect
    Here is my code:
    import com.*;
    import TerminalIO.*;
    import java.util.*;
    import java.io.*;
    import java.net.*;
    public class Kommunicator
         public static void main(String [] args){
              KeyboardReader inread = new KeyboardReader();
              int port = inread.readInt();
              String ip =inread.readLine();
              Emitter out = new Emitter(ip, port);
              Input in= new Input(new Receiver(ip, port));
              try{
                   in.start();
                   boolean flag=true;
                   while(flag){
                        out.open();
                        if(line.equalsIgnoreCase("\\quit")){
                             out.write("User left");
                             in.interrupt();
                             flag=false;
                        else{
                             out.write(line);
                        out.close();
              catch(IOException e){
                   System.out.println("Error:\n"+e.toString());
    class Input extends Thread
         private Receiver out;
         public Input(Receiver a){out=a;}
         private void open(){
              try{
                   out.open();
                   super.start();
              catch(IOException e)
                   System.out.println("Error:\n"+e.toString());
         private void close(){
              try{
                   out.close();
              catch(IOException e)
                   System.out.println("Error:\n"+e.toString());
         private void write(){
              try{
                   Object temp=out.read();
                   if(!temp.equals(null))
                        String line=temp.toString();
                        do
                        System.out.println("Other:"+line);
                        line=out.read().toString();
                        }while(!line.equals(""));
              catch(IOException e)
                   System.out.println("Error:\n"+e.toString());
              catch(ClassNotFoundException e)
                   System.out.println("Error:\n"+e.toString());
         public void run()
              open();
              write();
              close();
    package com;
    import java.net.*;
    import java.io.*;
    public class Receiver
         private String ip;
         private int port;
         private ObjectInputStream ois;
         private Socket sock;
         public Receiver(String a, int b)
              ip=a;
              port=b;
         public void open() throws IOException
              sock = new Socket(InetAddress.getByName(ip), port);
              ois = new ObjectInputStream(sock.getInputStream());
              sock.setSoTimeout(3000);
         public void close() throws IOException
              ois.close();
              sock.close();
         public Object read() throws IOException,ClassNotFoundException
              Object temp=null;
              temp=ois.readObject();
              return temp;
         public int getPort()
         {return port;}
         public String getIp()
         {return ip;}
    package com;
    import java.io.*;
    import java.net.*;
    public class Emitter
         private String ip;
         private int port;
         private Socket sock;
         private ObjectOutputStream oos;
         public Emitter(String a, int b)
              ip=a;
              port=b;
         public String getIp()
         {return ip;}
         public int getPort()
         {return port;}
         public void open() throws IOException
              sock = new Socket(InetAddress.getByName(ip),port);
              oos =new ObjectOutputStream(sock.getOutputStream());
              sock.setSoTimeout(3000);
         public void write(Object a) throws IOException
         {oos.writeObject(a);}
         public void close() throws IOException
              oos.close();
              sock.close();
    }I hope you can help me with my problem and I hope you can answer my questions;
    1) is it a general problem with socket, that it is not allowed to submit objects on a permanent way?
    2) is it there another way how to submit object?
    3) can the problem be caused through trying to submit packeges in a lan?

    1. When you get an exception trying to construct any object, it is poor practice to print and ignore it.
    2. It is invalid to continue as though the object had been constructed.
    3. In this case you failed to connect but then continued to the read method using a null socket reference.
    4. You need to restructure your code so that it reacts correctly to exceptions.
    5. Then you need to solve the question of why the connect failed.

  • Is there any way changing the priviledge after starting the managed server with the other user

    Hi,
    is there any way to change the user privilege after i have started the managed
    server with one user.....say for example ....i have started one of my Managed
    server as "root" ...but after that i wanted to make this instance work under as
    "inet"
    how do i do this OR is it possible ????
    please advise ....
    sangita

    Thanks again Rob.
    Rob Woollen <[email protected]> wrote:
    >
    >
    sangita wrote:
    Thanks Rob for been so quick in responding.
    I have 3 questions for you:
    Running a server under root is a huge security hole.My Question: 1) what are the probable security issues while runninga server under
    root ?
    are these security issues external(from outside world) or internal(internally
    within a company) ?
    Iam basically curious to know external threats.
    The problem is the root user can do anything. So if someone finds a
    security hole in your server, then they have complete control of your
    system.
    The usual reason people want to do this is so they can bind to a port
    <
    1024. ie they want their web server to listen to 80.My Question: 2) What is the harm in using port 80 for webserver andwhy do the
    people wanted to bind to a port < 1024 ?
    People normally use 80 for web servers because that's the well-known
    port.
    Personally I would not recommend that you go that route. I would
    recommend that you start the server as a very unprivileged user andbind
    it to some port (say 7001).
    Most firewalls support redirecting ports. Your firewall can redirect
    80
    on the external net to 7001 on the internal net. That's the solution
    I
    would recommend.My Question: 3) Suppose iam having a cluster of 2 Managed servers runningon port
    7070. And Iam having a Iplanet server working as a Webserver that basicallyproxies
    requests to this cluster. Then what is the best approach that i shouldfollow
    in this context.....to be honest with you ....i still couldnot understandwhat
    does "binding" the webserver port to a managed server in weblogic mean.
    I would have your firewall redirect 80 to whatever port Iplanet is
    listening on and then have iplanet proxy to WLS.
    Do not run your WLS servers as root.
    -- Rob
    Iam sorry for asking these "silly" questions(in your opinion) ...butiam a bit
    confused.
    thanks, sangita
    Rob Woollen <[email protected]> wrote:
    Running a server under root is a huge security hole.
    The usual reason people want to do this is so they can bind to a port
    <
    1024. ie they want their web server to listen to 80.
    There is a set uid option in WLS where you start the server as root
    and
    then after it binds to the low port, it will switch to another userthat
    you specify.
    Personally I would not recommend that you go that route. I would
    recommend that you start the server as a very unprivileged user andbind
    it to some port (say 7001).
    Most firewalls support redirecting ports. Your firewall can redirect
    80
    on the external net to 7001 on the internal net. That's the solution
    I
    would recommend.
    -- Rob
    sangita wrote:
    <Sure, it's possible to do this, >
    how to do this?
    <but why do you want to do it? >
    Iam not sure why this group (the other group than me) does start theirserver
    as "root"...but somebody from that group asked me about this today.
    I would not recommend that you start WLS as root on your production
    system ever under any cirucmstance.then what is the best approach and what are the pros and cons if westart the
    server as "root" OR as different user ????
    please advise ....
    thanks again.
    Rob Woollen <[email protected]> wrote:
    Sure, it's possible to do this, but why do you want to do it?
    I would not recommend that you start WLS as root on your production
    system ever under any cirucmstance.
    -- Rob
    sangita wrote:
    Hi,
    is there any way to change the user privilege after i have startedthe managed
    server with one user.....say for example ....i have started one
    of
    my Managed
    server as "root" ...but after that i wanted to make this instance
    work
    under as
    "inet"
    how do i do this OR is it possible ????
    please advise ....
    sangita

  • Colour Management Issues with Leopard and Photoshop CS3

    Hi Everyone,
    Since I have installed Leopard I am having colour management issues with Photoshop CS3 and my Canon i9950 printer.
    My screen is calibrated with a Spyder and I used to ask Photoshop (in 10.4.11) to manage colour when printing and used the Spyder profile. Everything came out as I saw it on screen.
    Now in leopard when I do the same thing everything comes out too yellow on the print. If I ask Photoshop to let the printer manage the colour it is too red. If I use the default colour management (photoshop managing the colour and it choosing the colour space it is better, but still too yellow).
    Photoshop gives the hint to turn off colour management in the printer but there is no option for this and it also said the same thing before of course (when it worked in 10.4.11).
    Any ideas?
    Thanks.

    I'm having exactly the same problem, only my printer is a Canon Pixma iX4000. The colour is all bleached out, it looks exactly like when you've accidentally printed an RGB file on a CMYK printer, and at first I thought that was what I had done, but it isn't. This is very frustrating, I've spent all day going through the manuals, recalibrating etc, but no luck. This is a brand new Mac Pro and printer, but if its not going to print what I see on screen it's just expensive junk.
    I wasn't sure if the problem was Leopard or the printer or CS3...

  • Problem when streaming with the CLI flash media encoder 2.5

    I have a problem when streaming with Flash Media Encoder 2.5. When I run the GUI, everything works, but when I use the commandline with the same profile I have created using the GUI, it says it can't connect to the server.
    I have to use this version of the encoder, because the other is not working with the server, and I have to create a program to remotely control the flash media encoder, so I have to use the CLI. What can i do to go over this problem?
    Any help would be really appreciated. Thankyou.

    First of all, thankyou.
    There is no authentication needed. I can't use Flash Live Media Encoder 3 because it is not supported by the people which manages the server i have to connect to.
    In fact, I don't know why they dont support it, but that is the way it is.
    Through the GUI, i connect directly and without problems, without user/pass.
    Thankyou again.

Maybe you are looking for

  • Reporting Services - All Datasets Broken

    Hello there. We’re having some problems with Reporting Services on a prod site and I was hoping someone might be able to offer a suggestion. Here are the facts : We have a SP Server 2010 (not foundation) farm which uses Reporting Services. There is 1

  • Team Foundation Server 2013 Email Alerts not working.

    Hello I'm trying to configure Email alerts for my TFS but whenever I do a "Send test email" I get the following error.  This is what the log file in the error says. [Info   @05:07:35.833] ==============================================================

  • How do you delete items from the reading list?

    How do you delete items from the reading list?

  • Bug when using IBOT

    Hi all, has anyone had this kind of error? I am using IBOT, and I set Schedule_ to Start Date=21/09/2009, Time of Day=08:00, Set Time Zone=GMT+01:01, and Recurrence_ to Every 1 week(s) on  MON. When I look overview of this IBOT, everything is fine, b

  • Advice/Experience with division of tasks/roles for developers in JSF

    Hello, I've been reading various Sun docs and JSF sites and am looking for some information detailing the division of developer roles/tasks during JSF dev. I've seen the enclosed description in the Sun tutorials but was hoping to see if anyone has ad