📄 install.xtp
字号:
<s1 title="Installation"><summarylist/><s2 title="All Plugins" name="plugin"><s3 title="Apache/IIS can't contact servlet runner"><p>The particular error message is something like:</p><def>Cannot connect to servlet runner at localhost:6802</def><p>The servlet runner process needs to be started. In resin-2.1/binthe httpd executable will start the servlet runner.</p><p>The httpd executable will start Java and wait for connections from theweb server.</p></s3><s3 title='I just get a 404 for JSP or Servlets!'><p>Make sure you try the following:</p><ol><li>First, check your configuration with the standalone httpd.Both httpd and srun use the same configuration file, so theresults should be identical.<li>Check http://localhost/caucho-status. That will tell ifmod_caucho has properly read the resin.conf.<li>The srun hosts should be green and the mappings should match your resin.conf.<li>If caucho-status fails on Apache, the problem is in themod_caucho/iis_srun installation and the Apache httpd.conf.<li>If caucho-status fails on IIS, tryhttp://localhost/scripts/iis_srun.dll/caucho-status directly.If this fails, IIS can't find iis_srun.dll. <ul><li>Check that iis_srun.dll is in <var/c:\inetpub\scripts./><li>Make sure that your IIS host has a mapping from <var//scripts/>to <var/c:\inetpub\scripts/>.<li>Make sure that the <var//scripts/> has execute permissions.</ul><li>If caucho-status shows the wrong mappings, there's something wrongwith the resin.conf or the pointer to resin.conf in httpd.conf.<li>If caucho-status shows a red servlet runner, then httpd.sh hasn'tproperly started.<li>If you get a "cannot connect to servlet engine", caucho-statuswill show red, and httpd hasn't started properly.<li>If httpd doesn't start properly, you should look at the logsin resin2.0/log. You should start <var/httpd -verbose/> to getmore information.<li>If you get Resin's file not found, the Apache configurationis good but the resin.conf probably points to the wrong directories.<li>If the error message is from Resin, your <var/app-dir/> is probably setwrong. Remember servlets belong in <var/"app-dir"/WEB-INF/classes/>.</ol><p>Before you ask any questions on the list, you should be able toanswer the following questions:</p><ul><li>Does httpd standalone work?<li>What does the /caucho-status show?<li>Is the 404 coming from your web server or from Resin?</ul><p>If you don't answer these questions in your mail, the mail willprobably be ignored.</p><p><em>Victor A. Salaman</em> writes:</p><p>This may sound elementary... But check for these common pitfalls:</p><ol><li>Check in your browser that it's not configured to use a proxy server..and if it is, make it bypass local accesses or disable proxying altogether(If you are using IE, just go to Tool/Options/Connection and at the bottomyou'll see the proxy stuff!<li>Make you are running httpd.exe.... A lot of people try to use "srun.exe",and this is just a servlet runner.... <li>Modify your resin.conf file and add this line right after "<caucho.com>" <log id="/" href="stderr:"/></ol> <p>After you do this, execute httpd.exe and see what pops up....</p></s3><s3 title='browser returns test.jsp source'><p>If you're running Resin with IIS or Apache, the web server might notknow how to handle *.jsp files. On Apache, the httpd.conf needs toadd Resin. On IIS, the IIS configuration needs to dispatch *.jspfiles to srun_iis.dll.</p><p>Both may need restarting to see the changes.</p><p>To test if this is the problem, stop the srun executable. If youbrowse http://localhost/test.jsp, you should get the 'Cannot connectto servlet runner' message.</p></s3><s3 title='java.net.BindException'><p>You'll get this exception if you try to start two Resininstances using the same port. You'll need to stop the firstone. Normally, httpd.sh stop or httpd.sh stop wil do the trick.</p><p>On Unix, the dramatic way of stopping Resin is to kill the wrapper.plscript:</p><example>unix> ps auxw | grep wrapper.plferg 1314 ... perl resin/bin/wrapper.plferg 1340 ... grep wrapper.plunix> kill 1314</example><p>Because the 'ps' differs on different flavors of Unix, e.g. ps -ef,you may need to consult 'man ps'.</p></s3><s3 title='File not found'><p>The web server (IIS or Apache) and the servlet runner (httpd),need to find theweb 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.</p><example><caucho.com> <http-server app-dir='d:\InetPub\wwwroot'> <servlet-mapping url-pattern='*.jsp' servlet-name='com.caucho.jsp.JspServlet'> </http-server></caucho.com></example></s3><s3 title="Resin uses the wrong JDK version"><p>On Win32, Resin tries to find Java in the followingorder:</p><ul><li>The command-line argument, -java_home<li>The environment variable JAVA_HOME<li>The registry, using JavaSoft's CurrentVersion of the JDK.<li>Following the PATH of the java executable.</ul><p>To find out which Java version Caucho JSP is using, use the'-version' argument on the command line:</p><def>resin-2.1> bin/httpd -version</def></s3><s3 title="How do I pass JVM arguments like -ms48m?"><p>You can pass them on the command line like: <var/-J-ms40m/>. You don't needto escape <var/-Dfoo=bar/>. If you're on Unix, you can also add them to httpd.sh in the <var/args/> variable. You may need to quote the assignment:</p><example>args="-J-ms40m -Dfoo=bar"</example></s3><s3 title="NoSuchMethodError: org.w3c.dom.Node: method =getNamespaceURI()Ljava/lang/String; not found"><p>This is caused by an incompatibility in the XML libraries. Resin'sXSL needs the XML DOM v2. The dom.jar in resin1.2/lib implements thatinterface. 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.</p><p>You will need to look in your system classpath for the old DOMimplementation (likely jaxp.jar) and remove it.</p></s3></s2><s2 title="IIS"><s3 title="caucho-status fails on IIS"><p>Try looking at <var/http://localhost/scripts/iis_srun.dll/caucho-status/>.If this fails, IIS can't use the iis_srun.dll plugin. The problem isprobably one of the following:</p><ul><li>iis_srun.dll isn't in <var/c:\inetpub\scripts/>.<li>The IIS host is missing the <var//scripts/> virtual directory.<li><var//scripts/> doesn't have proper execute permissions.</ul><p>Resin's IIS module needs the <var//scripts/> virtual directory to containiis_srun.dll. If you create a new IIS virtual host, you must create a<var//scripts/> virtual directory that points to <var/d:\inetpub\scripts/>.</p><p>When the Resin ISAPI filter detects a JSP page or servlet, it rewrites theURL to <var//scripts/iis_srun.dll/test.jsp/>. IIS will then executeiis_srun.dll as an ISAPI extension. If your virtual site is missing the<var//scripts/> directory, IIS can't find the ISAPI extension.</p></s3><s3 title="How to use index.jsp as default document on IIS?"><p>Stefan Wesner writes,</p><p>Activating index.jsp as the default document is a matter ofconfiguration ofIIS.</p><p>On IIS4.0 you could the following steps:</p><ol><li>Open the property dialog for the "Default Web Site" (or any otherWeb-Site or VirtualDirectorx).<li>Go to the "Home Directory" Tab for the Default Web Site" or the "VirtualDirectory" Tab for a virtual Directory.<li>Select "Configuration"<li>add an application mapping from .xtp and .jsp for your iis_srun.dll (Iuse also PUT,DELETE exlusion like it is done for asp mappings but I do notknow why, just copied it)Close this sub-dialog<li>Select the "Documents" tab and add index.jsp and index.xtp to the list ofdefault documents.<li>Try http://yourhost/</ol></s3></s2><s2 title="Apache"><s3 title="Apache won't start on Win32"><p>The error message might be something like:</p><example>"Syntax error on line 785 ofC:\PROGRA~1\APACHE~1\APACHE/conf/httpd.conf:Cannot load c:\resin-2.1\libexec\win32-1.3.6\mod_caucho.dll into server:"</example><p>Usually, this is a path problem, for example, you may haveused "win-1.3.6" instead of "win32-1.3.6".</p><p>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 differentversion, send us a message and we'll make sure you get the rightcompiled version.</p></s3><s3 title="Apache doesn't find my resin.conf"><p>On Windows, the argument to <var/CauchoConfigFile/> should be enclosed inquotes. Also, since Apache treats '\' as an escape, you'll needeither to use forward slashes or double the backslashes.</p></s3><s3 title="mod_caucho caucho-status returns no data"><p>This may be due to an "EAPI" conflict. If your Apache is compiled withEAPI, but Resin is compiled without it, the mod_caucho may crash.</p><p>The Apache log will have lines like</p><example>[Tue Aug 8 15:33:24 2000] [notice] caught SIGTERM, shutting down[Tue Aug 8 15:33:24 2000] [warn] Loaded DSO /etc/httpd/modules/mod_caucho.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI)</example><p>Normally, the ./configure script can determine if EAPI is neededautomatically, but if it fails, you can run it as:</p><example>unix> ./configure --with-apache-eapi</example></s3><s3 title="Can I use mod_rewrite with Resin?"><p>Yes, but you need to make sure to use the passthrough flag so Resin canget control after mod_rewrite.</p><example>RewriteEngine onRewriteRule ^/hello.html$ /hello.jsp [L,PT]</example></s3></s2><s2 title="Linux/Unix"><s3 title="libcaucho.so not found"><p>libcaucho.so contains some small JNI routines for Unix. It should becompiled when you call configure; make. For some reason, the JVM isn'tpicking the library up. You'll probably want to check LD_LIBRARY_PATH bothin your environment and in wrapper.pl.<p>For many sites, a missing libcaucho.so isn't a big deal. It justgrabs some CPU statistics. However, it also enabled the setuid needed byuser-name and group-name. So if you're using user-name to change theuser from root, you'll need to get libcaucho.so running.</s3><s3 title="How do I install Resin as a Linux service?"><p>Stephen Kuo asks:</p><p>This should be a very basic question for those Linux guru.<p>In my Red Hat 6.2, I put the following line in the /etc/rc.d/rc.local fileto make Resin as a service:</p><example>/usr/local/resin1.1/bin/httpd.sh start</example><p>But when I reboot the system, Resin does not start up.<p>Guy Tal reponds:<p>You should also set your environment params in the rc file (when youexecute 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):</p><example>----------Snip----------PATH=/usr/local/bin:/usr/bin:/binexport PATHJAVA_HOME=/usr/javaexport JAVA_HOMERESIN_HOME=/opt/resin1.1export RESIN_HOMECLASSPATH=/usr/java/jre/lib/rt.jarCLASSPATH=$CLASSPATH:/opt/resin1.1/lib/resin.jarCLASSPATH=$CLASSPATH:/opt/resin1.1/lib/jsdk22.jarCLASSPATH=$CLASSPATH:/opt/resin1.1/lib/jdk12.jarexport CLASSPATH----------Snip----------</example><p>You can also set those environment variables in the httpd.sh itselfor in the wrapper.pl.</p></s3></s2></s1>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -