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: Mon, 16 Nov 2009 14:39:43 -0500

Hi Vivek,

I've opened an issue on RubyForge as you suggested. gfrake didn't help; in
fact, I can reproduce the errors using a newly created rails app. So, I
suspect it's some kind of configuration problem. (I did check and I'm using
rubygem 1.3.5).

Going back to the original problem (connection freezing after a long idle),
should I paste a thread dump (from 0.9.5, obviously) here on the list or
open another issue?

Thanks!
Mark


On Thu, Nov 12, 2009 at 2:13 PM, Vivek Pandey <Vivek.Pandey_at_sun.com> wrote:

> I double checked the tests and see everything working just fine.
>
> I am not doubting this as an issue at your end but will mention it anyway,
> since 0.9.6.dev has (dev) suffix, which gem treats as pre-release version.
> There are issues using the prerelease versions with rubygem < 1.3.5. So I
> would recommend doing
>
> gem update --system
>
> This will update your rubygem to 1.3.5 and 0.9.6.dev after installed will
> be identified as the latest version.
>
> You can open an issue ticket at
> http://rubyforge.org/projects/glassfishgem/. Also provide steps on how I
> can reproduce it.
>
> -vivek.
>
>
> Vivek Pandey wrote:
>
>> Hmm. Our tests are running fine with this gem. I guess I know what might
>> be happening.
>>
>> Can you try
>>
>> $ gfrake clean
>>
>> and then run your application. This new glassfish gem is supposed to
>> cleanup previous tmp/.glassfish left from previous gem run maybe there is
>> some bug and thats what is causing this failure.
>>
>> I will spend some time tomorrow to investigate whats going on with daemon
>> mode. Some resource injection seem to be failing.
>>
>> -vivek.
>>
>> Mark Westling wrote:
>>
>>> 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 <
>>> http://mobileadapp02.myclient-domain.com>: mobileadapp02.
>>> myclient-domain.com <http://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 <http://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<mailto:
>>> 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>
>>> <mailto: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
>>> <mailto:webtier-unsubscribe_at_glassfish.dev.java.net>
>>> For additional commands, e-mail:
>>> webtier-help_at_glassfish.dev.java.net
>>> <mailto:webtier-help_at_glassfish.dev.java.net>
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>