I’m looking into upgrading to Foreman 1.16 on Debian9/Stretch, noticed smart-proxy isn’t starting and shows errors as below:
Jan 4 11:46:18 foreman01 systemd[1]: Starting Foreman Proxy...
Jan 4 11:46:18 foreman01 smart-proxy[7316]: /usr/lib/ruby/vendor_ruby/dynflow/director.rb:16:in `block in <class:Director>': uninitialized constant Concurrent::Edge::Future (NameError)
Jan 4 11:46:18 foreman01 smart-proxy[7316]: Did you mean? Concurrent::Future
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/algebrick/dsl.rb:35:in `instance_exec'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/algebrick/dsl.rb:35:in `initialize'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/algebrick/dsl.rb:89:in `new'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/algebrick/dsl.rb:89:in `type'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/dynflow/director.rb:12:in `<class:Director>'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/dynflow/director.rb:9:in `<module:Dynflow>'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/dynflow/director.rb:1:in `<top (required)>'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/dynflow.rb:43:in `<module:Dynflow>'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/dynflow.rb:19:in `<top (required)>'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/smart_proxy_dynflow_core.rb:1:in `<top (required)>'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:41:in `block in system_require'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:37:in `each'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:37:in `system_require'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/bundler_ext.rb:19:in `block in system_require'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/bundler_ext.rb:14:in `each'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/vendor_ruby/bundler_ext.rb:14:in `system_require'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/share/foreman-proxy/lib/bundler_helper.rb:22:in `require_groups'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/share/foreman-proxy/lib/smart_proxy_main.rb:33:in `<top (required)>'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Jan 4 11:46:18 foreman01 smart-proxy[7316]: #011from /usr/share/foreman-proxy/bin/smart-proxy:5:in `<main>'
Jan 4 11:46:18 foreman01 systemd[1]: foreman-proxy.service: Main process exited, code=exited, status=1/FAILURE
I’m assuming it’s looking for concurrent-ruby-edge which seems to be missing from the system, so I started digging into more. Seems in the upstream Foreman repo for Debian 8, used to package ruby-concurrent* (http://deb.theforeman.org/pool/jessie/1.16/r/?C=N;O=A) , but no longer packaging for Debian 9 (http://deb.theforeman.org/pool/stretch/1.16/r/?C=N;O=A), perhaps the packager assumed they are now included in standard Debian 9 distro? Unfortunately in reality, Debian 9 only packages ruby-concorrunt, not other 2 (ruby-concurrent-ruby-edge & ruby-concurrent-ruby).
Therefore in order to get smart-proxy up and run, I assume these packages are needed, where should we get these from?
I’m getting a similar error under Ubuntu 18.04, using foreman installer 1.19.0.
$ /usr/share/foreman-proxy/bin/smart-proxy --no-daemonize
Traceback (most recent call last):
38: from /usr/share/foreman-proxy/bin/smart-proxy:5:in `<main>'
37: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
36: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
35: from /usr/share/foreman-proxy/lib/smart_proxy_main.rb:33:in `<top (required)>'
34: from /usr/share/foreman-proxy/lib/bundler_helper.rb:22:in `require_groups'
33: from /usr/lib/ruby/vendor_ruby/bundler_ext.rb:14:in `system_require'
32: from /usr/lib/ruby/vendor_ruby/bundler_ext.rb:14:in `each'
31: from /usr/lib/ruby/vendor_ruby/bundler_ext.rb:19:in `block in system_require'
30: from /usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:37:in `system_require'
29: from /usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:37:in `each'
28: from /usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:41:in `block in system_require'
27: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
26: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
25: from /usr/lib/ruby/vendor_ruby/smart_proxy_remote_execution_ssh.rb:2:in `<top (required)>'
24: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
23: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
22: from /usr/lib/ruby/vendor_ruby/smart_proxy_dynflow.rb:2:in `<top (required)>'
21: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
20: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
19: from /usr/lib/ruby/vendor_ruby/smart_proxy_dynflow/plugin.rb:5:in `<top (required)>'
18: from /usr/lib/ruby/vendor_ruby/smart_proxy_dynflow/plugin.rb:6:in `<class:Dynflow>'
17: from /usr/lib/ruby/vendor_ruby/smart_proxy_dynflow/plugin.rb:8:in `<class:Plugin>'
16: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
15: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
14: from /usr/lib/ruby/vendor_ruby/smart_proxy_dynflow_core.rb:1:in `<top (required)>'
13: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
12: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
11: from /usr/lib/ruby/vendor_ruby/dynflow.rb:19:in `<top (required)>'
10: from /usr/lib/ruby/vendor_ruby/dynflow.rb:43:in `<module:Dynflow>'
9: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
8: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
7: from /usr/lib/ruby/vendor_ruby/dynflow/director.rb:1:in `<top (required)>'
6: from /usr/lib/ruby/vendor_ruby/dynflow/director.rb:9:in `<module:Dynflow>'
5: from /usr/lib/ruby/vendor_ruby/dynflow/director.rb:12:in `<class:Director>'
4: from /usr/lib/ruby/vendor_ruby/algebrick/dsl.rb:89:in `type'
3: from /usr/lib/ruby/vendor_ruby/algebrick/dsl.rb:89:in `new'
2: from /usr/lib/ruby/vendor_ruby/algebrick/dsl.rb:35:in `initialize'
1: from /usr/lib/ruby/vendor_ruby/algebrick/dsl.rb:35:in `instance_exec'
/usr/lib/ruby/vendor_ruby/dynflow/director.rb:16:in `block in <class:Director>': uninitialized constant Concurrent::Edge::Future (NameError)
Did you mean? Concurrent::Future
Another resolution to this would be to downgrade ruby-concurrent. If running into this on Debian Buster, download and install ruby-concurrent_1.0.0-3_all.deb from Stretch.