torquebox / backstage Goto Github PK
View Code? Open in Web Editor NEWQueue/Topic/Job viewer for TorqueBox
Queue/Topic/Job viewer for TorqueBox
Running Torquebox 2.0.3 in standalone-ha mode with an installed backstage results in the following warning message being created.
09:24:01,818 WARN [org.infinispan.loaders.file.FileCacheStore] (Scheduled-eviction-thread-0) ISPN000163: FileCacheStore ignored an unexpected file backstage in path C:\torquebox-current\jboss\standalone\data\web\default-host. The store path should be dedicated!
I checked and there is a backstage folder being put in that directory but it is always empty.
Is ultra important to have visibility to metrics like:
-cache object number
-get
-puts
-hit rate
-%mem used
It would be great to have something... i don't know if it is possible.
Undefined method join for String
Backstage has many very strict dependencies in its gemfile, for example, backstage depends on thor 0.14.6 exactly. This makes it very difficult to use backstage with any reasonably sized app.
If you create a simple rails 4.x (4.2.0) application and use Backstage to evaluate against the application pool where the last line is a string (e.g. "test") no results will be displayed.
There looks to be a compatibility issue in the String from the target application's to_json (from ActiveSupport::JSON), and the JSON generator. Both are using json (1.8.2-java), but when the to_json is called on the resulting String the following exception is thrown. I debugged into the Java code a bit and it looks like RuntimeInfo Java class used by the Generator is not fully populate with all of its context information.
You can workaround this by adding the following to_json method to the String instance you are returning from your Evaluation script.
str = "foo"
def str.to_json(options = {})
"\"#{self}\""
end
# last line of evaluate script
str
Java::JavaLang::NullPointerException - :
json.ext.Generator$6.generate(Generator.java:385)
json.ext.Generator$6.generate(Generator.java:371)
json.ext.Generator$Handler.generateNew(Generator.java:172)
json.ext.Generator.generateJson(Generator.java:36)
json.ext.GeneratorMethods$RbString.to_json(GeneratorMethods.java:106)
json.ext.GeneratorMethods$RbString$INVOKER$s$0$0$to_json.call(org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.IfNode.interpret(IfNode.java:116)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:76)
org.jruby.RubyClass.finvoke(RubyClass.java:718)
org.jruby.runtime.Helpers.invoke(Helpers.java:512)
org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:371)
json.ext.Generator$8.generateNew(Generator.java:431)
json.ext.Generator$8.generate(Generator.java:440)
json.ext.Generator$5$1.visit(Generator.java:357)
org.jruby.RubyHash.visitLimited(RubyHash.java:648)
org.jruby.RubyHash.visitAll(RubyHash.java:634)
json.ext.Generator$5.generate(Generator.java:336)
json.ext.Generator$5.generate(Generator.java:309)
json.ext.Generator$Handler.generateNew(Generator.java:172)
json.ext.Generator.generateJson(Generator.java:58)
json.ext.GeneratorState.generate(GeneratorState.java:210)
json.ext.GeneratorState$INVOKER$i$1$0$generate.call(org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.
I am trying to get my head around how backstage does things like see what queues currently exist.
In doing so I decided to have a look at the jmx gem (version 0.9).
The gem exists on rubygems.org but the actual github repo has disappeared.
It looks like it has been replaced with jmxjr. Assuming the old gem is no longer developed it may be a good idea for backstage to switch gems.
@enebo Has the jmx gem source code location changed?
12:20 tcrawley: I noticed backstage doesn't use sessions - on purpose?
12:20 apparently mod_cluster can't do ip-based session affinity, only session-based session affinity
12:20 so since backstage doesn't use sessions requests basically get round-robin'ed
12:20 ah
12:21 it was 'on purpose' before since we weren't storing any session data
12:21 but it looks like it may be useful
12:21 that may be what is screwing the console
12:21 yeah I figured that screws up the console
12:21 but is useful for lanceball's testing otherwise I think
Attempting to use Backstage on the newly released 2.3.0 version of torquebox results in the following error
exception
javax.servlet.ServletException: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- torquebox/webconsole
org.torquebox.web.servlet.RackFilter.doRack(RackFilter.java:117)
org.torquebox.web.servlet.RackFilter.doFilter(RackFilter.java:101)
org.torquebox.web.servlet.RackFilter.doFilter(RackFilter.java:72)
org.torquebox.web.servlet.SendfileFilter.doFilter(SendfileFilter.java:49)
org.torquebox.web.servlet.SendfileFilter.doFilter(SendfileFilter.java:33)
root cause
org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- torquebox/webconsole
org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
RUBY.(root)(/home/jjones/.rvm/gems/jruby-1.7.1@testapp/gems/torquebox-backstage-1.0.7/backstage.rb:19)
org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
RUBY.(root)(/home/jjones/.rvm/gems/jruby-1.7.1@testapp/gems/torquebox-backstage-1.0.7/config.ru:1)
org.jruby.RubyBasicObject.instance_eval(org/jruby/RubyBasicObject.java:1691)
RUBY.(root)(/home/jjones/.rvm/gems/jruby-1.7.1@testapp/gems/torquebox-backstage-1.0.7/config.ru:5)
RUBY.initialize(/home/jjones/.rvm/gems/jruby-1.7.1@testapp/gems/rack-1.4.1/lib/rack/builder.rb:51)
torquebox-webconsole gem is definitely installed.
This error has occurred on Linux (jruby 1.7.1 and 1.7.2 tested) and Windows (1.7.3-dev tested) with 2.3.0. Works correctly with 2.2.0
I am running Torquebox 2.x and following the instructions (https://github.com/torquebox/backstage), I got this error:
C:\dev\sinatra-projects\torquebox-backstage>jruby -S gem build torquebox-backstage.gemspec --debug
ERROR: While executing gem ... (Encoding::InvalidByteSequenceError)
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/package/tar_writer.rb:46:in `write'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/builder.rb:91:in `write_package'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/package/tar_writer.rb:147:in `add_file_simple'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/builder.rb:90:in `write_package'
org/jruby/RubyArray.java:1612:in `each'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/builder.rb:82:in `write_package'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/package/tar_output.rb:73:in `add_gem_contents'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/package/tar_writer.rb:83:in `new'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/package/tar_output.rb:67:in `add_gem_contents'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/package/tar_output.rb:65:in `add_gem_contents'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/package/tar_writer.rb:113:in `add_file'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/package/tar_output.rb:63:in `add_gem_contents'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/package/tar_output.rb:31:in `open'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:44:in `open'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/builder.rb:78:in `write_package'
org/jruby/RubyIO.java:1115:in `open'
org/jruby/RubyKernel.java:308:in `open'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/builder.rb:77:in `write_package'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/builder.rb:39:in `build'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/commands/build_command.rb:25:in `execute'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/command.rb:278:in `invoke'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:147:in `process_args'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:117:in `run'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:65:in `run'
C:/dev/torquebox/torquebox-2.x/jruby/bin/gem:21:in `(root)'
Exception `Gem::SystemExitException' at C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/user_interaction.rb:332 - Exiting RubyGems with exit_code 1
Thanks!
When I try to bundle with JRuby 1.7.8 and Rails 3.2.14, I get:
Bundler could not find compatible versions for gem "sass":
In Gemfile:
torquebox-backstage (>= 0) java depends on
sass (~> 3.1.2) java
zurb-foundation (~> 4.3.1) java depends on
sass (3.2.12)
Can we bump the sass requirements? (Or am I messing something up?)
$ jruby -S bundle install
The source :rubygems is deprecated because HTTP requests are insecure.
Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
I'll submit a pull request in a couple minutes.
This one is more tricky:
I deployed backstage in production mode via "backstage deploy" command.
torquebox server tries to load the development dependencies from
javax.servlet.ServletException: org.jruby.exceptions.RaiseException: (GemNotFound) Could not find diff-lcs-1.1.2 in any of the sources
javax.servlet.ServletException: org.jruby.exceptions.RaiseException: (GemNotFound) Could not find gem 'jeweler (>= 0, runtime)' in any of the gem sources listed in your Gemfile.
You should consider removing Gemfile, Gemfile.lock and bundler dependency from the gem because
all dependencies are fetched during the regular installation of the torquebox-backstage gem.
Hi.
under Windows
torquebox 3.1.2
torqueboxbackstage 1.1.1
My sequence is:
backstage deploy --secure=admin:admin123
torquebox run in other command windows
firefox to http://localhost:8080/backstage/. Requires authentication . Good. Enter user and password. Good. I am on page.
cd %myapp%
torquebox deploy
torquebox undeploy
torquebox deploy
firefox to http://localhost:8080/backstage/. Requires authentication . Good. Enter user and password. Again Requires authentication.
--------- from log --------------
roundable
16:55:59,480 INFO [org.quartz.impl.StdSchedulerFactory](MSC service thre) Quartz scheduler 'jboss.deployment.unit."hello-knob.yml".job_scheduler'
lized from an externally provided properties instance.
16:55:59,483 INFO [org.quartz.impl.StdSchedulerFactory](MSC service thre) Quartz scheduler version: 2.1.5
16:55:59,483 INFO [org.quartz.core.QuartzScheduler] (MSC service thread 1
bFactory set to: org.torquebox.jobs.JobScheduler@6b61032f
16:55:59,484 INFO [org.quartz.core.QuartzScheduler] (MSC service thread 1
heduler jboss.deployment.unit."hello-knob.yml".job_scheduler_$_NON_CLUSTER
rted.
16:56:00,997 INFO org.torquebox.core.runtime Created
untime (ruby_version: RUBY1_9, compile_mode: JIT, app: hello, context: web
.53s
16:56:00,999 INFO [org.jboss.web](ServerService Thread Pool -- 50) JBAS0
Register web context:
16:56:01,358 INFO [org.jboss.as.server.deployment](DeploymentScanner-thr
I installed torquebox 2.0.0.beta3 and backstage 1.0.0.beta2 as gems.
Because the gem version of torquebox does not set the environment variables, the deployment through "backstage deploy" does not work.
rvm use jruby-1.6.5.1@global
jruby -J-Xmx1024m -S gem install torquebox-server --pre
gem install torquebox-backstage --pre
backstage deploy
Exception: $TORQUEBOX_HOME must be set
check at .../.rvm/gems/jruby-1.6.5.1@global/gems/torquebox-backstage-1.0.0.beta2/bin/backstage:68
deploy at .../.rvm/gems/jruby-1.6.5.1@global/gems/torquebox-backstage-1.0.0.beta2/bin/backstage:28
When running Torquebox in a clustered environment Backstage does not include consumers running on others servers in the consumer count on the queues or topics pages.
Is this by design? Or is it a limitation of JBoss and HornetQ? If not then I think it would be valuable to add it.
If the gem requirements for backstage are installed using bundle --deployment, so get all the gems put into a ./vendor directory, when deployed to TB, TB fails to find the gems.
This works fine for rails apps, so maybe an issue to do with plain rack apps onTB ?
Installed backstage on a fresh torquebox 1.0.1 installation on a fresh windows 2008 R2 server.
As part of the gem install it also installed HAML 3.1.2 and SASS 3.1.3
However accessing the site resulted in errors. Looking at the Torquebox output it was looking for HAML 3.1.1 and SASS 3.1.2
Manually installed those gem versions resulted in a working site.
It looks like a new dependency was introduced in Backstage 1.0.3 - Bond (0.4.1)
This new requirement requires compilation which means the RubyInstaller.org devkit needs to be installed and setup for windows users.
Worth mentioning in the README I think.
[EDIT] Just tried the new webconsole...awesome!
Installing torquebox-backstage will always result in the installation of version 2.3.0 torquebox gems. even if the --conservative flag is used.
To test, install binary version of TB 2.2.0 then gem install torquebox-backstage, 2.3.0 versions of torquebox gems will be installed which then renders the server unable to start.
I have no idea why this is happening as I cannot see and hard dependencies on 2.3.0 in the Gemfile (or gemspecs of related gems for that matter)
I created a gem from master b818ec3 , installed the gem on a windows 2008 R2 server and deployed it using jruby -S backstage deploy
On the first attempt to access backstage with a web-browser the following was reported: https://gist.github.com/1586123
From the backstage, when attempting to tail a log file in production, the UI never responds with anything more than
"Fetching log"
Upon inspection of the network request happening, this POST call is being made from the browser
http://127.0.0.1:8080/backstage/log/XXXXXXX=/tail?format=json
The call is actually being made to 127.0.0.1:8080, when the ip should be the remote ip of the production server
Hi!
I have problems installing the troquebox-backstage-0.4.0 gem into a fresh
torquebox-1.0.1 server installation:
$ gem install torquebox-backstage
ERROR: Error installing torquebox-backstage:
torquebox-backstage requires tilt (= 1.3.0, runtime)
$ backstage
Gem::LoadError: can't activate tilt (= 1.3.0, runtime) for ["torquebox-backstage-0.4.0"], already activated tilt-1.3.2 for ["sinatra-1.2.6", "torquebox-backstage-0.4.0"]
I think removing this line will fix it:
https://github.com/torquebox/backstage/blob/v0.4.0/Gemfile#L13
Currently the gem file in the 2.x version of backstage is pointing to incremental .345 (gem 'torque box', '> 2.x.incremental.345'. This is an old build that is not in the repository anymore. Might be better to change the gem file to gem 'torque box', '> 2.x.incremental') so it grabs the most recent version. @bobmcw on the torque box irc was kind enough to help me out with this.
Thanks for a great app. I'm planning to build my application around backstage.
While the overview shows that there are two messages within a queue created by a Rails app, "View Messages" shows no message.
I use Backstage v1.0.dev for TorqueBox v2.0.0-SNAPSHOT straight from the git
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.