[Resin-interest] Database Conflict

2011-11-21 Thread Aaron Freeman
With the latest resin-pro-4.0.23 plugin we are now getting an error when
trying to start multiple instances of Resin within a single Eclipse
environment:

 

java.sql.SQLException: CREATE for path
'C:\opt\project\ext\resin-pro-4.0.23\resin-data\default\tmp\temp_file'
failed, because the file already exists.  CREATE can not override an
existing table.

 

We were able to get around the issue by adding a -data-directory argument to
the Resin plugin's Program arguments section, but why do we have to do
that suddenly?

 

What is the best practice for starting multiple VMs?Is there some
setting we can use to get it to use WEB-INF (not sure that is a good idea),
or ${resin.root}/${server}/tmp or something?  

 

Any other options that would be better than having to explicitly add that
extra program argument with a hardcoded path?

 

Thanks,

 

-a

___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Database Conflict

2011-11-21 Thread Scott Ferguson

On 11/21/2011 04:25 AM, Aaron Freeman wrote:


With the latest resin-pro-4.0.23 plugin we are now getting an error 
when trying to start multiple instances of Resin within a single 
Eclipse environment:


_java.sql.SQLException_: CREATE for path 
'C:\opt\project\ext\resin-pro-4.0.23\resin-data\default\tmp\temp_file' 
failed, because the file already exists.  CREATE can not override an 
existing table.


We were able to get around the issue by adding a --data-directory 
argument to the Resin plugin's Program arguments section, but why do 
we have to do that suddenly?


What is the best practice for starting multiple VMs?Is there some 
setting we can use to get it to use WEB-INF (not sure that is a good 
idea), or ${resin.root}/${server}/tmp or something?


Any other options that would be better than having to explicitly add 
that extra program argument with a hardcoded path?




If your servers have different server-id's that conflict won't happen.

What's happening is that you're starting two servers with the same name 
(but different ports I assume?) and in the same directory.


I'll add this as a bug report because the Eclipse plugin should be 
upgraded to somehow handle that automatically.


-- Scott


Thanks,

-a


___
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] 4.0.24 configuration notes

2011-11-21 Thread Scott Ferguson
As part of our work on simplifying the Resin configuration to make 
dynamic/cloud servers easier to deploy, 4.0.24 now has

   rpm support
   two new configuration tags resin:properties and server-multi
   a new EL function rvar()
   two new CLI commands start-all and generate-password
   and a new command-line script resinctl

all to help make the cluster/cloud deployment easier (and also help 
simplify /resin-admin setup).

Our goal is to make a new dynamic server require very little in specific 
configuration to attach to the triad and start working. If the small 
specific configuration can fit in an Amazon-style user-data, that would 
be perfect (we're not quite there yet, but 4.0.24 is a good step forward.)

The start-all is used in the updated /etc/init.d/resin to start all 
servers that are configured on the local IP addresses of the current 
machine, avoiding the earlier requirement of specifying the -server. 
With 4.0.24, the /etc/init.d/resin can be left as-is.

If you look at the new default resin.xml, it has a

resin:properties path=${__DIR__}/resin.properties

and several uses of rvar like http port=${rvar('http')}/. The 
resin:properties is similar to the resin:import, but loads a 
properties file and saves the values in EL expressions which are then 
available to the resin.xml. Basically, this means that many sites will 
only need to change the resin.properties and may never need to touch the 
resin.xml.

The new server-multi works with the resin.properties to make it easier 
to define the triad or the entire cluster. Instead of creating on 
server entry for each server, you can use the server-multi and set 
its address-list attribute to list all of the servers in the 
resin.properties like:

   app_tier : 192.168.1.10 192.168.1.11 192.168.1.12

and

server-multi id-prefix=app- address-list=${rvar('app_tier')} 
port=6800/

Together with the CLI start-all, this lets you configure the app-tier 
cluster without modifying either the resin.xml or the /etc/init.d/resin.

The resin.xml also includes a

resin:import fileset=${__DIR__}/local.d/*.xml/

which will let you add configuration such as database tags in a 
separate *.xml without needing to modify the standard one.

resinctl is now placed in /usr/bin for the make install, the rpm, and 
the deb. So it's always available. It's similar to bin/httpd.sh, but has 
the default installed locations build-in. In other words, on a Linux 
system, it already knows about /etc/resin, /var/log/resin, /var/www, and 
/usr/local/share/resin.

-- Scott



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] 4.0.24 configuration notes

2011-11-21 Thread Aaron Freeman


 -Original Message-
 If you look at the new default resin.xml, it has a
 
 resin:properties path=${__DIR__}/resin.properties
 
 and several uses of rvar like http port=${rvar('http')}/. The
 resin:properties is similar to the resin:import, but loads a properties
file
 and saves the values in EL expressions which are then available to the
 resin.xml. Basically, this means that many sites will only need to change
the
 resin.properties and may never need to touch the resin.xml.

This could be awesome!

Will modifying the resin.properties force your resin instance to restart?

 
 The resin.xml also includes a
 
 resin:import fileset=${__DIR__}/local.d/*.xml/
 
 which will let you add configuration such as database tags in a separate
 *.xml without needing to modify the standard one.

Same question as above, will modifying the *.xml files force your resin
instance to restart?

Thanks,

Aaron



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] 4.0.24 configuration notes

2011-11-21 Thread Scott Ferguson
On 11/21/2011 11:08 AM, Aaron Freeman wrote:

 -Original Message-
 If you look at the new default resin.xml, it has a

 resin:properties path=${__DIR__}/resin.properties

 and several uses of rvar likehttp port=${rvar('http')}/. The
 resin:properties  is similar to the resin:import, but loads a properties
 file
 and saves the values in EL expressions which are then available to the
 resin.xml. Basically, this means that many sites will only need to change
 the
 resin.properties and may never need to touch the resin.xml.
 This could be awesome!

I hope so. Since it's new, this is a great time for feedback

 Will modifying the resin.properties force your resin instance to restart?

Yes. It's the same mechanism as modifying resin.xml causing a restart.

 The resin.xml also includes a

 resin:import fileset=${__DIR__}/local.d/*.xml/

 which will let you add configuration such asdatabase  tags in a separate
 *.xml without needing to modify the standard one.
 Same question as above, will modifying the *.xml files force your resin
 instance to restart?

Yep.

-- Scott



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest