PostgreSQL SSL Error - ruby-on-rails

We've got a WebApp mixing Ember.js, Rails, unicorn and PostgreSQL, all of them on Heroku.
All is working well, except we sometimes get a PGError
PG::ConnectionBad: PQconsumeInput() SSL error: BN lib
Most of the time, we can continue to use the app without any problems, but sometimes this error brokes the JS and we have to reload the page to be able to use the WebApp.
We believe it could be somethings like Unicorn lost the PG connection, but there is nearly nothing on the web related to this error message.
Any idea would be appreciated.
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:779
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:779
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:139
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:425
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:420
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:137
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:885
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:24
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/query_cache.rb:61
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/query_cache.rb:76
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/query_cache.rb:61
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/querying.rb:36
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/relation.rb:585
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/relation.rb:471
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/relation.rb:220
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/associations/collection_association.rb:415
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/associations/collection_association.rb:358
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/associations/collection_proxy.rb:45
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/associations/collection_proxy.rb:920
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/relation/delegation.rb:12
[GEM_ROOT]/gems/active_model_serializers-0.8.1/lib/active_model/array_serializer.rb:79
[GEM_ROOT]/gems/active_model_serializers-0.8.1/lib/active_model/array_serializer.rb:73
[GEM_ROOT]/gems/active_model_serializers-0.8.1/lib/active_model/array_serializer.rb:49
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/json/encoding.rb:50
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/json/encoding.rb:81
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/json/encoding.rb:49
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/json/encoding.rb:34
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/core_ext/object/to_json.rb:16
[GEM_ROOT]/gems/active_model_serializers-0.8.1/lib/active_model/array_serializer.rb:63
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/renderers.rb:90
[GEM_ROOT]/gems/active_model_serializers-0.8.1/lib/action_controller/serialization.rb:46
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/renderers.rb:33
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/set.rb:232
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/set.rb:232
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/renderers.rb:30
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/renderers.rb:26
[GEM_ROOT]/gems/actionpack-4.0.0/lib/abstract_controller/rendering.rb:97
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/rendering.rb:16
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/instrumentation.rb:41
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/core_ext/benchmark.rb:12
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/benchmark.rb:296
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/core_ext/benchmark.rb:12
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/instrumentation.rb:41
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/instrumentation.rb:84
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/railties/controller_runtime.rb:25
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/instrumentation.rb:40
[GEM_ROOT]/gems/wicked_pdf-0.9.6/lib/pdf_helper.rb:23
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/responder.rb:255
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/responder.rb:203
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/responder.rb:182
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/responder.rb:176
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/responder.rb:154
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/responder.rb:147
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/mime_responds.rb:330
app/controllers/api/v1/protocols_controller.rb:8
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/implicit_render.rb:4
[GEM_ROOT]/gems/actionpack-4.0.0/lib/abstract_controller/base.rb:189
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/rendering.rb:10
[GEM_ROOT]/gems/actionpack-4.0.0/lib/abstract_controller/callbacks.rb:18
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:413
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:80
[GEM_ROOT]/gems/actionpack-4.0.0/lib/abstract_controller/callbacks.rb:17
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/rescue.rb:29
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/instrumentation.rb:31
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/instrumentation.rb:30
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/params_wrapper.rb:245
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/railties/controller_runtime.rb:18
[GEM_ROOT]/gems/actionpack-4.0.0/lib/abstract_controller/base.rb:136
[GEM_ROOT]/gems/actionpack-4.0.0/lib/abstract_controller/rendering.rb:44
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal.rb:195
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal/rack_delegation.rb:13
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_controller/metal.rb:231
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:80
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:80
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:48
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:44
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:71
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:59
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:59
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:655
[GEM_ROOT]/gems/newrelic_rpm-3.6.6.147/lib/new_relic/rack/error_collector.rb:43
[GEM_ROOT]/gems/newrelic_rpm-3.6.6.147/lib/new_relic/rack/agent_hooks.rb:22
[GEM_ROOT]/gems/newrelic_rpm-3.6.6.147/lib/new_relic/rack/browser_monitoring.rb:16
[GEM_ROOT]/gems/warden-1.2.3/lib/warden/manager.rb:35
[GEM_ROOT]/gems/warden-1.2.3/lib/warden/manager.rb:34
[GEM_ROOT]/gems/warden-1.2.3/lib/warden/manager.rb:34
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/etag.rb:23
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/conditionalget.rb:25
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/head.rb:11
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/middleware/params_parser.rb:27
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/middleware/flash.rb:241
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/middleware/cookies.rb:486
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/query_cache.rb:36
[GEM_ROOT]/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:626
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/middleware/callbacks.rb:29
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:373
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:80
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/middleware/callbacks.rb:27
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/middleware/remote_ip.rb:76
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/middleware/debug_exceptions.rb:17
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/middleware/show_exceptions.rb:30
[GEM_ROOT]/gems/railties-4.0.0/lib/rails/rack/logger.rb:38
[GEM_ROOT]/gems/railties-4.0.0/lib/rails/rack/logger.rb:21
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:67
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:25
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:67
[GEM_ROOT]/gems/railties-4.0.0/lib/rails/rack/logger.rb:21
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/middleware/request_id.rb:21
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/methodoverride.rb:21
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/runtime.rb:17
[GEM_ROOT]/gems/activesupport-4.0.0/lib/active_support/cache/strategy/local_cache.rb:83
[GEM_ROOT]/gems/actionpack-4.0.0/lib/action_dispatch/middleware/static.rb:64
[GEM_ROOT]/gems/railties-4.0.0/lib/rails/engine.rb:511
[GEM_ROOT]/gems/railties-4.0.0/lib/rails/application.rb:97
[GEM_ROOT]/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:552
[GEM_ROOT]/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:632
[GEM_ROOT]/gems/newrelic_rpm-3.6.6.147/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:22
[GEM_ROOT]/gems/newrelic_rpm-3.6.6.147/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:22
[GEM_ROOT]/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:500
[GEM_ROOT]/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:142
[GEM_ROOT]/gems/unicorn-4.6.3/bin/unicorn:126
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/bin/unicorn:23
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/bin/unicorn:23

