2 Replies Latest reply on Jan 16, 2006 4:45 PM by olegkon

    Apache->JBoss redirection

      Hi,

      We have powerful Solaris server which hosts 2 sets of Apache 2.0.48 -> JBoss
      3.07 with Tomcat 4.1.18
      using mod_jk2 2.0.2, running a bunch of web applications.
      They are configured to run independently (2 server names, 2 virtual servers,
      different ports, etc.)
      Used to run without a single glitch for about 1/2 year.

      We had a power failure, so the server crashed.
      After that we rebooted it, it automatically started Apache, we manually
      started JBoss.
      One set was totally restored (no problems whatsoever), but another one has a
      problem:
      - if you try to run any of the applications, getting error 404
      ("File doesn't exist: /apache/htdocs/myapp" in the log);
      - if you try to go to the main page: http://myserver1.com , you are getting
      index.jsp (Tomcat's main page
      with the cat);
      - but if you try to use port 8080 (http://myserver1.com:8080 ), getting main
      page and all the apps just fine.
      Even tried to kill the second instance of java process for JBoss/Tomcat -
      same exact picture on server1
      (ghost tomcat? - no catalina or tomcat proccesses running)
      Actually, is Tomcat a java process ?(seem to have tomcat.exe in bin
      directoty)

      I interpreted it as a failure of something in the Apache-Tomcat-JBoss
      bridge.
      So I tried to do the following:
      - reboot server - same problem;
      - reinstalled Apache, copied all config files and modules (imcl. ) from old
      instance of Apache to a new one - same;
      - after that restarted JBoss - same.
      - reinstalled JBoss, restarted it and Apache - the same.

      Nobody touched any config files.

      I forgot to mention that if I shutdown the second instance of JBoss/Tomcat,
      on the second instance of Apache http://myserver2.com I am getting error "Internal Server Error" (that is a normal behavior, right ?),
      but on the first instance of Apache http://myserver1.com I still get the
      same Tomcat admin page with the cat (index.jsp)
      although no java processes are running.
      If I go to any application on either server, getting error 404 "Resource not
      available"

      Can you explain how can I get that Tomcat's webapps/admin/index.jsp page when JBoss/Tomcat is down,
      is that mod_jk2 doing somehow ?

      Maybe something with inability to resolve localhost
      (somewhere in config - we had that problem before) ?

      Could you please suggest what might be wrong and how to fix it ?



      1) I am not sure why (don't think anything was modified),
      but something has changed: when you do: http://myserver1.com,
      it no longer shows the admin page of Tomcat,
      but shows page with something "Seeing this instead of the website you expected?..." (Apache Test page).

      2) We replaced all "localhost" with the IP address of that virtual server
      (it has 2 network cards, 2 IP addresses, etc.) - same result

      3) We copied the working version of JBoss and modified its configuration
      (mostly port numbers) to be as it was on that instance originally - same result.

      4) I have tried to change a line in workers2.properties
      from localhost to server1:
      [uri:server1/*]
      and it gave an interesting effect - now if I do http://server1/,
      getting Tomcat admin page (index.jsp with the cat),
      but for http://server1/myapp I am getting error 404 "requested resource not available". In any case, there is nothing showing in error_log,
      but in access_log:
      GET /myapp HTTP/1.1" 404 698

      We had problem on that server resolving localhost (maybe because we have 2 instances of apache & jboss there, 2 servernames, etc.),
      so I changed localhost->server1 in all 3 config files:
      workers2.properties,
      and on JBoss - in server.xml and tomcat41-service.xml,
      still the same exact behavior.

      5) It might be worth mentioning that when I restart apache,
      see in error_log:
      error mod_jk child init 1 -2
      error jk2_init() can't find child 5194 in scoreboard
      What does that mean ?


      Please help!

      Thank you in advance,
      Oleg.

        • 1. Re: Apache->JBoss redirection

          Can somebody please explain what do these messages in error_log mean
          (at Apache startup):

          [error] mod_jk child init 1 0
          [error] jk2_init() Can't find child 895 in scoreboard
          [notice] Apache/2.0.48 (Unix) mod_jk2/2.0.2 configure

          (that is the only errors I get)

          What is a scoreboard ?


          Thank you in advance,
          Oleg.

          • 2. Re: Apache->JBoss redirection

            I have noticed that I only get that Tomcat console page (index.jsp)
            if I do http://myserver1.com/ and error 403 for all other pages
            (e.g. http://myserver1.com/app1) on one condition:
            in workers2.properties the uri line must be:
            [uri:myserver1.com/*], otherwise getting "Forbidden error 403"
            I have no problems getting any apps directly, as
            http://myserver1.com:8080/app1

            It (index.jsp and err 403) happens even if JBoss is shutdown !
            So what does that mean, that index.jsp is a part of Apache, not JBoss ???
            But looking at it, it's a normal Tomcat page, how can it be a part of Apache?

            Also I tried to login to that admin console in index.jsp
            but none of the passwords worked.
            Is it supposed to be specified in tomcat-4.1.x/conf/server-noexamples.xml.config ?

            Or what is a URL of Tomcat console in JBoss,
            http://myserver1.com/tomcat/admin ?

            What else might be an obstacle between Apache & JBoss
            (I seem to have practically the same configuration in this set
            as in another set which works just fine)

            Any Unix things to check (hardware, permissions, env vars, ports)???

            Please help !

            Thank you,
            Oleg.