0 Replies Latest reply on Mar 23, 2003 5:41 AM by Domingo Sebastián

    problems with jboss-tomcat in production

    Domingo Sebastián Newbie

      We have had a problem using jboss-3.0.6-tomcat-4.1.18 in production: after several days working, the server stops delivering the requests.

      The logs only show some Broken pipe exceptions that have the origin in the coyote-tomcat module.

      I have posted the question in the Tomcat user list with no answer. There is an entry in the bugzilla (http://issues.apache.org/bugzilla/show_bug.cgi?id=4663) database but remains open.

      One user (Mvh Kristian) tell me that he has the same problem using jboss-3.0.4 and they solved the problem modifying the jnp module. Here is an extract of his email (Kristian, I suppose I have your permission to reproduce it):

      I believe our fix is fixing a solution rather than fixing an error. Why the naming service seems to crash/stop, I don't know, but JBoss's solution to the problem is to restart the naming service. Since the naming server has
      not been stopped properly (the port is still occupied), JBoss fail to restart the naming service. By calling the stop method:

      log.error("Naming stopped", e);
      log.info("Restarting naming");
      stop(); // Added this line
      } catch (Exception ex)
      log.error("Restart failed", ex);

      , we are making sure it's been stopped properly, and by telling it to reuse the address:

      old //serverSocket = jnpServerSocketFactory.createServerSocket(port,
      backlog, bindAddress);
      new serverSocket = jnpServerSocketFactory.createServerSocket();
      new serverSocket.setReuseAddress(true);
      new serverSocket.bind(new InetSocketAddress(bindAddress, port), backlog);

      , we know it is available. I don't know if this made it any clearer, but that's how we figured it...

      the code segment refers to the run method of the org.jnp.server.Main class.

      I want to know if you have any recommended way to solve the problem.

      Thank you very much.

      Domingo Sebastian