Related

CableReady (Rails) Basic case giving mystifying error message

cable_ready 4.5.0
rails 6.1.4.1
ruby 3.0.2p107
This is a simple example from the basic tutorial (https://www.youtube.com/watch?v=F5hA79vKE_E) I suspect the error I am getting is because either cable_ready or rails evolved a little and created a tiny incompatibility.
I get this error in the JS console:
It is triggered when in my controller I ask cable ready to:
cable_ready["timeline"].console_log(message: "***** cable ready post created")
Which leads to my timeline_channel to:
received(data) {
console.log("******** Received data:", data.operations)
if (data.cableReady) CableReady.perform(data.operations)
}
My interpretation is perform causes this line in cable_ready.js line 13:
operations.forEach(function (operation) {
if (!!operation.batch) batches[operation.batch] = batches[operation.batch] ? ++batches[operation.batch] : 1;
});
Is finding something in the received data that it doesn't like.
That's where my trail ends. Can someone see what I am doing wrong, or tell me what other code you'd like me to include?
Solution: downgrade the version of the cable_ready javascript library.
I previously (maybe a year ago) did this tutorial using CableReady 4.5, Ruby 2.6.5 and Rails 6.0.4 and it worked like a charm back then as well as today.
But today, I tried this tutorial again on a duplicate project--same versions of CR, Ruby, and Rails and now I get java console errors similar to yours.
TypeError: undefined is not a function (near '...operations.forEach...')
perform -- cable_ready.js:13
received -- progress_bar_channel.js:8
I looked at the output of yarn list and saw that cable_ready was version 5.0.0-pre8 on the bad project and it was 5.0.0-pre1 on the good project. The downgrade could be accomplished with yarn add cable_ready#^5.0.0-pre1 in the bad project folder and now both projects work.
FYI for other newbies like me trying to understand how CableReady works: This tutorial gives another example of CableReady, and was also fixed the same way.

On production server at one page I am getting Fatal error ActionView::Template::Error

I am getting this error " ActionView::Template::Error (bad component(expected host component): ): ", on research on stackoverflow I observed this error is occurring on wrong config of mailer. But I have not configured any mails.
From the details shared , the first line indicates error in fetching the data.
A line of action to resolve this could be,
first to check the correctness of data fetch using rails console/sandbox environment.
Once point 1 above is sorted out and still error, then have a look at the view and check the rendering/flow.
This will point you to the error.

Authlogic save causing 502 Bad Gateway error, Illegal Instruction in Rails console

I recently set up a new app server (Ruby 1.8.7 REE, Rails 2.3.8, Passenger 3.0.9, Nginx 1.0.6) behind a proxy and am encountering some strange behavior. When posting to /login on this app server alone, I get a 502 Bad Gateway error. This does not happen on the other app server, and both are set up identically. I've narrowed the problem down to a specific line of code - the saving of an Authlogic session. When I comment out these lines (specifically the save call):
#user_session = UserSession.new(params[:user_session])
if #user_session.save
...
the 502 error no longer occurs. Likewise, when I test these commands in the console, I get an Illegal Instruction response and the console crashes:
>> Authlogic::Session::Base.controller = Authlogic::ControllerAdapters::RailsAdapter.new(self)
>> #user_session = UserSession.new({"password"=>"password", "remember_me"=>"0", "login"=>"myuser"})
>> #user_session.save
Illegal instruction
Testing this on the other app server works just fine (console does not crash with Illegal Instruction result).
Any idea where to begin troubleshooting this? I see nothing of value in either the Rails logs or the Nginx logs.
Thanks.
Edit
The Illegal Instruction is occurring during a system call to digest.rb. The same thing happens whether I use the Ubuntu Ruby Enterprise Edition package or whether I compile it myself:
stat("/opt/ruby-enterprise-1.8.7-2011.12/lib/ruby/1.8/digest.rb", {st_mode=S_IFREG|0644, st_size=1145, ...}) = 0
open("/opt/ruby-enterprise-1.8.7-2011.12/lib/ruby/1.8/digest.rb", O_RDONLY) = 15
fstat(15, {st_mode=S_IFREG|0644, st_size=1145, ...}) = 0
close(15) = 0
--- SIGILL (Illegal instruction) # 0 (0) ---
This sounds like it's related to Ruby 1.9 Ramaze App Failing with “Illegal instruction”.
Jörg W Mittag said:
"Illegal instruction" is usually an error message from the CPU meaning some piece of binary code you tried to run contained an instruction that is not implemented on that particular CPU.
This can have multiple reasons:
The binary was compiled with optimization settings for the wrong CPU. The CPU vendors add new instructions all the time, if the compiler optimizes for a CPU that is newer than the one you have, it might have emitted an instruction that your CPU doesn't understand.
The compiler is broken.
The binary is corrupted.
The code you are compiling contains assembly code or intrinsics containing instructions that your CPU doesn't have.
The original question submitter Phil Kulak replied that he had found a stack overflow causing the error.

Weblogic filestore, Transaction has timed out when making request

We are using distributed JMS on weblogic and some times ResourceAccessException occurs. We tried deleting filestores, restarting servers and changing JTA timeout to 300 seconds. (default is 30 seconds).
But we are getting the same error. What could be the reason?
Thanks
Caused by: javax.transaction.SystemException: start() failed on resource 'WLStore_COLUMBUS-ADA-PROD-DMN_ColumbusADAFileStore': XAER_RMERR : A resource manager error has occured in the transaction branch
weblogic.transaction.internal.ResourceAccessException: Transaction has timed out when making request to XAResource 'WLStore_COLUMBUS-ADA-PROD-DMN_ColumbusADAFileStore'.
at weblogic.transaction.internal.XAResourceDescriptor.startResourceUse(XAResourceDescriptor.java:670)
at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1230)
at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1164)
at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:296)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:522)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:449)
at weblogic.store.gxa.internal.GXAResourceImpl.enlist(GXAResourceImpl.java:442)
at weblogic.messaging.kernel.internal.KernelImpl.getGXATransaction(KernelImpl.java:570)
at weblogic.messaging.kernel.internal.QueueImpl.send(QueueImpl.java:329)
at weblogic.jms.backend.BEDestinationImpl.sendIssueMessage(BEDestinationImpl.java:1873)
at weblogic.jms.backend.BEDestinationImpl.send(BEDestinationImpl.java:2108)
at weblogic.jms.backend.BEDestinationImpl.wrappedSend(BEDestinationImpl.java:2051)
at weblogic.jms.backend.BEDestinationImpl.invoke(BEDestinationImpl.java:1539)
at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Request.java:961)
at weblogic.messaging.dispatcher.DispatcherImpl.dispatchAsyncInternal(DispatcherImpl.java:139)
at weblogic.messaging.dispatcher.DispatcherImpl.dispatchAsync(DispatcherImpl.java:115)
at weblogic.messaging.dispatcher.Request.dispatchAsync(Request.java:1303)
at weblogic.jms.dispatcher.Request.dispatchAsync(Request.java:96)
at weblogic.jms.frontend.FEProducer.doDispatch(FEProducer.java:888)
at weblogic.jms.frontend.FEProducer.sendRetryDestination(FEProducer.java:1021)
at weblogic.jms.frontend.FEProducer.send(FEProducer.java:1405)
at weblogic.jms.frontend.FEProducer.invoke(FEProducer.java:1466)
at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Request.java:961)
at weblogic.messaging.dispatcher.DispatcherImpl.syncRequest(DispatcherImpl.java:184)
at weblogic.messaging.dispatcher.DispatcherImpl.dispatchSyncNoTran(DispatcherImpl.java:287)
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:59)
at weblogic.jms.client.JMSProducer.toFEProducer(JMSProducer.java:1293)
at weblogic.jms.client.JMSProducer.deliveryInternal(JMSProducer.java:796)
at weblogic.jms.client.JMSProducer.sendInternal(JMSProducer.java:541)
at weblogic.jms.client.JMSProducer.sendWithListener(JMSProducer.java:394)
at weblogic.jms.client.JMSProducer.send(JMSProducer.java:384)
at weblogic.jms.client.WLProducerImpl.send(WLProducerImpl.java:970)
at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:592)
at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:569)
at org.springframework.jms.core.JmsTemplate$4.doInJms(JmsTemplate.java:546)
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466)
at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:543)
at com.turkcellteknoloji.calypso.jms.SendToJms.insertJms(SendToJms.java:35)
at com.turkcellteknoloji.calypso.action.impl.SentTransactionToJms.execute(SentTransactionToJms.java:15)
at com.turkcellteknoloji.calypso.service.impl.Service.execute(Service.java:36)
at com.turkcellteknoloji.calypso.service.impl.JmsService.onMessage(JmsService.java:21)
at com.turkcellteknoloji.calypso.service.impl.JmsService.onMessage(JmsService.java:12)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:534)
at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:495)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:977)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:969)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:871)
at java.lang.Thread.run(Thread.java:619)
Caused by: weblogic.transaction.internal.TimedOutException: Transaction has timed out when making request to XAResource 'WLStore_COLUMBUS-ADA-PROD-DMN_ColumbusADAFileStore'.
at weblogic.transaction.internal.XAResourceDescriptor.startResourceUse(XAResourceDescriptor.java:673)
... 50 more
at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1188)
at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:296)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:522)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:449)
at weblogic.store.gxa.internal.GXAResourceImpl.enlist(GXAResourceImpl.java:442)
... 44 more
Have you tried to change the"Synchronous Write Policy"? It affects the JMS file store's performance, scalability, and reliability.
Adding similar issue found with Weblogic hosted application kept failing with little or no reason with stack trace:
Caused by: weblogic.jms.common.JMSException: weblogic.messaging.kernel.KernelException: Error enlisting GXA transaction
at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:110)
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncTran(DispatcherAdapter.java:53)
at weblogic.jms.client.JMSProducer.toFEProducer(JMSProducer.java:1300)
at weblogic.jms.client.JMSProducer.deliveryInternal(JMSProducer.java:807)
at weblogic.jms.client.JMSProducer.sendInternal(JMSProducer.java:543)
at weblogic.jms.client.JMSProducer.sendWithListener(JMSProducer.java:394)
at weblogic.jms.client.JMSProducer.send(JMSProducer.java:384)
at weblogic.jms.client.WLProducerImpl.send(WLProducerImpl.java:970)
at weblogic.deployment.jms.WrappedMessageProducer.send(WrappedMessageProducer.java:188)
at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:626)
at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:597)
at org.springframework.jms.core.JmsTemplate$3.doInJms(JmsTemplate.java:562)
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:484)
With little information available, followed some other suggestions to re-create the JMS data store which could have been corrupted.
In our case located here:
..fmw_home/user_projects/domains/ipp_domain/servers/myapplicationName/data/store/default - filename WLS******.DAT
A graceful shutdown to allow as many as possible messages to be resolved is suggested, then shut down application and Weblogic Server before removing the file (would suggest a backup).
After a restart, these issues disappeared, and no more errors were logged, but I'm not sure what the cause was. You would probably have to accept that any transactional data in the JMS queue will be lost.

jRuby error - can't modify frozen array

I keep getting this error in my App, no matter what I try to fix.
"can't modify frozen array"
Any idea what could be possibly wrong here? I am running a jRuby (1.6.2) app on Torquebox (1.0.1) on my local Ubuntu (10.04) machine. Here is a complete stack trace
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: org.jruby.exceptions.RaiseException: (TypeError) can't modify frozen array
org.torquebox.rack.core.servlet.RackFilter.doRack(RackFilter.java:118)
org.torquebox.rack.core.servlet.RackFilter.doFilter(RackFilter.java:103)
org.torquebox.rack.core.servlet.RackFilter.doFilter(RackFilter.java:75)
root cause
org.jruby.exceptions.RaiseException: (TypeError) can't modify frozen array
org.jruby.RubyArray.concat(org/jruby/RubyArray.java:1450)
#<Class:0x1009c9a44>.Plugin(/home/torquebox-1.0.1/jruby/lib/ruby/gems/1.8/gems/railties-3.0.7/lib/rails/plugin.rb:71)
org.jruby.RubyKernel.instance_exec(org/jruby/RubyKernel.java:2045)
rubyjit.run_7761DFB9328DE427D0E75A527B886E70C475D69F.run(/home/torquebox-1.0.1/jruby/lib/ruby/gems/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:25)
#<Class:0x1000dfe45>.run_initializers(/home/torquebox-1.0.1/jruby/lib/ruby/gems/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:50)
org.jruby.RubyArray.each(org/jruby/RubyArray.java:1602)
Rails::Initializable.run_initializers(/home/torquebox-1.0.1/jruby/lib/ruby/gems/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:49)
Rails::Application.initialize!(/home/torquebox-1.0.1/jruby/lib/ruby/gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:134)
rubyjit.method_added_79E9152BC344C327B5B6A61AD8A4DB7112D305D2.method_added(classpath:/org/torquebox/rails/core/boot.rb:78)
org.jruby.RubyKernel.send(org/jruby/RubyKernel.java:2059)
#<Class:0x101305815>.method_missing(/home/torquebox-1.0.1/jruby/lib/ruby/gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:77)
#<Class:0x1002cf032>.(root)(vfs:/home/Ruby_Projects/Sample-Torquebox-App/config/environment.rb:5)
org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1038)
rubyjit.require_48BC09453A4C02A82A5E47520814DA9EA3718525.require(/home/torquebox-1.0.1/jruby/lib/ruby/gems/1.8/gems/polyglot-0.3.1/lib/polyglot.rb:64)
rubyjit.require_3E6CA858403268171F46C45451765CD50640768C.require(/home/torquebox-1.0.1/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239)
rubyjit.load_dependency_04443C3CFAC2D53B173F0FF308908A72BD893CCC.load_dependency(/home/torquebox-1.0.1/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:227)
rubyjit.require_3E6CA858403268171F46C45451765CD50640768C.require(/home/torquebox-1.0.1/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239)
#<Class:0x101f38e01>.(root)(vfs:/home/Ruby_Projects/Sample-Torquebox-App/config/environment.rb:6)
org.jruby.RubyKernel.instance_eval(org/jruby/RubyKernel.java:2028)
Rack::Builder.initialize(/home/torquebox-1.0.1/jruby/lib/ruby/gems/1.8/gems/rack-1.2.3/lib/rack/builder.rb:46)
#<Class:0x1002cf032>.(root)(vfs:/home/Ruby_Projects/Sample-Torquebox-App/config.ru:3)
note The full stack trace of the root cause is available in the JBoss Web/3.0.0-CR1 logs.
JBoss Web/3.0.0-CR1
If you get the error during startup, chances are big you're actually trying to redefine a frozen array in an initializer (could be as simple as redifining ABBR_DAYNAMES). If the application can run under MRI you could try that, since it gives you verbose warnings about this.
If there's nothing in your initializer, then it might be a gem that you included in your application. Try taking out gems one by one and see what the result is.

Resources