JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-5308

Cannot start glassfish daemonized with rails 2.3.x using bundler when rack 1.2.1 is installed

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Not A Bug
    • Affects Version/s: JRuby 1.5.1
    • Fix Version/s: JRuby 1.5.6
    • Component/s: JRuby-extras
    • Labels:
      None
    • Environment:
      bundler 1.0.5, glassfish 1.0.2/1.0.3, rails 2.3.9/2.3.10
    • Number of attachments :
      0

      Description

      I have rack 1.1.0 and rack 1.2.1 installed because I need to also run Rails 3 applications that require rack 1.2.1.

      I use rails 2.3.x with bundle setup being loaded in the preinitializer as per bundler home page instructions.

      I wish to start the rails application with glassfish in daemonized mode.

      When starting glassfish directly, glassfish requires rack, and rack 1.2.1 is loaded. When glassfish starts the rails application, it requires rack 1.1.0, and fails.

      When starting glassfish with "jruby -S bundle exec glassfish -d" the same happens for the damonized glassfish process.

      When starting glassfish with "jruby -S bundle exec glassfish", without the -d option, it works fine, but the process is not daemonized, and no PID file is written. It seems the bundle setup is lost when the glassfish process is daemonized.

      Is it possible to delay the loading of rack from glassfish until the preinitializer script in the application has been run?

      This is biting us in production. Please help!

        Activity

        Hide
        Uwe Kubosch added a comment -

        Host OS is Fedora Linux 12.
        jruby 1.5.1 (ruby 1.8.7 patchlevel 249) (2010-06-06 f3a3480) (Java HotSpot(TM) Client VM 1.6.0_21) [i386-java]

        Show
        Uwe Kubosch added a comment - Host OS is Fedora Linux 12. jruby 1.5.1 (ruby 1.8.7 patchlevel 249) (2010-06-06 f3a3480) (Java HotSpot(TM) Client VM 1.6.0_21) [i386-java]
        Hide
        Hiro Asari added a comment -

        Uwe,

        Can you check if the problem persists with 1.5.6 or the latest master?

        How about Bundler 1.0.7? Does bundle --verbose give any more information?

        Is the pid file defined in a writable directory? (Just covering bases. It's defined in $RAILS_ROOT/conf/glassfish.yml or by default $RAILS_ROOT/tmp/pids/glassfish-*.pid.)

        Does it make any difference if you set daemon:enable to true in glassfish.yml?

        Also, try --log-level 7 to get more verbose messages from glassfish gem.

        Show
        Hiro Asari added a comment - Uwe, Can you check if the problem persists with 1.5.6 or the latest master? How about Bundler 1.0.7? Does bundle --verbose give any more information? Is the pid file defined in a writable directory? (Just covering bases. It's defined in $RAILS_ROOT/conf/glassfish.yml or by default $RAILS_ROOT/tmp/pids/glassfish-*.pid .) Does it make any difference if you set daemon:enable to true in glassfish.yml ? Also, try --log-level 7 to get more verbose messages from glassfish gem.
        Hide
        Uwe Kubosch added a comment -

        Thank you for looking into this. I will try this later today.

        Show
        Uwe Kubosch added a comment - Thank you for looking into this. I will try this later today.
        Hide
        Uwe Kubosch added a comment -

        I tried it with JRuby 1.5.6, and it worked well. That should mean that something has been fixed between JRuby 1.5.1 and JRuby 1.5.6. Upgrading from JRuby 1.5.1 however is not possible when using glassfish until JRUBY-5297 has been resolved.

        Show
        Uwe Kubosch added a comment - I tried it with JRuby 1.5.6, and it worked well. That should mean that something has been fixed between JRuby 1.5.1 and JRuby 1.5.6. Upgrading from JRuby 1.5.1 however is not possible when using glassfish until JRUBY-5297 has been resolved.

          People

          • Assignee:
            Hiro Asari
            Reporter:
            Uwe Kubosch
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: