|
Apache/IIS can't contact servlet runnerThe particular error message is something like:
The servlet runner process needs to be started. In resin-2.1/bin the httpd executable will start the servlet runner. The httpd executable will start Java and wait for connections from the web server. I just get a 404 for JSP or Servlets!Make sure you try the following:
Before you ask any questions on the list, you should be able to answer the following questions:
If you don't answer these questions in your mail, the mail will probably be ignored. Victor A. Salaman writes: This may sound elementary... But check for these common pitfalls:
After you do this, execute httpd.exe and see what pops up.... browser returns test.jsp sourceIf you're running Resin with IIS or Apache, the web server might not know how to handle *.jsp files. On Apache, the httpd.conf needs to add Resin. On IIS, the IIS configuration needs to dispatch *.jsp files to srun_iis.dll. Both may need restarting to see the changes. To test if this is the problem, stop the srun executable. If you browse http://localhost/test.jsp, you should get the 'Cannot connect to servlet runner' message. java.net.BindExceptionYou'll get this exception if you try to start two Resin instances using the same port. You'll need to stop the first one. Normally, httpd.sh stop or httpd.sh stop wil do the trick. On Unix, the dramatic way of stopping Resin is to kill the wrapper.pl script:
Because the 'ps' differs on different flavors of Unix, e.g. ps -ef, you may need to consult 'man ps'. File not foundThe web server (IIS or Apache) and the servlet runner (httpd), need to find the web pages. The resin.conf file configures srun. You need to add a 'app-dir' property, to tell httpd where to look for the root directory.
Resin uses the wrong JDK versionOn Win32, Resin tries to find Java in the following order:
To find out which Java version Caucho JSP is using, use the '-version' argument on the command line:
How do I pass JVM arguments like -ms48m?You can pass them on the command line like: . You don't need to escape . If you're on Unix, you can also add them to httpd.sh in the variable. You may need to quote the assignment:
NoSuchMethodError: org.w3c.dom.Node: method = getNamespaceURI()Ljava/lang/String; not foundThis is caused by an incompatibility in the XML libraries. Resin's XSL needs the XML DOM v2. The dom.jar in resin1.2/lib implements that interface. Unfortunately, some JDKs and XML applications (e.g. JAXP) put an obsolete XML API (DOM v1) in the system classpath, overriding the newer DOM API. You will need to look in your system classpath for the old DOM implementation (likely jaxp.jar) and remove it.
caucho-status fails on IISTry looking at . If this fails, IIS can't use the iis_srun.dll plugin. The problem is probably one of the following:
Resin's IIS module needs the virtual directory to contain iis_srun.dll. If you create a new IIS virtual host, you must create a virtual directory that points to .When the Resin ISAPI filter detects a JSP page or servlet, it rewrites the URL to . IIS will then execute iis_srun.dll as an ISAPI extension. If your virtual site is missing the directory, IIS can't find the ISAPI extension.How to use index.jsp as default document on IIS?Stefan Wesner writes, Activating index.jsp as the default document is a matter of configuration of IIS. On IIS4.0 you could the following steps:
Apache won't start on Win32The error message might be something like:
Usually, this is a path problem, for example, you may have used "win-1.3.6" instead of "win32-1.3.6". It will also happen if the dll is incompatible with the Apache version. Apache 1.3.6 is compatible with Apache 1.3.9. If you're using a different version, send us a message and we'll make sure you get the right compiled version. Apache doesn't find my resin.confOn Windows, the argument to should be enclosed in quotes. Also, since Apache treats '\' as an escape, you'll need either to use forward slashes or double the backslashes.mod_caucho caucho-status returns no dataThis may be due to an "EAPI" conflict. If your Apache is compiled with EAPI, but Resin is compiled without it, the mod_caucho may crash. The Apache log will have lines like
Normally, the ./configure script can determine if EAPI is needed automatically, but if it fails, you can run it as:
Can I use mod_rewrite with Resin?Yes, but you need to make sure to use the passthrough flag so Resin can get control after mod_rewrite.
libcaucho.so not foundlibcaucho.so contains some small JNI routines for Unix. It should be compiled when you call configure; make. For some reason, the JVM isn't picking the library up. You'll probably want to check LD_LIBRARY_PATH both in your environment and in wrapper.pl. For many sites, a missing libcaucho.so isn't a big deal. It just grabs some CPU statistics. However, it also enabled the setuid needed by user-name and group-name. So if you're using user-name to change the user from root, you'll need to get libcaucho.so running. How do I install Resin as a Linux service?Stephen Kuo asks: This should be a very basic question for those Linux guru. In my Red Hat 6.2, I put the following line in the /etc/rc.d/rc.local file to make Resin as a service:
But when I reboot the system, Resin does not start up. Guy Tal reponds: You should also set your environment params in the rc file (when you execute from the command line, they are ready from your own environment, however rc files are run as root so these will not be set). Add the following (with the appropriate settings for your own machine):
You can also set those environment variables in the httpd.sh itself or in the wrapper.pl.
|