----- Original Message ----- > From: "Tom K." <[email protected]> > To: "Foreman users" <[email protected]> > Sent: Wednesday, July 27, 2016 10:17:12 AM > Subject: [foreman-users] undefined method `join' for #<String>, receiving > salt states from smartproxy > > Hi, > > I've a running Foreman 1.11.3 and a Smartyproxy 1.11.3 on 2 different > machines. The Smartproxy serves the salt-api/saltmaster. Now, if I query > from Foreman the states of the Saltmaster SmartyProxy, nothing happens. > > Sometimes a popup appears with the message > > Error: ERF12-4701 [ProxyAPI::ProxyException]: Unable to fetch Salt states > list ([ProxyAPI::ProxyException]: ERF12-7301 [ProxyAPI::ProxyException]: > Unable to fetch Salt environments list ([RestCli...) for proxy > https:/fosp-saltmaster-001:8443/salt/ > > > In the *forman-proxy.log* on the smartproxy tells me > > E, [2016-07-27T10:05:26.163632 #2422] ERROR -- : undefined method `join' > for #<String:0x007f81e43cbd70> (NoMethodError) > /usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/showexceptions.rb:37:in > `rescue in call' > /usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/showexceptions.rb:21:in > `call' > /usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:124:in `call' > /usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:1417:in `block in > call' > /usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:1499:in `synchronize' > /usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:1417:in `call' > /usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in `block in call' > /usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `each' > /usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `call' > /usr/share/gems/gems/rack-1.6.4/lib/rack/builder.rb:153:in `call' > /usr/share/gems/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service' > /usr/share/ruby/webrick/httpserver.rb:138:in `service' > /usr/share/ruby/webrick/httpserver.rb:94:in `run' > /usr/share/ruby/webrick/server.rb:295:in `block in start_thread' > > > > The */var/log/foreman/production.log* throws > > 2016-07-27 10:10:48 [app] [W] ProxyAPI operation FAILED > | ProxyAPI::ProxyException: ERF12-4701 [ProxyAPI::ProxyException]: Unable > to fetch Salt states list ([ProxyAPI::ProxyException]: ERF12-7301 > [ProxyAPI::ProxyException]: Unable to fetch Salt environments list > ([RestCli...) for proxy https:/fosp-saltmaster-001:8443/salt/ > | > /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-5.0.1/app/lib/proxy_api/salt.rb:43:in > `rescue in states_list' > | > /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-5.0.1/app/lib/proxy_api/salt.rb:35:in > `states_list' > | > /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-5.0.1/app/controllers/foreman_salt/state_importer.rb:16:in > `fetch_states_from_proxy' > | > /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-5.0.1/app/controllers/foreman_salt/salt_modules_controller.rb:60:in > `import' > | > /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/implicit_render.rb:4:in > `send_action' > | > /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/base.rb:189:in > `process_action' > | > /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/rendering.rb:10:in > `process_action' > | > /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/callbacks.rb:20:in > `block in process_action' > | > /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:113:in > `call' > | > /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:113:in > `call' > | > /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in > `block in halting_and_conditional' > | > /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in > `call' > | > /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in > `block in halting_and_conditional' > | > /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in > `call' > | > /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in > `block in halting_and_conditional' > | > /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in > `call' > > > > > What's my problem? What can I do... I've really no idea....
Fetching the salt environment or salt states list requires the proxy be configured to talk to the salt-api. See section 2.1.3 in the latest manual: http://theforeman.org/plugins/foreman_salt/ Troubleshooting steps: - Look in /var/log/foreman-proxy/proxy.log, and /var/log/salt/* for any errors. - Does the API user have the @runner permission in /etc/salt/master? - Is the salt-api service started? - Is /etc/foreman-proxy/settings.d/salt.yml configured to connect to the right place? >From http://projects.theforeman.org/projects/foreman/wiki/ERF12-4701. - Stephen > Thanks, > > Tom > > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
