Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 668688

Summary: app-admin/puppetserver-6.0*: java.lang.IllegalStateException: There was a problem adding a JRubyInstance to the pool.
Product: Gentoo Linux Reporter: yannick
Component: Current packagesAssignee: Matthew Thode ( prometheanfire ) <prometheanfire>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description yannick 2018-10-15 08:55:24 UTC
The Puppet server fails to start with the error "There was a problem adding a JRubyInstance to the pool".

Reproducible: Always

Steps to Reproduce:
1. emerge puppetserver
2. /etc/init.d/puppetserver start
Actual Results:  
The Puppet server fails to start with the following error message:

2018-10-15T10:43:56.623+02:00 ERROR [clojure-agent-send-pool-0] [p.t.internal] shutdown-on-error triggered because of exception!
java.lang.IllegalStateException: There was a problem adding a JRubyInstance to the pool.
[...]

Expected Results:  
The Puppet server starts without any issues.

Full puppetserver.log with all backtraces: http://ix.io/1pci
Comment 1 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2018-10-24 22:39:44 UTC
-       elog "echo "jruby-puppet: { gem-home: ${DESTDIR}/opt/puppetlabs/server/data/puppetserver/vendored-jruby-gems }" > jruby.conf"
-       elog "while read LINE"
-       elog "do"
-       elog "  java -cp puppet-server-release.jar:jruby-1_7.jar clojure.main -m puppetlabs.puppetserver.cli.gem --config jruby.conf -- install \$(echo \$LINE |awk '{print \$1}') --version \$(echo \$LINE |awk '{print \$2}')"
-       elog "done < /opt/puppetlabs/server/data/puppetserver-gem-list.txt"
+       elog "echo \"jruby-puppet: { gem-home: ${DESTDIR}/opt/puppetlabs/server/data/puppetserver/vendored-jruby-gems }\" > jruby.conf"
+       elog "while read LINE do"
+       elog "  java -cp puppet-server-release.jar:jruby-9k.jar clojure.main -m puppetlabs.puppetserver.cli.gem --config jruby.conf -- install --no-ri --no-rdoc \$(echo \$LINE |awk '{print \$1}') --version \$(echo \$LINE |awk '{print \$2}')"
+       elog "done < /opt/puppetlabs/server/data/jruby-gem-list.txt"
+       elog "echo \"jruby-puppet: { gem-home: ${DESTDIR}/opt/puppetlabs/puppet/lib/ruby/vendor_gems }\" > jruby.conf"
+       elog "while read LINE do"
+       elog "  java -cp puppet-server-release.jar:jruby-9k.jar clojure.main -m puppetlabs.puppetserver.cli.gem --config jruby.conf -- install --no-ri --no-rdoc \$(echo \$LINE |awk '{print \$1}') --version \$(echo \$LINE |awk '{print \$2}')"
+       elog "done < /opt/puppetlabs/server/data/mri-gem-list.txt"

have you done the post-install stuff (it changed in 6.x)
Comment 2 yannick 2018-10-29 08:45:34 UTC
Yes, I have executed these commands.

I have now purged the installation, reinstalled app-admin/puppetserver and re-run the post-install commands. This is the result:

ERROR:  Error installing semantic_puppet:
        invalid gem: package metadata is missing in /opt/puppetlabs/server/data/puppetserver/vendored-jruby-gems/cache/semantic_puppet-1.0.2.gem
ERROR:  Error installing hocon:
        invalid gem: package metadata is missing in /opt/puppetlabs/server/data/puppetserver/vendored-jruby-gems/cache/hocon-1.2.5.gem
ERROR:  Error installing text:
        invalid gem: package metadata is missing in /opt/puppetlabs/server/data/puppetserver/vendored-jruby-gems/cache/text-1.3.1.gem
ERROR:  Error installing locale:
        invalid gem: package metadata is missing in /opt/puppetlabs/server/data/puppetserver/vendored-jruby-gems/cache/locale-2.1.2.gem
ERROR:  Error installing gettext:
        invalid gem: package metadata is missing in /opt/puppetlabs/server/data/puppetserver/vendored-jruby-gems/cache/locale-2.1.2.gem
ERROR:  Error installing fast_gettext:
        invalid gem: package metadata is missing in /opt/puppetlabs/server/data/puppetserver/vendored-jruby-gems/cache/fast_gettext-1.1.2.gem

ERROR:  Error installing puppetserver-ca:
        invalid gem: package metadata is missing in /opt/puppetlabs/puppet/lib/ruby/vendor_gems/cache/facter-2.5.1.gem

Besides that, the commands don't actually execute properly, because "while read LINE do" is not really valid syntax.

Also, why exactly are these post-install commands required? Can't they be executed in src_compile / src_install?
Comment 3 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2018-10-29 13:29:37 UTC
the commands are needed because they are installing ruby gems (remote packages) to puppetserver.  Without them puppetserver will not run.
Comment 4 yannick 2018-10-29 15:39:01 UTC
Do you know, why the gems installation fails on my system? I'm doing some investigation now, but in my opinion the post-install commands are currently broken.
Comment 5 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2018-10-29 16:33:15 UTC
I'm not sure why they are failing.  The commands in post-install are taken from the redhat/debian install stuff, but they worked here.  I did have a problem fetching the files initially though.