Error addChild Child name "/" is not unique

1415 views
Skip to first unread message

Peter de Kraker

unread,
Oct 22, 2012, 12:26:00 PM10/22/12
to rails-t...@googlegroups.com
I am trying to use Trinidad to deploy several apps in one instance.
When running trinidad from their root dirs it starts up fine.
When using below config, it won't startup. What am I doing wrong?

Trinidad.configure do |config|
    config.port = 7000
    config.address = "127.0.0.1"
    config.hosts = {
        'test' => ['host1.com', 'host2.com'],
'test2' => ['host3.com', 'host4']
}
end

Trinidad 1.4.4, Jruby 1.7 Java Sun jre 1.7

Peter de Kraker

unread,
Oct 22, 2012, 12:27:15 PM10/22/12
to rails-t...@googlegroups.com
I forgot to add the Error:

ativeException: java.lang.IllegalArgumentException: addChild:  Child name '/' is not unique
            add_web_app at /home/peter/tmp/jruby-1.6.8/lib/ruby/gems/1.8/gems/trinidad-1.4.4/lib/trinidad/server.rb:113
         create_web_app at /home/peter/tmp/jruby-1.6.8/lib/ruby/gems/1.8/gems/trinidad-1.4.4/lib/trinidad/server.rb:180
  create_from_apps_base at /home/peter/tmp/jruby-1.6.8/lib/ruby/gems/1.8/gems/trinidad-1.4.4/lib/trinidad/server.rb:167
                collect at org/jruby/RubyArray.java:2347
  create_from_apps_base at /home/peter/tmp/jruby-1.6.8/lib/ruby/gems/1.8/gems/trinidad-1.4.4/lib/trinidad/server.rb:165
                   each at org/jruby/java/proxies/ArrayJavaProxy.java:125
                    map at org/jruby/RubyEnumerable.java:728
  create_from_apps_base at /home/peter/tmp/jruby-1.6.8/lib/ruby/gems/1.8/gems/trinidad-1.4.4/lib/trinidad/server.rb:157
        create_web_apps at /home/peter/tmp/jruby-1.6.8/lib/ruby/gems/1.8/gems/trinidad-1.4.4/lib/trinidad/server.rb:143
             initialize at /home/peter/tmp/jruby-1.6.8/lib/ruby/gems/1.8/gems/trinidad-1.4.4/lib/trinidad/server.rb:12
                 (root) at /home/peter/tmp/jruby-1.6.8/lib/ruby/gems/1.8/gems/trinidad-1.4.4/bin/trinidad:6
                   load at org/jruby/RubyKernel.java:1097
                 (root) at /home/peter/tmp/jruby-1.6.8/bin/trinidad:23

This is on jruby 1.6.8, i downgraded to see if that changes anything. It didn't.

Op maandag 22 oktober 2012 18:26:01 UTC+2 schreef Peter de Kraker het volgende:

kares

unread,
Oct 24, 2012, 2:35:56 AM10/24/12
to rails-t...@googlegroups.com

 Hey Peter, you seem to be trying to setup two apps (contexts) to be available at / - you can't both need a distinct context path.

e.g.

Trinidad.configure do |config|
  config.web_apps = {
    :default => { # available at '/'
      :root_dir => 'path/to/root/app',
      :hosts    => ['host1.com', 'host2.com']
    },
    :test => { # available at '/test'
      :root_dir => 'path/to/test/app',
      :hosts    => ['host3.com', 'host4']
    }
  }
end

K.
Reply all
Reply to author
Forward
0 new messages