3 Replies Latest reply on Jun 15, 2003 12:01 PM by Jon Barnett

    jboss-3.2.1 and tomcat and jvm_bind exception

    renu Newbie

      Hi,

      I have tomcat 4.1.18 running on my machine and I have just installed jboss-3.2.1 on my machine. When I try to run jboss then I get an exception about port already being used. As I have some other application using port 8080 hence my tomcat is also using a different port i.e. 3500. Please help me to configure jboss and integrate it with tomcat. I want to know that what files I need to change to do that.

      Thanks.

        • 1. Re: jboss-3.2.1 and tomcat and jvm_bind exception
          Jon Barnett Master

          There is already an embedded servlet engine included with JBoss - either Tomcat or Jetty depending on your distribution. This is probably attempting to bind its listener to port 8080. Assuming you are running the default instance of JBoss (when you don't pass anything to the run script), you can find the basic engine configuration file at server/default/deploy/jbossweb-jetty.sar/META-INF/jboss-service.xml for Jetty or server/default/deploy/jbossweb-tomcat.sar/META-INF/jboss-service.xml. This contains the listener elements for the respective servlet engines. Read up about their configuration from the Jetty and Tomcat sites but you will need to change the ports to which the listeners are bound.

          You are better off using the embedded servlet containers than running a separate external servlet container as the servlet-EJB communication will not have to go across the wire (communicate within the JVM as opposed to through a network interface such as lo [localhost]). This makes the applications run much faster as it cuts the communication time between your application components.

          • 2. Re: jboss-3.2.1 and tomcat and jvm_bind exception
            renu Newbie

            I tried to do what u suggested i.e. I changed
            server\default\deploy\jbossweb-jetty.sar\META-INF\jboss-service.xml

            and I changed the port but now I get this message when I try localhost:4000:

            No Default Context
            There is no default context registered with this server.
            Contexts known to this server are:
            WebApplicationContext[/jmx-console,file:/C:/jboss/jboss-3.2.1/server/default/deploy/jmx-console.war/]

            WebApplicationContext[/invoker,file:/C:/jboss/jboss-3.2.1/server/default/deploy/http-invoker.sar/invoker.war/]

            WebApplicationContext[/web-console,jar:file:/C:/jboss/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/management/web-console.war/28.web-console.war!/]

            WebApplicationContext[/jbossmq-httpil,file:/C:/jboss/jboss-3.2.1/server/default/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/]

            How do I integrate it with tomcat ?

            • 3. Re: jboss-3.2.1 and tomcat and jvm_bind exception
              Jon Barnett Master

              Post your changes. Those errors indicate that earlier, your Jetty service was unable to start - these other services are web-based and do not have a http lsitener available for them.

              You might also want to look at your server/default/log/server.log and find some ERROR messages around the Jetty startup. It will be early on in the logs. Posting these errors will also help folks diagnose your problem.

              Typically, the relevant sections will look like this in the jboss-service.xml.

              <?xml version="1.0" encoding="UTF-8"?>



              <!-- ==================================================================== -->
              <!-- Web Container -->
              <!-- ==================================================================== -->

              <!--
              | Be sure to check that the configuration values are valid for your
              | environment.
              -->



              <!-- ================================================================= -->
              <!-- Your webdefault.xml file - The default settings for every webapp -->
              <!-- deployed by Jetty. Make systemwide changes here to your webapps -->
              <!-- configurations. -->
              <!-- ================================================================= -->

              webdefault.xml

              <!-- ================================================================== -->
              <!-- If true, .war files are unpacked to a temporary directory. This -->
              <!-- is useful with JSPs. -->
              <!-- ================================================================== -->

              true

              <!-- ================================================================== -->
              <!-- If true, Jetty will register MBeans representative of every Servlet-->
              <!-- and Filter within each WebApp immediately. This will slow down your-->
              <!-- development iterations. -->
              <!-- ================================================================== -->

              true

              <!-- ================================================================== -->
              <!-- If true, Jetty first delegates loading a class to the webapp's -->
              <!-- parent class loader (a la Java 2). If false, Jetty follows the -->
              <!-- Servlet 2.3 specification, and tries the webapp's own loader -->
              <!-- first (for "non-system" classes) -->
              <!-- ================================================================== -->

              true

              <!-- ================================================================= -->
              <!-- If you require JAAS authentication, configure the name of the -->
              <!-- attribute in which you expect to find the JAAS active subject: -->
              <!-- -->
              <!-- Commenting out this configuration will disable JAAS support -->
              <!-- ================================================================= -->

              j_subject

              <!-- ================================================================= -->
              <!-- Configuring Jetty. The XML fragment contained in the -->
              <!-- name="ConfigurationElement" attribute is a Jetty-style -->
              <!-- configuration specification. It is used to configure Jetty with -->
              <!-- a listener on port 8080, and a HTTP request log location. -->
              <!-- The placement here of other Jetty XML configuration statements -->
              <!-- for deploying webapps etc is not encouraged: if you REALLY NEED -->
              <!-- something extra, place it in WEB-INF/jetty-web.xml files -->
              <!-- ================================================================= -->




              <!-- =============================================================== -->
              <!-- Configure the Request Listeners -->
              <!-- =============================================================== -->


              <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
              <!-- Add and configure a HTTP listener to port 8080 -->
              <!-- The default port can be changed using: java -Djetty.port=80 -->
              <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
              <!-- Make it listen on port 9080 -->




              10
              100
              30000
              5000





              <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
              <!-- Add a HTTPS SSL listener on port 8843 -->
              <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
              <!-- comment this SSL listener out so we don't clash with Tomcat



              8443
              5
              100
              30000
              2000
              /conf/tomcat.key
              changeit
              changeit



              -->


              <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
              <!-- Add a AJP13 listener on port 8009 -->
              <!-- This protocol can be used with mod_jk in apache, IIS etc. -->
              <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
              <!-- comment out this listener so we don't clash with Tomcat



              8009
              5
              20
              0
              443



              -->