![]() |
| ||||||||||||
Where can I put .jar files so that they are available to all of my web applications?
I have some jar files that are used by all of my web applications. Where
can I put them so that I do not have to put them in WEB-INF/lib
for every web application that I have?
Any jar file in $RESIN_HOME/lib will be available to all of the web applications. Resin will also find jars in subdirectories, so you can put your jars in for example $RESIN_HOME/lib/local/hogwarts.jar. If you use the local/ subdirectory, when you upgrade to a new version of Resin you can just copy the local subdirectory over to the new $RESIN_HOME/lib. What happened to bin/resin?
With Resin 2.1 used to run make; make install and then use the binary bin/resin to start Resin, but in Resin 3.0 I can't find the binary. What happened to it?
Resin 2.1 used the bin/resin binary to enable two features: JNI usage (including OpenSSL) and to support <user-name> and <group-name> for switching the effective user id of the process after attaching to ports under 1024. Resin now uses the JNI library from within Java. You don't need a compiled binary to get at the JNI code (that was bin/resin in 2.1.x). So, the java process starts up and then hooks into the JNI libraries. Resin uses JNI for:
So Resin can run without the JNI libraries, it just won't be as Resin as Resin. user-name and group-name support no longer need the resin binary either. The only place it won't work is on Linux systems that do not use the newer threading model. For those systems, you can use a technique like the one described here.How can I bind to a port under 1024 and still run as a non-root user?
I want to bind resin to port 80, but my operating system only allows
to bind to ports under 1024. If I run Resin as , it is
a security risk. How can I start Resin as but then change the user
and group id after it is bound to the port?
Most users can simply use the <user-name> and <group-name> configuration tags. The exception is users on older Linux systems (before kernal version 2.6 or RedHat 9), which have a threading model that makes it so that Resin cannot change the user-name and group-name. For these systems, you can have Resin bind to port 8080 and then use kernal routing commands to route port 80 to port 8080:
Can I run multiple instances of Resin on the same machine?
One instance is for production, one for deployment testing.
Yes, as long as you use different http and srun port numbers (so they don't conflict). Also, don't point each instance at the same webapps/ directory, or the same directory for individual web-app's. The two instances will get confused about which is responsible for things like JSP compilation etc. Why do I get `can't connect to parent' after installing Resin?This problem is most often seen on Windows machines that you have a "personal" firewall installed. Examples of firewall programs are ZoneAlarm and Sygate Personal Firewall. The solution is to either reconfigure your firewall or turn it off. When Resin is started with httpd.exe (Windows) or httpd.sh/wrapper.pl (Unix) httpd.exe or wrapper.pl is the parent process that is ultimately in control of the java server. When the java server is started, it is passed a tcp port so that the java process and the parent can communicate. This is done using the -socketwait arg, if you want to browse the source. This port allows the parent to indicate to the java server that it should stop. When the java server is started, if the -socketwait parameter is passed then Resin will connect to the parent using the passed port number. It will try this for fifteen seconds, if the connection cannot be made after that time it will result in the "can't connect to parent" error. The error usually is seen on very slow or overloaded machines. It can also happen (as mentioned above) because a firewall-type program is interfering with the socket connection between the parent and the java process. If Resin is being started in an init script on *nix, you can put a sleep after the call the httpd.sh to let Resin have a chance to startup before the next initialization steps take up most of the CPU.
| |||||||||||||