Re: [Resin-interest] Resin 3.1: resin:import of jvm-args
Alex wrote: I've got this, which is a slightly different but equivalent technique that doesn't require the jvm-arg tag (applicable bits only, my startup script does other things too): Just for the benefit of understanding the use case: is this to support n environments that are identical but serve two distinct purposes e.g. - development - testing - production where let's suppose 'testing' runs on a different set of servers and therefor needs different bindings and jvm arguments? Alex Yes, very close. We have several servers, a couple are web servers, a few of them are file servers, we have a remote development system and we run locally. Each of those configurations has a different set of memory constraints. Development might have 2GB, local has 500MB, web servers have 4GB, file-servers 2GB, for example. Each configuration has its own host.xml and those are loading great via resin:import--fileset, but the jvm-args can't be pushed into those classes. So I guess I just have to push them in via command line or use resin:choose in the main resin configuration file, I guess. Aaron ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Resin 3.1: resin:import of jvm-args
I have a situation where different servers should have different jvm-args, but I would like to have a single resin.xml. You should be able to achieve this by using jvm-arg inside the server server id=a address=127.0.0.1 port=6800 jvm-arg-Dserver=A/jvm-arg /server server id=b address=127.0.0.1 port=6801 jvm-arg-Dserver=B/jvm-arg /server Regards, Alex I tried doing a resin:import on a jvm.xml file that has just jvm-args in it, but I haven't found a combination that works. I have tried surrounding the jvm-arg tags like this: Try1: server ...jvm-args.. /server Try 2: server-default...jvm-args../server-default Try 3: server server-default...jvm-args../server-default /server Try 4: cluster server-default...jvm-args../server-default /cluster None of these are working. Any thoughts? Thanks, Aaron ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Resin 3.1: resin:import of jvm-args
I have a situation where different servers should have different jvm-args, but I would like to have a single resin.xml. You should be able to achieve this by using jvm-arg inside the server server id=a address=127.0.0.1 port=6800 jvm-arg-Dserver=A/jvm-arg /server server id=b address=127.0.0.1 port=6801 jvm-arg-Dserver=B/jvm-arg /server Regards, Alex Hmm, that's exactly what I tried first, as mentioned below. Can you have jvm-arg inside a resin:import'ed file? Aaron I tried doing a resin:import on a jvm.xml file that has just jvm-args in it, but I haven't found a combination that works. I have tried surrounding the jvm-arg tags like this: Try1: server ...jvm-args.. /server Try 2: server-default...jvm-args../server-default Try 3: server server-default...jvm-args../server-default /server Try 4: cluster server-default...jvm-args../server-default /cluster None of these are working. Any thoughts? Thanks, Aaron ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Resin 3.1: resin:import of jvm-args
You should be able to achieve this by using jvm-arg inside the server server id=a address=127.0.0.1 port=6800 jvm-arg-Dserver=A/jvm-arg /server server id=b address=127.0.0.1 port=6801 jvm-arg-Dserver=B/jvm-arg /server Regards, Alex Hmm, that's exactly what I tried first, as mentioned below. Did it work for you? What version of Resin 3.1 did you try it with if it did not work? Can you have jvm-arg inside a resin:import'ed file? Nope, the server does not allow resin:import tag. Alex Aaron I tried doing a resin:import on a jvm.xml file that has just jvm-args in it, but I haven't found a combination that works. I have tried surrounding the jvm-arg tags like this: Try1: server ...jvm-args.. /server Try 2: server-default...jvm-args../server-default Try 3: server server-default...jvm-args../server-default /server Try 4: cluster server-default...jvm-args../server-default /cluster None of these are working. Any thoughts? Thanks, Aaron ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Resin 3.1: resin:import of jvm-args
You should be able to achieve this by using jvm-arg inside the server server id=a address=127.0.0.1 port=6800 jvm-arg-Dserver=A/jvm-arg /server server id=b address=127.0.0.1 port=6801 jvm-arg-Dserver=B/jvm-arg /server Regards, Alex Hmm, that's exactly what I tried first, as mentioned below. Did it work for you? What version of Resin 3.1 did you try it with if it did not work? No, none of those scenarios worked. It is with Resin 3.1.9. I was trying to resin:import the jvm-args, so I guess that's why it was failing. I have unique jvm-arg needs for different servers so I was hoping I could pull that off. Can you have jvm-arg inside a resin:import'ed file? Nope, the server does not allow resin:import tag. Alex Bummer. Thanks for clarifying. Aaron ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Resin 3.1: resin:import of jvm-args
No, none of those scenarios worked. It is with Resin 3.1.9. I was trying to resin:import the jvm-args, so I guess that's why it was failing. I have unique jvm-arg needs for different servers so I was hoping I could pull that off. The excerpt below should work and it will allow you to have all the configuration in one file. server id=a address=127.0.0.1 port=6800 jvm-arg-Dserver=A/jvm-arg /server server id=b address=127.0.0.1 port=6801 jvm-arg-Dserver=B/jvm-arg /server Thanks, Alex Can you have jvm-arg inside a resin:import'ed file? Nope, the server does not allow resin:import tag. Alex Bummer. Thanks for clarifying. Aaron ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Resin 3.1: resin:import of jvm-args
The excerpt below should work and it will allow you to have all the configuration in one file. server id=a address=127.0.0.1 port=6800 jvm-arg-Dserver=A/jvm-arg /server server id=b address=127.0.0.1 port=6801 jvm-arg-Dserver=B/jvm-arg /server Thanks Alex. My problem isn't with multiple servers on a single machine though. I have multiple machines, each with one server, and a few of the machines need a different set of jvm-args. I was trying to get by with one Resin configuration file where I could pass in a -Dconfiguration={something} and then resin:import path=.../${configuration}/*.xml (not literally, I was using the fileset option of resin:import). It's working great except the one little snafu of not being able to import jvm-arg settings. I think I will just have to throw some resin:choose around the jvm-arg stuff. Aaron ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Resin 3.1: resin:import of jvm-args
Hi Aaron, Maybe I am missing something, but if you can pass in -Dconfiguration=wherever to your individual machines (in your /etc/init.d/resin script or wherever, I assume?), can't you pass in your server specific JVM args there too? Rachel On Mon, Nov 30, 2009 at 12:08 PM, Aaron Freeman aaron.free...@layerz.comwrote: Thanks Alex. My problem isn't with multiple servers on a single machine though. I have multiple machines, each with one server, and a few of the machines need a different set of jvm-args. I was trying to get by with one Resin configuration file where I could pass in a -Dconfiguration={something} and then resin:import path=.../${configuration}/*.xml (not literally, I was using the fileset option of resin:import). It's working great except the one little snafu of not being able to import jvm-arg settings. I think I will just have to throw some resin:choose around the jvm-arg stuff. Aaron ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Resin 3.1: resin:import of jvm-args
Aaron, Maybe I am missing something, but if you can pass in -Dconfiguration=wherever to your individual machines (in your /etc/init.d/resin script or wherever, I assume?), can't you pass in your server specific JVM args there too? Rachel Probably. The configuration is passed in via an environment variable, but I could pass those in dynamically too if I have too. If we set those from our resin script will the ResinWatchdogManager pass the same values to the actual Resin server, when it launches it? I wasn't sure, so I was just going by the example resin.conf file that comes with Resin 3.1.9. Aaron ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Resin 3.1: resin:import of jvm-args
Well, they are JVM system variables so it isn't so much that ResinWatchdogManager would pass them to the server, but that they're set in the JVM when it's started and anything in that runtime instance will have them available. My startup script uses this technique and it works great. I suppose it is possible that a later version changed this behavior (we're still on 3.0.21) but I'd be extremely surprised if that's the case. Rachel On Mon, Nov 30, 2009 at 1:25 PM, Aaron Freeman aaron.free...@layerz.comwrote: Aaron, Maybe I am missing something, but if you can pass in -Dconfiguration=wherever to your individual machines (in your /etc/init.d/resin script or wherever, I assume?), can't you pass in your server specific JVM args there too? Rachel Probably. The configuration is passed in via an environment variable, but I could pass those in dynamically too if I have too. If we set those from our resin script will the ResinWatchdogManager pass the same values to the actual Resin server, when it launches it? I wasn't sure, so I was just going by the example resin.conf file that comes with Resin 3.1.9. Aaron ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Resin 3.1: resin:import of jvm-args
Aaron, Maybe I am missing something, but if you can pass in -Dconfiguration=wherever to your individual machines (in your /etc/init.d/resin script or wherever, I assume?), can't you pass in your server specific JVM args there too? Rachel Probably. The configuration is passed in via an environment variable, but I could pass those in dynamically too if I have too. If we set those from our resin script will the ResinWatchdogManager pass the same values to the actual Resin server, when it launches it? Yes. The variable needs to be exported !#/bin/bash export foo=foo-value bin/httpd.sh -server a start resin.conf file: server id=a address=127.1 port=6080 jvm-arg-Dbar=${Var[foo]}/jvm-arg /server Alex I wasn't sure, so I was just going by the example resin.conf file that comes with Resin 3.1.9. Aaron ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Resin 3.1: resin:import of jvm-args
I've got this, which is a slightly different but equivalent technique that doesn't require the jvm-arg tag (applicable bits only, my startup script does other things too): Just for the benefit of understanding the use case: is this to support n environments that are identical but serve two distinct purposes e.g. - development - testing - production where let's suppose 'testing' runs on a different set of servers and therefor needs different bindings and jvm arguments? Alex USER=username HTTPD=/usr/local/resin/bin/httpd.sh su $USER -c $HTTPD start -verbose -J-server -Dvar1=value1 -Dvar2=value2 $* Rachel On Mon, Nov 30, 2009 at 2:28 PM, Alex a...@caucho.com wrote: Aaron, Maybe I am missing something, but if you can pass in -Dconfiguration=wherever to your individual machines (in your /etc/init.d/resin script or wherever, I assume?), can't you pass in your server specific JVM args there too? Rachel Probably. The configuration is passed in via an environment variable, but I could pass those in dynamically too if I have too. If we set those from our resin script will the ResinWatchdogManager pass the same values to the actual Resin server, when it launches it? Yes. The variable needs to be exported !#/bin/bash export foo=foo-value bin/httpd.sh -server a start resin.conf file: server id=a address=127.1 port=6080 jvm-arg-Dbar=${Var[foo]}/jvm-arg /server Alex I wasn't sure, so I was just going by the example resin.conf file that comes with Resin 3.1.9. Aaron ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Resin 3.1: resin:import of jvm-args
Hi, This works with 3.1.9 but careful as it does not work with 3.1.5, I think it was a new feature introduced later in 3.1 or a bug fixed. We had to go back to 3.1.5 due to JPA issues and had to change our scripts accordingly. In our case, we use different Node.conf configuration files that import the common pieces from a set of files shared between all the nodes. If you share the whole configuration file, be aware that modifying it will bump all of your nodes. S! D. Alex escribió: Aaron, Maybe I am missing something, but if you can pass in -Dconfiguration=wherever to your individual machines (in your /etc/init.d/resin script or wherever, I assume?), can't you pass in your server specific JVM args there too? Rachel Probably. The configuration is passed in via an environment variable, but I could pass those in dynamically too if I have too. If we set those from our resin script will the ResinWatchdogManager pass the same values to the actual Resin server, when it launches it? Yes. The variable needs to be exported !#/bin/bash export foo=foo-value bin/httpd.sh -server a start resin.conf file: server id=a address=127.1 port=6080 jvm-arg-Dbar=${Var[foo]}/jvm-arg /server Alex I wasn't sure, so I was just going by the example resin.conf file that comes with Resin 3.1.9. Aaron ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest