Skip to content

Instantly share code, notes, and snippets.

require 'rubygems'
require 'bundler/setup'
Bundler.require(:default)
class MongoClient
def initialize
@mongo_client = Mongo::MongoClient.new 'localhost',30999, pool_size: 3, pool_timeout:1, op_timeout:1, connect_timeout:1, read: :secondary
#:secondary_preferred
@mongo_database = @mongo_client['mongodb_outage_test']
end
source 'https://rubygems.org'
gem 'mongo'
gem 'bson_ext'
m30999| 2015-01-26T14:59:41.936+0100 [Balancer] distributed lock 'balancer/Lowang-MacBook-Pro.local:30999:1422278030:16807' unlocked.
m31102| 2015-01-26T14:59:44.699+0100 [conn210] end connection 192.168.1.220:52935 (4 connections now open)
m31102| 2015-01-26T14:59:44.701+0100 [initandlisten] connection accepted from 192.168.1.220:52951 #213 (5 connections now open)
m31100| 2015-01-26T14:59:46.655+0100 [conn234] end connection 192.168.1.220:52936 (10 connections now open)
m31100| 2015-01-26T14:59:46.656+0100 [initandlisten] connection accepted from 192.168.1.220:52952 #237 (11 connections now open)
m30999| 2015-01-26T14:59:47.945+0100 [Balancer] distributed lock 'balancer/Lowang-MacBook-Pro.local:30999:1422278030:16807' acquired, ts : 54c64853ce5c61cbab9c833b
m30999| 2015-01-26T14:59:47.945+0100 [Balancer] distributed lock 'balancer/Lowang-MacBook-Pro.local:30999:1422278030:16807' unlocked.
m30999| 2015-01-26T14:59:50.723+0100 [LockPinger] cluster Lowang-MacBook-Pro.local:29000 pinged successfully at
source 'http://rubygems.org'
ruby "1.9.3", :engine => "jruby", :engine_version => "1.7.19"
gem 'torquebox-messaging', '~> 3.1.2', platform: :jruby
gem 'torquebox', '~> 3.1.2', platform: :jruby
source 'https://rubygems.org'
gem 'activesupport'
gem 'sidekiq'
gem 'pry'
class Credentials
@@credentials = {}
class << self
def set_current(credentials)
@@credentials[Thread.current.object_id] = credentials
end
def current
@@credentials[Thread.current.object_id]
end
end
@lowang
lowang / Gemfile
Created April 3, 2012 09:56
Torquebox 2.0.0 queue system performance
source 'http://rubygems.org'
gem 'rack'
gem 'activesupport'
gem "torquebox", '2.0.0'
@lowang
lowang / server.log
Created April 17, 2012 08:00
Torquebox 2.0.0 error while deploying application
09:54:38,555 INFO [org.jboss.as.server.deployment] (MSC service thread 1-13) JBAS015876: Starting deployment of "search_api-knob.yml"
09:54:38,555 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015863: Replacement of deployment "search_api-knob.yml" by deployment "search_api-knob.yml" was rolled back with failure mes
sage {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"search_api-knob.yml\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"search_api-knob.yml\".STRUC
TURE: Failed to process phase STRUCTURE of deployment \"search_api-knob.yml\""}}
09:54:38,557 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-20) MSC00001: Failed to start service jboss.deployment.unit."search_api-knob.yml".STRUCTURE: org.jboss.msc.service.StartException i
n service jboss.deployment.unit."search_api-knob.yml".STRUCTURE: Failed to process phase STRUCTURE of deployment "search_api-knob.yml"
at org.jboss.as.server.deployment.DeploymentUnitPhaseServic
@lowang
lowang / server.log
Created April 24, 2012 14:22
16:03:26: Torquebox error [org.jboss.as.clustering.infinispan] (MSC service thread 1-7) JBAS010282: Stopped //default-host//backstage cache from web container
This file has been truncated, but you can view the full file.
10:39:23,588 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 44) JBAS016200: Activating ConfigAdmin Subsystem
10:39:23,613 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 49) JBAS010280: Activating Infinispan subsystem.
10:39:23,636 INFO [org.jboss.as.jacorb] (ServerService Thread Pool -- 50) JBAS016300: Activating JacORB Subsystem
10:39:23,639 INFO [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on /192.168.20.194:9999
10:39:23,671 INFO [org.jboss.as.security] (ServerService Thread Pool -- 68) JBAS013101: Activating Security Subsystem
10:39:23,677 INFO [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 55) JBAS010260: Activating JGroups subsystem.
10:39:23,693 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 62) JBAS011800: Activating Naming Subsystem
10:39:23,704 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 63) JBAS011940: Activating OSGi Subsystem
10:39:23,709 INFO [org.jboss.as.security] (MSC service threa
@lowang
lowang / server.log
Created April 25, 2012 12:29
server.log showing JBoss error 503 - The requested service () is not currently available
This file has been truncated, but you can view the full file.
00:01:33,502 WARN [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016037: Could not find new XAResource to use for recovering non-serializable XAResource XAResourceRecord < resource:null, txid:< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffc0a814c2:-a998a16:4f956b63:266e18f, node_name=1, branch_uid=0:ffffc0a814c2:-a998a16:4f956b63:266e190, subordinatenodename=null, eis_name=unknown eis name >, heuristic: TwoPhaseOutcome.FINISH_OK com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord@62f7c57d >
00:01:33,534 WARN [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016038: No XAResource to recover < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffc0a814c2:-a998a16:4f956b63:266e18f, node_name=1, branch_uid=0:ffffc0a814c2:-a998a16:4f956b63:266e190, subordinatenodename=null, eis_name=unknown eis name >
00:01:33,536 WARN [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016037: Could not find new XAResource to use for recovering non-serializable XAResource XAResourceRecord <