Deployment Options

Hi,

I’m trying to figure out a strategy for deploying a JRuby intranet
application. The server-side landscape has been confusing to me so far,
trying to figure out the right one to use for this situation.

So far, I’ve been looking at these options:

  • Mongrel
  • Mongrel Cluster
  • Glassfish Gem
  • Full Glassfish server

This application will only be used by about 5-10 people, and probably
1-2 concurrently. There is no static content to serve up by Apache,
only RoR content.

The application is running under a VMWare ESXi setup, where one VM is
the production server, second VM for development, and another VM is
serving as the database server (plenty of memory on the physical
machine). All VM’s are Ubuntu 8.04 server.

Thoughts?

-Kevin

Why not just use warbler to make it into a war file and then drop it in
tomcat?

On Sun, Mar 28, 2010 at 11:06 AM, Kevin T.
[email protected]wrote:

  • Glassfish Gem


David Christiansen
Founder and Owner, TroopTrack LLC

[email protected]
www.trooptrack.com
Boy Scout Troop Management for the 21st Century
317-966-6154 (mobile)

David,

Lack of knowledge on my part…I didn’t realize Tomcat was an option.
What are the main benefits to using Tomcat over Glassfish?

-Kevin

David Christiansen wrote:

Why not just use warbler to make it into a war file and then drop it in
tomcat?

On Sun, Mar 28, 2010 at 11:06 AM, Kevin T.
[email protected]wrote:

  • Glassfish Gem


David Christiansen
Founder and Owner, TroopTrack LLC

[email protected]
www.trooptrack.com
Boy Scout Troop Management for the 21st Century
317-966-6154 (mobile)

Well, really you can use any server that know how to serve a war file.
I’ve
not used Glassfish, so I don’t really know, but if you can build your
app as
a war file deployment becomes pretty easy. Have you gotten to that point
yet?

Dave

On Sun, Mar 28, 2010 at 11:22 AM, Kevin T.
[email protected]wrote:

tomcat?

Posted via http://www.ruby-forum.com/.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


David Christiansen
Founder and Owner, TroopTrack LLC

[email protected]
www.trooptrack.com
Boy Scout Troop Management for the 21st Century
317-966-6154 (mobile)

Dave,

Yes, I have the application built as a war file, using warbler. I’m
getting some strange 404 and 500 errors that I only see when trying to
run the application as a Glassfish gem server or the full Glassfish. It
only works when running directly under Mongrel. So I need to debug that
further.

I’ll also try out Tomcat to see if that works better.

Thanks,
Kevin

David Christiansen wrote:

Well, really you can use any server that know how to serve a war file.
I’ve
not used Glassfish, so I don’t really know, but if you can build your
app as
a war file deployment becomes pretty easy. Have you gotten to that point
yet?

Dave

On Sun, Mar 28, 2010 at 11:22 AM, Kevin T.
[email protected]wrote:

tomcat?

Posted via http://www.ruby-forum.com/.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


David Christiansen
Founder and Owner, TroopTrack LLC

[email protected]
www.trooptrack.com
Boy Scout Troop Management for the 21st Century
317-966-6154 (mobile)

On Sun, Mar 28, 2010 at 12:37 PM, Kevin T. [email protected]
wrote:

I’m attempting to run this application through the glassfish gem, but
I’m not seeing things work. I am now seeing this error when I start the
glassfish server:

[…]

This rails application is several years old (started before Rails 2.0)
and so my suspicion is that there’s something present in my app that’s
preventing glassfish from detecting the type of application that it is.

This is my best guess as well. You’re probably better off either
trying an older version of the Glassfish gem, or deploying either with
Mongrel or as a war file.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

I’m attempting to run this application through the glassfish gem, but
I’m not seeing things work. I am now seeing this error when I start the
glassfish server:

[email protected]:/opt/applications/app1$ glassfish -p 3001 -e development -l
–log-level 7
Arguments:
runtimes=>1
runtimes_min=>1
runtimes_max=>1
contextroot=>/
environment=>development
app_dir=>/opt/applications/app1
port=>3001
address=>0.0.0.0
pid=>
log=>/opt/applications/app1/log/development.log
log_console=>true
log_level=>7
daemon=>false
jvm_options=>
domain_dir=>/opt/applications/app1/tmp/.glassfish
Starting GlassFish server at: 0.0.0.0:3001 in development environment…
Writing log messages to: /opt/applications/app1/log/development.log.
Press Ctrl+C to stop.

