As some of you may remember (or see in the list archive) we had some 
pain to get C2 up and running here in our environment (SuSE Linux 7.3).


This is what helped:

        We changed the ownership of the whole Tomcat-4.0.1
        directory to a normal user, who then started the server.

Conclusion:

        Install and run Tomcat-4.0.1 and Cocoon-2.0.1 as a normal
        user who either owns the X session, if you are running X, or
        who also starts Xvfb (we can't report anything on PJA).



Here is in detail what we we learned.

Our biggest problem was the well-known X server connection problem that 
leads to the ubiquitous error "The sitemap handler's sitemap is not 
available."

We run SuSE Linux 7.3, here, and it is possible that the following is 
only relevant for this platform, although we think it should be useful 
for other Linux distros, as well.


But now it works, and this is, what we learned (if your time is limited, 
just go to paragraph (4)).




(1) It depends on software versions, if it works or not, at all
===============================================================
We found two combinations that do, while others failed.

(a) Released binaries: C2.01 + T4.0.1 + Blackdown J2SDK-1.3.1-FCS_02a.
This is good for production machines, because released versions should 
be stable and mature. All included examples work, even the SVG.

(b) More advanced: C2.02-dev (development snapshot, we used the one of 
February the 19th, and the day after that), T4.0.1 + Sun J2SDK 1.4.0.
We compiled this C2 version ourselves. Most of the examples work, but 
the SVG examples delivers just a blank page.

Both work with X servers and Xvfb. We had no luck trying PJA, but maybe 
we didn't spend enough time on it. Anyhow, Xvfb ist good for us.

We were unable to get C2 running with Tomcat 4.0.2 and Tomcat 4.0.2-LE 
(for J2SDK 1.4.0). While Tomcat-4.0.2-LE works with JDK 1.4.0, C2 does 
not like the first one, it seems. Funny: In T4.0.1 it is possible to use 
C2 with J2SDK 1.4.0.



(2) It depends on who starts the server
=======================================
For combination (a) above, it is important that the Tomcat server is 
started by a normal user, who either owns the X session or starts Xvfb.

For combination (b), on the other hand, it doesn't matter, if the user 
who owns the X session is the one to start the Tomcat server, or if it 
is done by root. In any case the SVG example responds with a blank page
(URL: http://localhost:8080/cocoon/hello.svg, and Mozilla shows that 
there should be a graphic sized 450x160, but it is not visible).



(3) Security
============
If for combination (a) root owns and starts the Tomcat server, all the 
well-known problems are there, again. The xhost +localhost trick had no 
effect for us.

The only way to get C2 running then, was to start the X session as root, 
which is inacceptable, even on a developer machine, not to mention a 
production server. Maybe this has to do with strict security policy on 
SuSE Linux 7.3, or XFree86 4.1 to be more precise, which uses 
.Xauthority files to control user access. We haven't had the time to 
investigate this further, but in principle this should be a much less 
dangerous approach to grant users access to a running X session than 
xhost + is.

For combination (b) we suspect that the graphics part may have been 
switched off in the dev snapshot we used, maybe due to the many problems 
it causes for some people.



(4) Conclusions and suggestions
===============================

1. Don'ts for users
-------------------

        - Don't use J2SDK 1.4.0, unless you are ready to bet your
                project on development versions.

        - Don't use Tomcat-4.0.2 or Tomcat-4.0.2-LE.
                Stick with Tomcat 4.0.1, instead, and you won't even
                have to build anything yourself. You can use binary
                releases.

2. Do's for users
-----------------

        - Use Xvfb (or PJA) for security reasons

        - Use Blackdown J2SDK 1.3.1-FCS_02a. We had no luck with earlier
                versions.

        - Use Tomcat 4.0.1 (binary distribution will do)

        - Use C2.0.1 (binary distribution will do) on a production
                machine and a development snapshot built by yourself
                for development (there are more examples in the dev
                snapshot, and a few things seem smoother, but there can                
         also arise new bugs)

        - Make sure that you are the owner of all the files and
                directories in $CATALINA_HOME.

        - Start Tomcat as the user who owns it, not as root.

        - Start Xvfb, if you have it, or start the X session as the same
                user.


3. Request to the documentators
-------------------------------

        - Please, make clear in the docs that the Tomcat server has to
                be *owned* and *run* by a normal user! This can be
                easily achieved, if the user *installs* the software.

                (Frankly, I'd not be surprised if this was the actual
                cause of the many threads on the failing X connection
                ("The sitemap handler's sitemap is not available"). We
                were certainly trapped by this, and maybe others, too.


        So, *please*, put a note in the installation docs!


(5) To find this all out took quite some time and some help provided by 
people on this list, who contributed a few pieces to the puzzle, that 
made it possible for us to single the problem out. Thanks to all of you, 
especially to Vadim, because your hint to try it as a normal user, got 
us on the roll.

Hope this is useful information, and that it saves time, at least for 
people who are new to C2.

        Peter
-- 
+-------------------------------+-------------------------------------+
|    Peter C. A. Bär            | Siemens Business Services & Co. OHG |
|    Fon  +49.911.654-2387      | Von-der-Tann-Str. 30-31             |
|    Fax  +49.911.654-2108      | 90439 Nürnberg                      |
|                               | Deutschland                         |
+-------------------------------+-------------------------------------+
|              >>>  mailto:[EMAIL PROTECTED]  <<<             |
+---------------------------------------------------------------------+


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to