Issues with adding smart proxy

I'm setting up my first smart proxy to begin provisioning systems, and
am having trouble adding the smart proxy to Foreman. When I attempt
to add the smart proxy with URL (hostname changed),
http://foremanproxy.domain.com:8443/features I get the following in
Foreman

··· ---------------------- 2 errors prohibited this smart proxy from being saved

There were problems with the following fields:

Url did not respond to a request for its feature list.The reason given
was: 404 Resource Not Found.
Please check the proxy is configured and running on the host before
saving.

And this is in the production.log

Processing SmartProxiesController#create (for … at 2011-10-17
14:42:31) [POST]
Parameters: {“commit”=>“Save changes”,
“smart_proxy”=>{“name”=>“foremanproxy”, “url”=>“http://
foremanproxy.domain.com:8443/features”},
“authenticity_token”=>"oeCemVNXEr}
Failed to save: Url did not respond to a request for its feature
list.The reason given was: 404 Resource Not Found., Please check the
proxy is configured and runnin.
Rendering template within layouts/application
Rendering smart_proxies/new
Completed in 41ms (View: 15, DB: 110) | 200 OK [https://
foremanserver.domain.com/smart_proxies]

If I go to the URL in a browser I see the feature page.

If I try using either of these URLs, http://foremanproxy.domain.com:8443/,
or http://foremanproxy.domain.com:8443, I get a 500 error and this in
my apache error_log

Rails: /usr/share/foreman: symbol lookup error: /usr/lib/ruby/gems/1.8/
gems/json-1.5.3/ext/json/ext/json/ext/parser.so: undefined symbol:
RSTRING_PTR
[Mon Oct 17 14:52:57 2011] [error] [client 165.91.97.106] Premature
end of script headers: smart_proxies, referer: https://itscforeman.tamu.edu/smart_proxies
[ pid=10744 thr=47825194648384 file=ext/apache2/Hooks.cpp:822
time=2011-10-17 14:52:57.475 ]: The backend application (process
32088) did not send a valid HTTP resp.

The proxy has the foreman-proxy service started, latest stable RPM.
iptables is off and the proxy server is listening on port 8443. This
is the uncommented lines of settings.yml

:daemon: true
:daemon_pid: /var/run/foreman-proxy/foreman-proxy.pid
:port: 8443
:tftp: true
:tftproot: /var/lib/tftpboot
:dns: false
:dhcp: false
:dhcp_vendor: isc
:puppetca: true
:puppet: true
:log_file: /tmp/proxy.log

Let me know what other info may be useful.

Thanks

  • Trey

> I'm setting up my first smart proxy to begin provisioning systems, and
> am having trouble adding the smart proxy to Foreman. When I attempt
> to add the smart proxy with URL (hostname changed),
> http://foremanproxy.domain.com:8443/features I get the following in
> Foreman
> ----------------------
> 2 errors prohibited this smart proxy from being saved
>
> There were problems with the following fields:
>
> Url did not respond to a request for its feature list.The reason given
> was: 404 Resource Not Found.
> Please check the proxy is configured and running on the host before
> saving.
> ---------------------
>
> And this is in the production.log
> ---------------------
>
> Processing SmartProxiesController#create (for … at 2011-10-17
> 14:42:31) [POST]
> Parameters: {"commit"=>"Save changes",
> "smart_proxy"=>{"name"=>"foremanproxy", "url"=>"http://
> foremanproxy.domain.com:8443/features"},
> "authenticity_token"=>"oeCemVNXEr}
> Failed to save: Url did not respond to a request for its feature
> list.The reason given was: 404 Resource Not Found., Please check the
> proxy is configured and runnin.
> Rendering template within layouts/application
> Rendering smart_proxies/new
> Completed in 41ms (View: 15, DB: 110) | 200 OK [https://
> foremanserver.domain.com/smart_proxies]
> --------------------------
>
> If I go to the URL in a browser I see the feature page.
>
> If I try using either of these URLs, http://foremanproxy.domain.com:8443/,
> or http://foremanproxy.domain.com:8443, I get a 500 error and this in
> my apache error_log
> -----------------------
> Rails: /usr/share/foreman: symbol lookup error: /usr/lib/ruby/gems/1.8/
> gems/json-1.5.3/ext/json/ext/json/ext/parser.so: undefined symbol:
> RSTRING_PTR
> [Mon Oct 17 14:52:57 2011] [error] [client 165.91.97.106] Premature
> end of script headers: smart_proxies, referer: https://itscforeman.tamu.edu/smart_proxies
> [ pid=10744 thr=47825194648384 file=ext/apache2/Hooks.cpp:822
> time=2011-10-17 14:52:57.475 ]: The backend application (process
> 32088) did not send a valid HTTP resp.

I think you have two versions of the json gem installed, double check,
as one of them seems to be installed incorrectly (e.g. 32bit version
on a 64bit ruby or the other way around).

Ohad

··· On Mon, Oct 17, 2011 at 10:39 PM, treydock wrote: > ---------------------- > > The proxy has the foreman-proxy service started, latest stable RPM. > iptables is off and the proxy server is listening on port 8443. This > is the uncommented lines of settings.yml > -------------------------- > :daemon: true > :daemon_pid: /var/run/foreman-proxy/foreman-proxy.pid > :port: 8443 > :tftp: true > :tftproot: /var/lib/tftpboot > :dns: false > :dhcp: false > :dhcp_vendor: isc > :puppetca: true > :puppet: true > :log_file: /tmp/proxy.log > ------------------------- > > Let me know what other info may be useful. > > Thanks > - Trey > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To post to this group, send email to foreman-users@googlegroups.com. > To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en. > >

That was it! I had installed json via the gem command and also had
rubygem-json installed via yum. I removed the gem of json and kept
the rpm version and now it works!

Thanks

  • Trey
··· On Oct 18, 12:26 am, Ohad Levy wrote: > On Mon, Oct 17, 2011 at 10:39 PM, treydock wrote: > > I'm setting up my first smart proxy to begin provisioning systems, and > > am having trouble adding the smart proxy to Foreman. When I attempt > > to add the smart proxy with URL (hostname changed), > >http://foremanproxy.domain.com:8443/featuresI get the following in > > Foreman > > ---------------------- > > 2 errors prohibited this smart proxy from being saved > > > There were problems with the following fields: > > > Url did not respond to a request for its feature list.The reason given > > was: 404 Resource Not Found. > > Please check the proxy is configured and running on the host before > > saving. > > --------------------- > > > And this is in the production.log > > --------------------- > > > Processing SmartProxiesController#create (for .......... at 2011-10-17 > > 14:42:31) [POST] > > Parameters: {"commit"=>"Save changes", > > "smart_proxy"=>{"name"=>"foremanproxy", "url"=>"http:// > > foremanproxy.domain.com:8443/features"}, > > "authenticity_token"=>"oeCemVNXEr} > > Failed to save: Url did not respond to a request for its feature > > list.The reason given was: 404 Resource Not Found., Please check the > > proxy is configured and runnin. > > Rendering template within layouts/application > > Rendering smart_proxies/new > > Completed in 41ms (View: 15, DB: 110) | 200 OK [https:// > > foremanserver.domain.com/smart_proxies] > > -------------------------- > > > If I go to the URL in a browser I see the feature page. > > > If I try using either of these URLs,http://foremanproxy.domain.com:8443/, > > orhttp://foremanproxy.domain.com:8443, I get a 500 error and this in > > my apache error_log > > ----------------------- > > Rails: /usr/share/foreman: symbol lookup error: /usr/lib/ruby/gems/1.8/ > > gems/json-1.5.3/ext/json/ext/json/ext/parser.so: undefined symbol: > > RSTRING_PTR > > [Mon Oct 17 14:52:57 2011] [error] [client 165.91.97.106] Premature > > end of script headers: smart_proxies, referer:https://itscforeman.tamu.edu/smart_proxies > > [ pid=10744 thr=47825194648384 file=ext/apache2/Hooks.cpp:822 > > time=2011-10-17 14:52:57.475 ]: The backend application (process > > 32088) did not send a valid HTTP resp. > > I think you have two versions of the json gem installed, double check, > as one of them seems to be installed incorrectly (e.g. 32bit version > on a 64bit ruby or the other way around). > > Ohad > > > > > > > > > ---------------------- > > > The proxy has the foreman-proxy service started, latest stable RPM. > > iptables is off and the proxy server is listening on port 8443. This > > is the uncommented lines of settings.yml > > -------------------------- > > :daemon: true > > :daemon_pid: /var/run/foreman-proxy/foreman-proxy.pid > > :port: 8443 > > :tftp: true > > :tftproot: /var/lib/tftpboot > > :dns: false > > :dhcp: false > > :dhcp_vendor: isc > > :puppetca: true > > :puppet: true > > :log_file: /tmp/proxy.log > > ------------------------- > > > Let me know what other info may be useful. > > > Thanks > > - Trey > > > -- > > You received this message because you are subscribed to the Google Groups "Foreman users" group. > > To post to this group, send email to foreman-users@googlegroups.com. > > To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/foreman-users?hl=en.