Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:


Go Back   Caucho Forums > Resin

Reply
 
Thread Tools Display Modes
  #1  
Old 12-08-2011, 08:34 PM
theBlueSage theBlueSage is offline
Member
 
Join Date: Apr 2011
Posts: 33
Default Questions about server-multi in resin.xml 4.0.24

I am trying to get my head around the server-multi node introduced in 4.0.24, along with the ${rvar('variable')} mechanism. The only documentation I can find is in the changelog for 4.0.24 and a short blog entry that seems to skim the surface of this functionality.
Hopefully by putting the post up we can get some better explanation of these features ...

1. in the blog/changelog for server multi there is the following example :

app_tier : 192.168.1.10 192.168.1.11:6801 192.168.1.12:6802
http : 8080

followed by :
<server-multi id-prefix="app-" address_list="${app_tier}" port="6800">
</server-multi>

which it is stated will produce app-0, app-1, app-2.

Well that is all good, I assue that the interpreter iterates through the app_}tier list and generates 0, 1,2 etc ..but how do I use the app_tier list to produce app-a, app-b, and app-c ?

If I want to add multiple resin-instance specific jvm-args for each server into resin.properties, do I do a different variable for each argument? or do I join them on a single line such as this :

a.jvm_args : -Xloggc:/home/sandbox/resin-a/log/gc.log -Djava.io.tmpdir=/tmp/resin-a
b.jvm_args : -Xloggc:/home/sandbox/resin-b/log/gc.log -Djava.io.tmpdir=/tmp/resin-b
c.jvm_args : -Xloggc:/home/sandbox/resin-c/log/gc.log -Djava.io.tmpdir=/tmp/resin-c

or is it a single node in resin.xml, inside the <server> node? such as :
<jvm-arg>-Xloggc:/home/sandbox/resin${server.id}/log/gc.log</jvm-arg>
<jvm-arg>-Xloggc:-Djava.io.tmpdir=/tmp/resin-${server.id}</jvm-arg>

that should be a good start, thanks for the help
Reply With Quote
  #2  
Old 12-08-2011, 09:12 PM
ferg ferg is offline
Administrator
 
Join Date: Aug 2009
Posts: 190
Default

The "app-N" naming scheme is fixed, if you're using server-multi. To keep things relatively sane, we're not going to add alternate names like app-a, app-b instead of app-0, app-1. Since they're arbitrary names, it doesn't really matter.

Either of your jvm-args would work. Which one you pick really depends on which seems clearer for what you're trying to do. For path names, using the second one with ${server.id} might be clearer, but if you had different -Xmx values for some reason, the resin.properties would be clearer.
Reply With Quote
  #3  
Old 12-09-2011, 04:07 PM
theBlueSage theBlueSage is offline
Member
 
Join Date: Apr 2011
Posts: 33
Default

thanks for the reply Ferg

Is is a fair assumption to say that I can put in server-multi anything that I can put in a server node?
Reply With Quote
  #4  
Old 12-09-2011, 05:03 PM
ferg ferg is offline
Administrator
 
Join Date: Aug 2009
Posts: 190
Default

Yes, the server-multi is basically a macro for creating <server> items.

The main purpose was to let a resin.properties define all the servers in a cluster with one property.
Reply With Quote
  #5  
Old 02-26-2012, 01:39 AM
jigzat jigzat is offline
Member
 
Join Date: Jun 2011
Posts: 40
Default

Sorry for reviving this post but I'm having some issues with server-multi.

I am trying to configure my SSL certificates and I keep getting an error every time I start or stop resin, I get a .<http> and the line number.

I have a website hosted via virtual host

This is my resin.xml

Code:
<!--
   - Resin 4.0 configuration file.
  -->
