NewRelic RPM and the Glassfish gem for JRuby on Rails

v.tietz's Avatar

v.tietz

07 Apr, 2010 11:47 AM via web

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

  1. Support Staff 2 Posted by Bill Kayser on 07 Apr, 2010 03:35 PM

    Bill Kayser's Avatar

    It sounds like it's not detecting glassfish.

    Try setting agent_enabled to true in the newrelic.yml file and let me know if that works.

    How are you starting glassfish? With the "glassfish" command?

  2. 3 Posted by v.tietz on 19 Apr, 2010 01:43 PM

    v.tietz's Avatar

    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.

  3. Support Staff 4 Posted by Bill Kayser on 19 Apr, 2010 07:31 PM

    Bill Kayser's Avatar

    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.

  4. Support Staff 5 Posted by Bill Kayser on 05 May, 2010 03:44 PM

    Bill Kayser's Avatar

    Hi. Did you ever get RPM working with the Glassfish gem?

  5. 6 Posted by v.tietz on 06 May, 2010 10:49 AM

    v.tietz's Avatar

    Not yet but i wasn't trying in the last time. I'll post it if it works or not.

  6. Support Staff 7 Posted by Bill Kayser on 18 May, 2010 12:33 AM

    Bill Kayser's Avatar

    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.

  7. Bill Kayser resolved this discussion on 18 May, 2010 12:33 AM.

  8. v.tietz re-opened this discussion on 08 Jun, 2010 07:16 PM

  9. 8 Posted by v.tietz on 08 Jun, 2010 07:16 PM

    v.tietz's Avatar

    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!

  10. 9 Posted by v.tietz on 08 Jun, 2010 07:33 PM

    v.tietz's Avatar

    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!

  11. Support Staff 10 Posted by Bill Kayser on 10 Jun, 2010 02:08 PM

    Bill Kayser's Avatar

    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?

  12. 11 Posted by v.tietz on 10 Jun, 2010 02:43 PM

    v.tietz's Avatar

    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.

  13. Bill Kayser resolved this discussion on 11 Jun, 2010 02:25 PM.

Comments are currently closed for this discussion. You can start a new one.