Actions
Bug #12429
closedforeman-proxy service not started on some hosts
Difficulty:
Triaged:
Bugzilla link:
Description
Foreman-proxy in discovery image service not started on some hosts with many network interface (9 in our case). This causes, that machine is not automatically restarted after discovery and auto-provisioning is not continuing. We need to reboot it manually.
Discovery image version 3.0.4, Discovery plugin version 4.1.1.
Foreman logs error:
2015-11-10T10:41:03 [app] [I] Create DHCP reservation for mac44a842403d3c.cloud.testlab-44:a8:42:40:3d:3c/172.27.19.153 2015-11-10T10:41:03 [app] [I] Add DNS A record for mac44a842403d3c.cloud.testlab/172.27.19.153 2015-11-10T10:41:03 [sql] [I] Add the TFTP configuration for mac44a842403d3c.cloud.testlab 2015-11-10T10:41:03 [sql] [I] Fetching required TFTP boot files for mac44a842403d3c.cloud.testlab 2015-11-10T10:41:04 [app] [W] Unable to reboot mac44a842403d3c | Errno::ECONNREFUSED: Connection refused - connect(2) for "172.27.19.153" port 8443 | /usr/lib/ruby/2.1.0/net/http.rb:879:in `initialize' | /usr/lib/ruby/2.1.0/net/http.rb:879:in `open'
Foreman-proxy service on fdi-image not running:
[root@fdi ~]# systemctl status foreman-proxy.service foreman-proxy.service - Foreman Proxy Loaded: loaded (/usr/lib/systemd/system/foreman-proxy.service; enabled) Active: failed (Result: exit-code) since Tue 2015-11-10 09:59:04 UTC; 1min 41s ago Process: 1038 ExecStartPre=/usr/bin/generate-proxy-cert (code=exited, status=1/FAILURE) Nov 10 09:59:04 fdi systemd[1]: foreman-proxy.service: control process exited, code=exited status=1 Nov 10 09:59:04 fdi systemd[1]: Failed to start Foreman Proxy. Nov 10 09:59:04 fdi systemd[1]: Unit foreman-proxy.service entered failed state.
Issue is in script for key generation - /usr/bin/generate-proxy-cert.
Line
IP=$(nmcli -t -f IP4.ADDRESS con show primary 2>/dev/null | cut -f2 -d: | cut -f1 -d/)
does not return IP address and exists with return code 1.
Actions