<resin xmlns="http://caucho.com/ns/resin"
       xmlns:resin="urn:java:com.caucho.resin">

  <!-- property-based Resin configuration -->
  <resin:properties path="${__DIR__}/resin.properties" optional="true"/>
  <resin:properties path="cloud:/resin.properties"
                    optional="true" recover="true"/>
  <!-- Logging configuration for the JDK logging API -->
  <log-handler name="" level="all" path="stdout:"
               timestamp="[%y-%m-%d %H:%M:%S.%s]"
               format=" {${thread}} ${log.message}"/>
               
  <!-- 
     - Alternative pseudo-TTCC log format
     -
     - <log-handler name="" level="all" path="stdout:"
     -           timestamp="%y-%m-%d %H:%M:%S.%s"
     -           format=" [${thread}] ${log.level} ${log.shortName} - ${log.message}"/>
    -->
   
  <!--
     - level='info' for production
     - 'fine' or 'finer' for development and troubleshooting
    -->
  <logger name="" level="${log_level?:'info'}"/>

  <logger name="com.caucho.java" level="config"/>
  <logger name="com.caucho.loader" level="config"/>

  <!--
     - Default configuration applied to all clusters, including
     - HTTP, HTTPS, and /resin-admin configuration.
    -->
  <resin:import path="${__DIR__}/cluster-default.xml"/>
  
  <!--
     - health configuration
    -->
  <resin:import path="${__DIR__}/health.xml"/>

  <!--
     - local configuration files
    -->
  <resin:import fileset="${__DIR__}/resin-inf/*.xml"/>
  <resin:import fileset="cloud:/resin-inf/*.xml" recover="true"/>
  
  <!--
     - Remote management requires at least one enabled admin user.
    -->
  <resin:AdminAuthenticator>
    <user name="${admin_user}" password="${admin_password}"/>
    
    <resin:import path="${__DIR__}/admin-users.xml" optional="true"/>
    <resin:import path="cloud:/admin-users.xml" optional="true" recover="true"/>
  </resin:AdminAuthenticator>

  <!--
     - For clustered systems, create a password in as system_key
    -->
  <resin-system-auth-key>${system_key}</resin-system-auth-key>

  <!--
     - For production sites, change dependency-check-interval to something
     - like 600s, so it only checks for updates every 10 minutes.
    -->
  <dependency-check-interval>${dependency_check_interval?:'2s'}</dependency-check-interval>

  <!-- For resin.properties dynamic cluster joining -->
  <home-cluster>${home_cluster}</home-cluster>

  <!--
     - Configures the main application cluster.  Load-balancing configurations
     - will also have a web cluster.
    -->
  <cluster id="app">
    <!-- define the servers in the cluster -->
    <server-multi id-prefix="app-" address-list="${app_servers}" port="6800"/>
	<development-mode-error-page/>
	<host-default>
	<resin:import path="host.xml" optional="true"/>
	<access-log path="log/access.log"/>
      <!-- creates the webapps directory for .war expansion -->
      <web-app-deploy path="webapps"
                      expand-preserve-fileset="WEB-INF/work/**"
                      multiversion-routing="${webapp_multiversion_routing}"/>
    </host-default>
    <host-deploy path="hosts"/>
    
<http port="80" openssl="443">	
    <openssl>
		<certificate-file>keys/ssl.crt</certificate-file>
		<certificate-key-file>keys/ssl.key</certificate-key-file>
		<certificate-chain-file>keys/sub.class.server.ca.pem</certificate-chain-file>
		<ca-certificate-file>keys/ca.pem</ca-certificate-file>
		<cipher-suite>ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RCA+RSA:+HIGH:+MEDIUM</cipher-suite>
		<protocol>-all +sslv3 +tlsv1</protocol>
		<password>*********************************</password>
	</openssl>
</http>
  </cluster>

  <cluster id="web">
    <!-- define the servers in the cluster -->
    <server-multi id-prefix="web-" address-list="${web_servers}" port="6810"/>

    <host id="" root-directory="web">
      <web-app id="">
        <resin:LoadBalance regexp="" cluster="app"/>
      </web-app>
    </host>
  </cluster>

  <cluster id="memcached" xmlns:memcache="urn:java:com.caucho.memcache">
    <!-- define the servers in the cluster -->
    <server-multi id-prefix="memcached-" address-list="${memcached_servers}" port="6820">
      <!-- listen for the memcache protocol -->
      <listen port="${memcached_port?:11211}"
              keepalive-timeout="600s" socket-timeout="600s">
        <memcache:MemcachedProtocol/>
      </listen>
    </server-multi>
  </cluster>
  
</resin>
Reply With Quote
  #6  
Old 02-26-2012, 05:21 PM
jigzat jigzat is offline
Member
 
Join Date: Jun 2011
Posts: 40
Default

OK, uhhh nevermind I found out in 4.0.24 changes that the ssl configuration goes into resin.properties, although the there is very few info about the tags, I mean did the chain file cipher suite and protocol went dodo?
Reply With Quote
Reply

Tags
4.0.24, documentation, resin.xml, server-multi

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:30 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.