9 Replies Latest reply on Apr 23, 2008 2:31 PM by Marcos Antonio

    Doubts about deployment on the server

    Marcos Antonio Novice

      - JBoss 4.2.2.GA
      - Windows Server 2003

      Hello, everybody!

      I've just developed my first Java web application using JBoss and now I want to make it available on the web. In my develop environment, I accessed the application through:

      http://localhost:8080/laboratorioinformatica

      and on the server where I intend to deploy it everyone should access it through something like:

      http://mydomain.com/laboratorioinformatica

      The problem is that I know almost nothing about DNS. The only thing that I know is that the server where I want to deploy the application already is a DNS server and already has an asp application running on port 80, using the IIS Server from Microsoft. I tried to make the JBoss application run on this machine, but the server gives me the message that the port is already in use when it is starting.

      I have many doubts in my head about this:

      - Do I have to create a new DSN domain in the same server for the application?
      - Can I use the same domain used for the asp application for the JBoss
      application?
      - What other ports could I use to run my application?
      - Do I have to use another server (I really don't think this is necessary)?

      I have tried many configurations in the jboss-web.xml and server.xml to make my application use the domain that already exists on the server, but none of them worked. I could just be able to make my application run locally on the server, through the localhost.

      I would appreciate your help about my questions a lot.

      Thank you very much.

      Marcos

        • 1. Re: Doubts about deployment on the server
          Peter Johnson Master

          First, you cannot have both IIS and JBossAS running on port 80 on the same IP. Either One of them will have to use a different port, or you will have to add another ip address to your NIC and then add another domain name for that IP address to your DNS server.

          For example, if mydomian.com has IP adress 192.168.111.101, then add IP address 192.168.111.102 to the NIC, and set otherdomain.com to that IP address.

          Second, run jbossas with the -b option, specifying either the host name or ip address (that would be otherdomain.com or 192.168.111.102, from the above example). Then as long as the browser has access to a dns server that can translate the address, you should be all set.

          Also, I assume that you have seen http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossOnPort80 for changing port 8080 to 80.

          • 2. Re: Doubts about deployment on the server
            Marcos Antonio Novice

             

            "PeterJ" wrote:
            First, you cannot have both IIS and JBossAS running on port 80 on the same IP. Either One of them will have to use a different port, or you will have to add another ip address to your NIC and then add another domain name for that IP address to your DNS server.


            Hello, Peter!
            Let's start with the easier option first: the different port. As you said I can reuse the same IP (domain) that is already on the server and specify a different port for JBoss. What other http ports could I use other than the port 80 for JBoss?

            Marcos

            • 3. Re: Doubts about deployment on the server
              Peter Johnson Master

              You can continue to use port 8080.

              • 4. Re: Doubts about deployment on the server
                Marcos Antonio Novice

                 

                "PeterJ" wrote:
                You can continue to use port 8080.


                I've just followed your instruction and I still don't have success. Below are some configuration that I'm using. Maybe I'm doing something wrong:

                jboss-web.xml
                <jboss-web>
                 <context-root>/laboratorioinformatica</context-root>
                 <virtual-host>labinf</virtual-host>
                </jboss-web>


                {JBOSS_HOME}\server\default\deploy\jboss-web.deployer\server.xml
                <Server>
                 <Service name="jboss.web">
                 <Connector port="8080" address="${jboss.bind.address}"
                 maxThreads="250" maxHttpHeaderSize="8192"
                 emptySessionPath="true" protocol="HTTP/1.1"
                 enableLookups="false" redirectPort="8443" acceptCount="100"
                 connectionTimeout="20000" disableUploadTimeout="true" />
                
                 <Engine name="jboss.web" defaultHost="localhost">
                
                 <Host name="labinf"
                 autoDeploy="false" deployOnStartup="false" deployXML="false"
                 configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"
                 >
                
                 <Alias>mydomain.com</Alias>
                 <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"
                 cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"
                 transactionManagerObjectName="jboss:service=TransactionManager" />
                
                 </Host>
                
                 </Engine>
                
                 </Service>
                
                </Server>


                • 5. Re: Doubts about deployment on the server
                  Marcos Antonio Novice

                  Hello, everybody, once again!

                  I REALLY need to run my application on the server. If some of you have the patience to guide me step by step through what I have to do, I would be greatly thankful. This is the first Java web application that I try to deploy, so I'm a beginner regarding this subject. I'm watching this topic constantly looking for your help.

                  Thank you very much.

                  Marcos

                  • 6. Re: Doubts about deployment on the server
                    Peter Johnson Master

                    I thought I replied to this yesterday. But my reply is not here. I must have attached the reply to your problem to some other post. I bet they are confused!

                    Anyway, I think you are doing too much work. You have set up a virtual host, which you do not need, according to the requirements you specified in your original post. You do not have to make any changes to any configuration files to use the -b option to bind to a different IP address.

                    So set all of the configuration files back to what they were. Assign a second IP address to your NIC. Register the host name for that IP address in the DNS. Start jbossas with the -b option. And you are ready to go.

                    • 7. Re: Doubts about deployment on the server
                      Marcos Antonio Novice

                       

                      "PeterJ" wrote:

                      So set all of the configuration files back to what they were. Assign a second IP address to your NIC. Register the host name for that IP address in the DNS. Start jbossas with the -b option. And you are ready to go.


                      Ok, what about the port? Which port should I use?

                      • 9. Re: Doubts about deployment on the server
                        Marcos Antonio Novice

                         

                        "PeterJ" wrote:
                        Use the default port: 8080.


                        Peter, I want to thank you very much for your valuable help. Finally it worked with the -b option. As you said, without changing anything. It could not imagine that it was so easy like this to deploy this application on the server. Just to specify the domain name in the -b option.

                        Once again, thank you very much.

                        Marcos