4 Replies Latest reply on Apr 28, 2004 1:28 PM by hxp

    Newbie lost in strange setup

    stiphout

      Hi all,

      I'm a fairly experienced web programmer with no experience in JBoss. I've been using Eapps for some time to host some static pages and handle email, but now I'm expanding beyond the PICK-web (ancient, I know, don't ask) programming and into the wonders of J2EE.

      I'm lost.

      So, trying to get Nukes to run on my site over there. I asked them to move all my static pages over to a Apache/JBoss config, and here's how they've set it up, with all the pertinent info I can think of...

      The default mount points are:
      JkMount /*.jsp ajp13
      JkMount /servlet/* ajp13

      The "jboss3.2.3/server/default" directory structure is:

      drwxr-xr-x 9 jboss jboss 4096 Apr 27 16:46 .
      drwxr-xr-x 5 jboss jboss 4096 Dec 15 13:03 ..
      drwxr-xr-x 3 jboss jboss 4096 Jan 7 12:07 conf
      drwxr-xr-x 4 jboss jboss 4096 Apr 27 19:39 data
      drwxr-xr-x 13 jboss jboss 4096 Apr 27 19:34 deploy
      drwxr-xr-x 2 jboss jboss 4096 Apr 27 16:52 lib
      lrwxrwxrwx 1 jboss jboss 22 Apr 23 12:40 log -> /var/log/jboss/default
      drwxr-xr-x 2 jboss jboss 4096 Apr 27 19:35 nukes
      drwxr-xr-x 3 jboss jboss 4096 Apr 27 19:38 tmp
      drwxr-xr-x 3 jboss jboss 4096 Dec 15 14:17 work
      


      (I put the nukes directory there according to the install.txt in the mysql-prepared package for installing nukes, at http://prdownloads.sourceforge.net/jboss/nukes-1.0.0-mysql.zip?download)

      The deploy directory looks like this:
      drwxr-x--- 4 jboss jboss 4096 Apr 23 16:16 ROOT.war
      -rw-r--r-- 1 jboss jboss 2048 Nov 30 15:47 cache-invalidation-service.xml
      -rw-r--r-- 1 jboss jboss 1481 Nov 30 15:47 client-deployer-service.xml
      drwxr-xr-x 2 jboss jboss 4096 Apr 27 17:38 cruisingkb.war
      drwxr-xr-x 2 jboss jboss 4096 Apr 23 16:10 hellians.war
      -rw-r--r-- 1 jboss jboss 4264 Nov 30 15:47 hsqldb-ds.xml
      drwxr-xr-x 4 jboss jboss 4096 Nov 30 15:47 http-invoker.sar
      -rw-r--r-- 1 jboss jboss 104827 Nov 30 15:47 jboss-jca.sar
      -rw-r--r-- 1 jboss jboss 6585 Nov 30 15:47 jboss-local-jdbc.rar
      -rw-r--r-- 1 jboss jboss 12303 Nov 30 15:47 jboss-xa-jdbc.rar
      drwxr-xr-x 3 jboss jboss 4096 Jan 7 12:07 jbossweb-tomcat41.sar
      drwxr-xr-x 3 jboss jboss 4096 Jan 7 12:07 jms
      drwxr-xr-x 6 jboss jboss 4096 Jan 7 12:07 jmx-console.war
      drwxr-xr-x 3 jboss jboss 4096 Nov 30 15:47 jmx-invoker-adaptor-server.sar
      -rw-r--r-- 1 jboss jboss 1580 Nov 30 15:47 mail-service.xml
      drwxr-xr-x 2 jboss jboss 4096 Jan 7 12:07 management
      -rw-r--r-- 1 jboss jboss 380 Apr 27 18:05 nukes-ds.xml
      -rw-r--r-- 1 jboss jboss 1924458 Apr 27 19:34 nukes.ear
      -rw-r--r-- 1 jboss jboss 1830 Nov 30 15:47 properties-service.xml
      -rw-r--r-- 1 jboss jboss 3906 Nov 30 15:47 schedule-manager-service.xml
      -rw-r--r-- 1 jboss jboss 1784 Nov 30 15:47 scheduler-service.xml
      drwxr-xr-x 3 jboss jboss 4096 Jan 7 12:07 snmp-adaptor.sar
      -rw-r--r-- 1 jboss jboss 199 Nov 30 15:47 sqlexception-service.xml
      drwxr-xr-x 2 jboss jboss 4096 Apr 23 16:12 stiphout.war
      -rw-r--r-- 1 jboss jboss 1348 Nov 30 15:47 transaction-service.xml
      -rw-r--r-- 1 jboss jboss 1103 Nov 30 15:47 user-service.xml
      -rw-r--r-- 1 jboss jboss 5283 Nov 30 15:47 uuid-key-generator.sar
      


      And in case you're wondering, yes, my user id is jboss, and yes, all those ".war" files are actually directories. Eapps told me that this is because Apache needs them to be this way until I replace them with actual .war files.

      Ok, so I've placed the nukes.ear and the nukes-ds.xml files here. Eapps has told me they've added a JkMount for /nukes.

      But, I get a 404 when I try to go to http://www.cruisingkb.com/nukes/ or http://www.stiphout.net/nukes or http://www.hellians.net/nukes/ . . .

      What am I missing here? Do I need to make an actual war file with nukes in it for each of these sites? If so, how do I do that?

      It seems to me that if the JkMounts are sending contexts with /nukes/ to JBoss (via that ajp13 connector), somewhere I need to tell JBoss to map /nukes/ to the nukes.ear file... or is that something that's defined somewhere inside the nukes.ear file?

      Ack... there's so much here that I feel like I'm missing. It's like I'm 13 and learning linux all over again... (drowning in it)

      Thanks in advance, everyone!
      -Dutch

        • 1. Re: Newbie lost in strange setup
          hxp

           

          "Howard Pearlmutter" wrote:
          Hi Dutch --

          Make sure your domain name(s) are mapped properly via DNS to your machine.

          [root@photon hxp]# traceroute www.stiphout.net
          traceroute to stiphout.net (216.203.25.132), 30 hops max, 38 byte packets
          1 sw-3550-04.eapps.com (216.83.162.7) 0.796 ms 0.774 ms 0.787 ms
          2 cruisingkb.com (216.203.25.132) 0.645 ms 0.395 ms 0.302 ms

          Next, test your Apache installation. Make sure these are accessing pages on your Eapps server:
          http://www.stiphout.net/
          http://www.cruisingkb.com/

          Eapps would normally put your htdocs root at /var/www/html, so any static pages there should show up. I'm assuming the pages for the stiphout.net & cruisingkb.com are located there.

          (There is no evidence from what you posted about how you have your virtual hosting set up, and how you are getting these different domains to point at different pages.)

          Next, test your JBoss/Tomcat installation on port 8080.

          "stiphout" wrote:
          But, I get a 404 when I try to go to http://www.cruisingkb.com/nukes/ or http://www.stiphout.net/nukes or http://www.hellians.net/nukes/ . . .


          Work with eapps support until these show a Tomcat page:

          http://www.cruisingkb.com:8080/
          http://www.stiphout.net:8080/
          http://www.hellians.net:8080/



          None of the above is effected by Nukes, at all.



          After your basic linux/apache/java/jboss/tomcat installation is running...

          Now we can talk about Nukes...

          "stiphout" wrote:
          (I put the nukes directory there according to the install.txt in the mysql-prepared package for installing nukes, at http://prdownloads.sourceforge.net/jboss/nukes-1.0.0-mysql.zip?download )


          Ignore that. Follow these instructions step-by-step:

          http://jboss.org/wiki/Wiki.jsp?page=InstallUninstallUpgrade



          I'd be looking for results at these URLs --

          http://www.cruisingkb.com:8080/nukes/
          http://www.stiphout.net:8080/nukes/
          http://www.hellians.net:8080/nukes/


          -- Howard Pearlmutter


          • 2. Re: Newbie lost in strange setup
            stiphout

            Thanks so much, Howard!

            So, here's the current state of things...

            Howard Pearlmutter wrote:
            Eapps would normally put your htdocs root at /var/www/html, so any static pages there should show up. I'm assuming the pages for the stiphout.net & cruisingkb.com are located there.

            Actually, no, they're in they're in those strangely named ".war" directories:

            /opt/jboss/server/default/deploy/cruisingkb.war/*
            /opt/jboss/server/default/deploy/stiphout.war/*
            /opt/jboss/server/default/deploy/hellians.war/*

            Last message from Eapps:

            Eapps Support wrote:
            The JkMounts are currently

            JkMount /*.jsp ajp13
            JkMount /servlet/* ajp13
            JkMount /manager/* ajp13
            JkMount /nuke/* ajp13

            you can view them by running: cat /etc/httpd/conf.d/aresteia.conf | less

            My response (keep in mind, I'm trying to get as much help from them as possible without incurring any billable support):

            Me wrote:
            This is a little weird...

            http://www.cruisingkb.com/nukes/ gives a 404
            http://www.cruisingkb.com/manager/ gives me a 404
            http://www.cruisingkb.com/servlet/ takes me to nukes
            http://www.cruisingkb.com/test.jsp takes me to nukes

            Is this how it's supposed to work? I just want to make sure you think this is a config issue on my side before I sprain my brain trying to figure it out... Thanks!

            Also, note that I have a test.jsp in:

            /opt/jboss/server/default/deploy/cruisingkb.war/test.jsp

            <html>
             <head>
             <% String title = "Hello World JSP"; %>
             <title><%= title %></title>
             </head>
             <body>
             <h1><%= title %></h1>
             </body>
            </html>

            But when I try to go to that link, I show up at nukes.

            And port 8080 gets no response on any of these domains.

            Is it just me, or is this hella weird?

            • 3. Re: Newbie lost in strange setup
              stiphout

              Also, just noticed they have my JkMount set as nuke, not nukes. I do show up in nukes if I go to http://(domain)/nuke/

              So, one oddity solved... :) Any ideas on the rest?

              • 4. Re: Newbie lost in strange setup
                hxp

                Dutch --

                Congrats on seeing Nukes on your machine!

                But yes, "hella weird" is a good way to descr the rest.

                You clearly have conflicts on how URLs are mapped.

                Most of your problem is outside of Nukes. But there is one main part in Nukes you need to get familiar with....

                go to your nukes CVS snapshot, in its build/etc directory, such as
                nukes-snapshot20040428/build/etc
                and find a file called
                local.properties-example

                and notice:

                # Context root for the nukes main servlet
                nukes.context-root=/nukes

                Now go back to see where this is discussed in the wiki

                http://jboss.org/wiki/Wiki.jsp?page=InstallUninstallUpgrade

                copy and modify and place as suggested.

                Reply back on this thread with your results (and any improvements that ought to be made to the Wiki, please). (But I prob cant help you more till Monday; client flying in today from Mexico City.)


                On the eapps side --

                You need to investigate the mechanism by which your virtual domains are mapped to the .war files.

                And in general, you need to get a much better handle on how your installation is set up.

                -- Howard