On Tuesday, October 11, 2016 at 2:47:43 AM UTC-5, Lukas Zapletal wrote:
>
>
> > Is there some some setting or some feature I'm missing here? Should 
> > the template_url be the foreman-prime server or the proxy? I've tried 
> > both (also configured the http_port 8000 on the foreman-prime for 
> > that test) but neither worked for what it's worth.  
>
> It needs to be either https://foreman:443 or https://proxy:8443 (assumi 
> ng you haven't changed default ports) 
>

Thank you for the tips Lukas. I tried a few options you mentioned (443 or 
8443) but neither seemed to work. 

Currently I have "/etc/foreman-proxy/settings.d/templates.yml" set to.
:enabled: true
:template_url: http://10.0.10.10:8000


And the unattended build fails with (error from 10.0.10.10 apache log):
==> httpd/access_log <==
10.0.10.19 - - [12/Oct/2016:14:27:48 +0000] "GET 
/unattended/provision?token=9c9a1410-dada-4c82-b824-72d183d3ecde HTTP/1.1" 
404 218 "-" "curl/7.29.0"

However, if I telnet to 10.0.10.10 8000 and issue GET of the unattended URL 
(from 10.0.10.10):

telnet 10.0.10.10 8000
Trying 10.0.10.10...
Connected to 10.0.10.10.
Escape character is '^]'.
GET /unattended/provision?token=9c9a1410-dada-4c82-b824-72d183d3ecde

install
url --url http://10.0.10.10/media/mirror.centos.org/7/os/x86_64
lang en_US.UTF-8
selinux --enforcing
keyboard us
etc...

For reference during that the log showed:
==> foreman-proxy/proxy.log <==
D, [2016-10-12T14:20:23.017328 #30738] DEBUG -- : accept: 10.0.10.10:60134
D, [2016-10-12T14:20:26.849604 #30738] DEBUG -- : Rack::Handler::WEBrick is 
invoked.
D, [2016-10-12T14:20:26.850923 #30738] DEBUG -- : Retrieving a template 
from 
http://10.0.10.10:8000//unattended/provision?token=9c9a1410-dada-4c82-b824-72d183d3ecde&url=http%3A%2F%2F10.0.10.10%3A8000
D, [2016-10-12T14:20:26.850994 #30738] DEBUG -- : HTTP headers: 
{"X-Forwarded-For"=>"10.0.10.10, 10.0.10.10"}
D, [2016-10-12T14:20:30.488181 #30738] DEBUG -- : Template: request for 
provision using {"token"=>"9c9a1410-dada-4c82-b824-72d183d3ecde", 
:url=>"http://10.0.10.10:8000"} at george-dev.iss.gin.ntt.net
I, [2016-10-12T14:20:30.488661 #30738]  INFO -- : 10.0.10.10 - - 
[12/Oct/2016:14:20:30 +0000] "GET 
/unattended/provision?token=9c9a1410-dada-4c82-b824-72d183d3ecde HTTP/1.1" 
200 5171 3.6386

D, [2016-10-12T14:20:30.488921 #30738] DEBUG -- : close: 10.0.10.10:60134


Why would the build host not be able to get the template but I can manually 
run the URL and it work?

PS: I will keep an eye on the token expiration. The Foreman page for the 
host highlights that in red if it's expired.

-- 
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.

Reply via email to