[Mar 28, 2010 08:30:46 AM] Module type not recognized
[Mar 28, 2010 08:30:46 AM] Exception while deploying the app
java.lang.NullPointerException
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:266)
at
org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214)
at
org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:144)
at
org.glassfish.scripting.gem.GlassFishMain.startGlassFishEmbedded(GlassFishMain.java:147)
at
org.glassfish.scripting.gem.GlassFishMain.start(GlassFishMain.java:298)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:450)
at
org.jruby.javasupport.JavaMethod.invokeStaticDirect(JavaMethod.java:356)
at
org.jruby.java.invokers.StaticMethodInvoker.call(StaticMethodInvoker.java:49)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:310)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
at
org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:136)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:153)
at
org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:290)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:109)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:173)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:169)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:310)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
at
org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.Ruby.loadFile(Ruby.java:2419)
at
org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:64)
at org.jruby.runtime.load.LoadService.load(LoadService.java:249)
at org.jruby.RubyKernel.load(RubyKernel.java:932)
at
org.jruby.RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER$load.call(org/jruby/RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER$load.gen)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:180)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:176)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:310)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
at
opt.jruby_minus_1_dot_4_dot_0.bin.glassfish.file(glassfish:19)
at opt.jruby_minus_1_dot_4_dot_0.bin.glassfish.load(glassfish)
at org.jruby.Ruby.runScript(Ruby.java:628)
at org.jruby.Ruby.runNormally(Ruby.java:550)
at org.jruby.Ruby.runFromMain(Ruby.java:396)
at org.jruby.Main.run(Main.java:272)
at org.jruby.Main.run(Main.java:117)
at org.jruby.Main.main(Main.java:97)

My environment:

Ubuntu 8.04 Server
JRuby 1.4.0

Java:
$ java -version
java version “1.6.0_17”
Java™ SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot™ Client VM (build 14.3-b01, mixed mode, sharing)

This rails application is several years old (started before Rails 2.0)
and so my suspicion is that there’s something present in my app that’s
preventing glassfish from detecting the type of application that it is.
The development.log file doesn’t seem to contain anything critical
beyond this exception.

I installed the glassfish gem this morning, so it should be the current
version. This applications runs perfectly with Mongrel.

Any thoughts or tips on how to debug this? I’ve been searching for
answers for a few hours, with no progress.

Thanks,
Kevin

Kevin T. wrote:

Dave,

Yes, I have the application built as a war file, using warbler. I’m
getting some strange 404 and 500 errors that I only see when trying to
run the application as a Glassfish gem server or the full Glassfish. It
only works when running directly under Mongrel. So I need to debug that
further.

I’ll also try out Tomcat to see if that works better.

Thanks,
Kevin

David Christiansen wrote:

Well, really you can use any server that know how to serve a war file.
I’ve
not used Glassfish, so I don’t really know, but if you can build your
app as
a war file deployment becomes pretty easy. Have you gotten to that point
yet?

Dave

On Sun, Mar 28, 2010 at 11:22 AM, Kevin T.
[email protected]wrote:

tomcat?

Posted via http://www.ruby-forum.com/.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


David Christiansen
Founder and Owner, TroopTrack LLC

[email protected]
www.trooptrack.com
Boy Scout Troop Management for the 21st Century
317-966-6154 (mobile)

Hi Kevin,

Glassfish gem or even one mongrel is your best friend for a small app
like this. With only a couple people using it you can skip using
warbler and just run the app like you do in dev mode (with mongrel?).
Check out the glassfish gem and let us know if you have issues. BTW, I
have an app running with something like 30 users, although not huge
server load, on glassfish gem.

-Brandon H.

Kevin

I’ve been using the glasshfish2 server a lot in production and I
initially had some issues before i figured out how to configure warble
correctly to include all the necessary gems. So if you have run warble
config in your rails app directory. Make sure that you have all the
relevant gems for you app added to the /config/warble.rb
file. Here is an simple example snippet

Gems to be included. You need to tell Warbler which gems your

application needs

so that they can be packaged in the war file.

The Rails gems are included by default unless the vendor/rails

directory is present.
config.gems ||= []
config.gems += [“activerecord-jdbcsqlite3-adapter”, “jruby-openssl”]

Regards

/Mikael

Kevin T. wrote:

Thanks,

yet?

Posted via http://www.ruby-forum.com/.
David Christiansen
Founder and Owner, TroopTrack LLC

[email protected]
www.trooptrack.com
Boy Scout Troop Management for the 21st Century
317-966-6154 (mobile)


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi,

I managed to get the application running under Apache Tomcat. It
appears the issue was not including all the gems. Under glassfish, I
was having a lot of difficulty trying to obtain logs that pointed the
problem out. Under Tomcat, the logs showed the issue right away. I’ll
probably try glassfish again to see if this solves the issue there too,
but Tomcat seems to be running nicely now.

Thanks for the advice…

-Kevin

Mikael R. wrote:

Kevin

I’ve been using the glasshfish2 server a lot in production and I
initially had some issues before i figured out how to configure warble
correctly to include all the necessary gems. So if you have run warble
config in your rails app directory. Make sure that you have all the
relevant gems for you app added to the /config/warble.rb
file. Here is an simple example snippet

Gems to be included. You need to tell Warbler which gems your

application needs

so that they can be packaged in the war file.

The Rails gems are included by default unless the vendor/rails

directory is present.
config.gems ||= []
config.gems += [“activerecord-jdbcsqlite3-adapter”, “jruby-openssl”]

Regards

/Mikael

Kevin T. wrote:

Thanks,

yet?

Posted via http://www.ruby-forum.com/.
David Christiansen
Founder and Owner, TroopTrack LLC

[email protected]
www.trooptrack.com
Boy Scout Troop Management for the 21st Century
317-966-6154 (mobile)


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs