webtier@glassfish.java.net

Re: [webtier] "Interrupting Idle Thread" error with RoR app using Glassfish v3 gem

From: Mark Westling <westling_at_sigma-hk.com>
Date: Wed, 11 Nov 2009 15:29:35 -0500

Thanks Vivek, I installed the build#120 version of the gem (0.9.6.dev) but
now I'm running into other problems.

When I set the glassfish.yml configuration to run in daemon mode (enable:
true), I get the following in the production.log file:

Nov 12, 2009 4:05:53 AM com.sun.enterprise.v3.server.SystemTasks
setSystemPropertiesFromEnv
SEVERE: cannot determine host name, will use localhost exclusively
java.net.UnknownHostException: mobileadapp02.myclient-domain.com:
mobileadapp02. myclient-domain.com
        at java.net.InetAddress.getLocalHost(InetAddress.java:1353)
        at
com.sun.enterprise.util.net.NetUtils.getCanonicalHostName(NetUtils.java:95)
        at
com.sun.enterprise.v3.server.SystemTasks.setSystemPropertiesFromEnv(SystemTasks.java:152)
        [...]
        at org.jruby.Main.run(Main.java:117)
        at org.jruby.Main.main(Main.java:97)
Nov 12, 2009 4:24:35 AM com.sun.enterprise.v3.server.AppServerStartup run
INFO: GlassFish v3 startup time : Embedded(200ms) startup services(161ms)
total(361ms)
Nov 12, 2009 4:24:35 AM AppServerStartup run
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
Nov 12, 2009 4:24:35 AM org.hibernate.validator.util.Version <clinit>
INFO: Hibernate Validator null
Nov 12, 2009 4:24:35 AM com.sun.enterprise.v3.services.impl.GrizzlyProxy$2$1
onReady
INFO: Grizzly Framework 1.9.18-e started in: 81ms listening on port 80
Nov 12, 2009 4:24:35 AM com.sun.enterprise.v3.server.ApplicationLifecycle
startContainers
SEVERE: Cannot start container jruby
java.lang.NullPointerException
ser.java:104)
        at
org.glassfish.scripting.jruby.JRubyContainer.postConstruct(JRubyContainer.java:97)
        at
com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:174)
        at
com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:87)
        at java.security.AccessController.doPrivileged(Native Method)
        at
com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:84)
       [...]
        at org.jruby.Main.run(Main.java:272)
        at org.jruby.Main.run(Main.java:117)
        at org.jruby.Main.main(Main.java:97)
Nov 12, 2009 4:24:35 AM org.glassfish.api.ActionReport failure
SEVERE: Aborting, Failed to start container
org.glassfish.scripting.jruby.JRubyContainer
Nov 12, 2009 4:24:35 AM org.glassfish.api.ActionReport failure
SEVERE: Exception while deploying the app
java.lang.Exception: Aborting, Failed to start container
org.glassfish.scripting.jruby.JRubyContainer
        at
com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:448)
        at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:246)
        at
org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:206)
        at
org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:146)
        at
org.glassfish.scripting.gem.GlassFishMain.startGlassFishEmbedded(GlassFishMain.java:145)
       [...]


If I change it to non-daemon mode (enable: false), I get the following on
the console:

[root_at_mobileadapp02 sched2]# jruby -S glassfish
Parsing config file: /usr/local/sigma/sched2/config/glassfish.yml
Starting GlassFish server at: 0.0.0.0:80 in production environment...
Writing log messages to: /usr/local/sigma/sched2/log/production.log.
Press Ctrl+C to stop.
java.lang.UnsupportedOperationException: Cannot create XMLStreamReader or
XMLEventReader from a javax.xml.transform.stream.StreamSource
        at
com.sun.xml.internal.stream.XMLInputFactoryImpl.jaxpSourcetoXMLInputSource(XMLInputFactoryImpl.java:285)
        at
com.sun.xml.internal.stream.XMLInputFactoryImpl.createXMLStreamReader(XMLInputFactoryImpl.java:145)
        at org.jvnet.hk2.config.ConfigParser.parse(ConfigParser.java:102)
        at
org.glassfish.kernel.config.DefaultConfigParser$2.run(DefaultConfigParser.java:93)
       [...]


Any suggestions?

Thanks,
Mark


On Wed, Nov 11, 2009 at 9:46 AM, Vivek Pandey <Vivek.Pandey_at_sun.com> wrote:

> Mark,
>
> Just looking at the warning message I can say what really might be going
> on. Perhaps someone from grizzly team can comment on this particular issue.
>
> In the meantime can you give the latest glassfish gem (not released yet) a
> try? It will be released soon after more testing but it has latest stable
> Grizzly and glassfish v3 kernel bits. I think its worth a try. Get build#120
> from http://hudson.glassfish.org/job/glassfish-gem-build/.
>
> If the latest gem does not fix your problem, can you send the thread dump?
> kill -QUIT pid or ctrl + \
>
> -vivek.
>
>
>
> Mark Westling wrote:
>
>> I'm running my Rails project using the Glassfish v3 gem and if there's no
>> activity for an hour or two hours, the next request hangs and logs the
>> following error:
>>
>> Nov 11, 2009 3:15:44 AM com.sun.grizzly.config.GrizzlyServiceListener
>> WARNING: Interrupting idle Thread: http80-WorkerThread(0)
>>
>> I'm using the default parameters in the glassfish.yml configuration file.
>> This occurs in both daemon and non-daemon mode. The only unusual thing I
>> might be doing is creating (and closing) several processing threads during
>> some requests to take advantage of multiple cores for lengthy computations,
>> but the problem seems to occur even if I don't run any thread-creation
>> processes after a restart. In other words, I can restart glassfish, wait a
>> few hours with no requests, and see the same error.
>>
>> Configuration:
>> jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java
>> HotSpot(TM) Client VM 1.6.0_18-ea) [i386-java]
>> rails 2.3.3
>> glassfish gem 0.9.5
>> database adapter: jdbcmysql
>> Linux version 2.6.18-164.el5PAE (mockbuild_at_x86-002.build.bos.redhat.com<mailto:
>> mockbuild_at_x86-002.build.bos.redhat.com>) (gcc version 4.1.2 20080704 (Red
>> Hat 4.1.2-46)) #1 SMP
>>
>> Any suggestions?
>>
>> --Mark
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>