NewRelic RPM and the Glassfish gem for JRuby on Rails
Hi!
does newrelic rpm support the glassfish gem? (get more infos
here: http://rubyforge.org/projects/glassfishgem/).
I'm currently trying to get it running. I've tried all
troubleshooting steps but it doesn't work. We would like to use
newrelic rpm to monitor our production environment.
I have tried to install it as a plugin and i couldn't find a
newrelic_agent.log file. The common production log is being created
by the app and the permissions are set appropriate. The production
log doesn't mention anything about newrelic. We use other plugins
which work correctly (we've got no plugin config in environment.rb
so all plugins are enabled). The log level is default and the
logging test was uncommented (which worked locally in development
mode but not on the production machine - we didnt see the output
there).
We also tried to install it as a gem and that didn't work
either.
Any help or further information is appreciated!
Thanks
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Bill Kayser on 07 Apr, 2010 03:35 PM
It sounds like it's not detecting glassfish.
Try setting
agent_enabledtotruein the newrelic.yml file and let me know if that works.How are you starting glassfish? With the "glassfish" command?
3 Posted by v.tietz on 19 Apr, 2010 01:43 PM
Yes I am starting the server with the "glassfish" command.
I set the agent_enabled setting to true and restarted the server. But it doesn't seem to work yet.
Support Staff 4 Posted by Bill Kayser on 19 Apr, 2010 07:31 PM
Do you see a newrelic_agent.log file? If so, please attach that.
If not, and you have agent_enabled set to true, then it must not be loading the plugin. I'm afraid you'd have to troubleshoot that yourself. Put in some kind of logging to init.rb in the newrelic plugin to verify the init.rb file is never even loaded, then work backwards through rails initialization to find out why the plugin is not being initialized.
Also, think about any unusual configuration, like using the bundler gem, or manually setting the plugin list in the init.rb. Do you use any other gems or plugins that do something with plugin/gem management, like controlling the order or something like that.
Support Staff 5 Posted by Bill Kayser on 05 May, 2010 03:44 PM
Hi. Did you ever get RPM working with the Glassfish gem?
6 Posted by v.tietz on 06 May, 2010 10:49 AM
Not yet but i wasn't trying in the last time. I'll post it if it works or not.
Support Staff 7 Posted by Bill Kayser on 18 May, 2010 12:33 AM
I think I found the problem. The glassfish detection stopped working, probably something that changed in the latest gem version.
I believe I have a fix. It will go into the next release. If you want a patchfile sooner let me know.
Bill Kayser resolved this discussion on 18 May, 2010 12:33 AM.
v.tietz re-opened this discussion on 08 Jun, 2010 07:16 PM
8 Posted by v.tietz on 08 Jun, 2010 07:16 PM
did you release the newest version yet?
i just installed the latest rpm plugin and tried to get it work again but it doesn't seem to work. if not, could you please send me the patch to v.tietz@mwaysolutions.com? thanks!
9 Posted by v.tietz on 08 Jun, 2010 07:33 PM
I am sorry i didn't set agent_enabled to true before. Now I did and i even got a response, but there is no data available. The log agent_log is attached. Thanks in advance for any help!
Support Staff 10 Posted by Bill Kayser on 10 Jun, 2010 02:08 PM
I see data for your application in RPM. Is it working for you now?
It's still not detecting glassfish, so the agent_enabled setting needs to be kept to true. But I'd still like to fix the detection.
What version of glassfish are you using? How are you starting up the app?
11 Posted by v.tietz on 10 Jun, 2010 02:43 PM
It looks like its getting some data now, thanks! :-)
The version i am using is glassfish (1.0.2).
I am starting the server with the following command:
/opt/local/jruby-1.4.0/bin/jruby -S glassfish --contextroot '/' --port 3001 --environment production --runtimes 2 --runtimes-min 2 --runtimes-max 3 -P #{current_path}/tmp/pids/MyApp-1 --daemon"
in my rails folder.
Bill Kayser resolved this discussion on 11 Jun, 2010 02:25 PM.