JRun: Using JRun with other Linux Distributions
Are there any known issues with JRun and Mandrake/Slackware/Caldera Linux?
Does JRun work with my version/distribution of Linux?
Allaire does not officially support any distribution of Linux other than RedHat.
However, JRun is pure Java, and is known to run on most any platform that provides
a stable Java Virtual Machine. With that in mind, and knowing that there are
people installing JRun on Mandrake, Slackware and other distros, we want to
publicize a couple of known problems with other versions of Linux and how to
work around them. We will add to this article as we become aware of other issues
and their solutions.
I. The ulimit command on some versions of Linux does not work as expected
(you may see "ulimit failed" upon starting JRun). JRun uses the ulimit command
in the jsmctl shell script to set the number of open file descriptors allowed.
Since each client request requires a socket, and each socket requires a file
descriptor, JRun tries to set the file descriptor limit to the maximum allowed
(this limit will never be reached unless you set the MaxHandlerThreads in endpoint.properties
to a very, very high number). Ulimit is a bash built-in command. The version
of bash used by RedHat versus the version used by some other distros seems to
differ. One workaround is just to comment out line 17 of jsmctl with a pound
sign (#) so that line 17 looks like this:
ulimit -n `ulimit -nH` || echo ulimit failed
Another way to fix it besides commenting it out is to modify it to comply with
the correct syntax for your shell's built-in commands (use man bash and
search for ulimit). For example, the order of the flags to the command may be
different for your distro:
ulimit -n 'ulimit -Hn' || echo ulimit failed
II. Mandrake: NullPointerException when trying to use JSPs with JRun
and the version of Apache shipped with the Mandrake 7.0 distribution If
you are getting a NullPointerException like the one below, it may be due to
an incompatibility between the optimized version of Apache shipped with Mandrake,
and the pre-compiled JRun Apache connector (which is compiled under RedHat with
the standard GNU compiler). The problem is that the connector is unable to obtain
the location of the document root from Apache, so it gets a null value instead
of the location of the requested JSP:
Mon Apr 17 14:12:06 CDT 2000: Running servlet
{ java.lang.NullPointerException
at java.io.File.(File.java:181)
at com.livesoftware.jsp.PageInfo.exists(PageInfo.java:175)
at com.livesoftware.jsp.JSPServlet.service(JSPServlet.java:100)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at com.livesoftware.jrun.JRun.runServlet(JRun.java:321)
[et cetera . . .]
}
The solution here is to obtain a pre-compiled Apache binary RPM for RedHat
and install that. Then install the JRun connector for Linux and Apache.
|