Problem:
[root@mongos foreman-proxy]# foreman-installer
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[mongos.example.com ]: Could not evaluate: Proxy mongos.example.com cannot be retrieved: unknown error (response 500)
Expected outcome: Clean 100% installation without any error
hostname :
[root@mongos foreman-debug-gDw0M]# hostname -f
mongos.example.com
I already made the entry in /etc/hosts
Foreman and Proxy versions:
[root@mongos foreman-debug-gDw0M]# rpm -qa | grep foreman
tfm-rubygem-foreman_snapshot-0.1.0-3.fm1_11.el7.noarch
foreman-cli-1.16.0-1.el7.noarch
foreman-debug-1.9.3-1.el7.noarch
tfm-rubygem-foreman_setup-5.0.0-1.fm1_13.el7.noarch
foreman-release-scl-1-1.el7.x86_64
foreman-installer-1.16.0-1.el7.noarch
foreman-selinux-1.9.3-1.el7.noarch
foreman-postgresql-1.16.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.11.0-1.el7.noarch
foreman-proxy-1.9.3-1.el7.noarch
foreman-1.16.0-1.el7.noarch
foreman-release-1.16.0-1.el7.noarch
Did you make the entry for localhost, or did you make the entry for the actual IP? Mongo may not be listening on localhost. You can check with “netstat -tupln” and see what IP/port it listens on.
Hey James,
Thanks for your reply.
Could you please tell where should I make an entry for localhost or IP.
I already make an entry in /etc/hosts as IP & mongos.example.com .
Kindly reply.
_js
February 21, 2018, 8:34pm
4
I think he is asking if there is a 127.0.0.1 entry in your /etc/hosts file.
The netstat would be useful to see if your service is listening on ipv4 or ipv6 vs both.
netstat -tupln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1791/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1739/master
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 59875/ruby
tcp 0 0 0.0.0.0:8008 0.0.0.0:* LISTEN 59962/ruby
tcp 0 0 127.0.0.1:45225 0.0.0.0:* LISTEN 114277/Passenger Ra
tcp6 0 0 :::8140 :::* LISTEN 52986/java
tcp6 0 0 :::111 :::* LISTEN 1/systemd
tcp6 0 0 :::80 :::* LISTEN 63502/httpd
tcp6 0 0 :::22 :::* LISTEN 1791/sshd
tcp6 0 0 ::1:25 :::* LISTEN 1739/master
tcp6 0 0 :::443 :::* LISTEN 63502/httpd
udp 0 0 0.0.0.0:69 0.0.0.0:* 1235/xinetd
udp 0 0 127.0.0.1:323 0.0.0.0:* 905/chronyd
udp6 0 0 ::1:323 :::* 905/chronyd
cat /etc/hosts
127.0.0.1 mongos.example.com mongos localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Hi Jeff,
[root@mongos ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.181 mongos.example.com mongos
[root@mongos ~]# netstat -tupln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd
tcp 0 0 0.0.0.0:2003 0.0.0.0:* LISTEN 2149/python2
tcp 0 0 0.0.0.0:2004 0.0.0.0:* LISTEN 2149/python2
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 2204/dnsmasq
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 858/sshd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 9212/postgres
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2307/sendmail: acce
tcp 0 0 0.0.0.0:7002 0.0.0.0:* LISTEN 2149/python2
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 17377/ruby
tcp 0 0 0.0.0.0:1666 0.0.0.0:* LISTEN 1038/p4broker [quic
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 1045/nrpe
tcp 0 0 127.0.0.1:1667 0.0.0.0:* LISTEN 2084/p4d [quick-sta
tcp6 0 0 :::8140 :::* LISTEN 26822/java
tcp6 0 0 :::61613 :::* LISTEN 3694/java
tcp6 0 0 :::61614 :::* LISTEN 3694/java
tcp6 0 0 :::111 :::* LISTEN 1/systemd
tcp6 0 0 :::80 :::* LISTEN 17416/httpd
tcp6 0 0 :::61616 :::* LISTEN 3694/java
tcp6 0 0 :::38869 :::* LISTEN 3694/java
tcp6 0 0 :::3030 :::* LISTEN 2063/grafana-server
tcp6 0 0 :::22 :::* LISTEN 858/sshd
tcp6 0 0 ::1:5432 :::* LISTEN 9212/postgres
tcp6 0 0 :::443 :::* LISTEN 17416/httpd
tcp6 0 0 :::1883 :::* LISTEN 3694/java
tcp6 0 0 :::8161 :::* LISTEN 3694/java
tcp6 0 0 :::5666 :::* LISTEN 1045/nrpe
tcp6 0 0 :::5672 :::* LISTEN 3694/java
udp 0 0 0.0.0.0:51561 0.0.0.0:* 572/avahi-daemon: r
udp 0 0 192.168.122.1:53 0.0.0.0:* 2204/dnsmasq
udp 0 0 0.0.0.0:67 0.0.0.0:* 2204/dnsmasq
udp 0 0 0.0.0.0:69 0.0.0.0:* 880/xinetd
udp 0 0 127.0.0.1:323 0.0.0.0:* 586/chronyd
udp 0 0 0.0.0.0:514 0.0.0.0:* 854/rsyslogd
udp 0 0 0.0.0.0:5353 0.0.0.0:* 572/avahi-daemon: r
udp6 0 0 ::1:323 :::* 586/chronyd
udp6 0 0 :::514 :::* 854/rsyslogd
Still there is a same problem.
Thank You Jeff…
It’s working now after rebooting my machine.
Sounds like that started the mongodb service, which wasn’t running, based on your netstat output.
Yes Probably… Thanks for your help & support.
You can close this thread.
hello,I encounter the same problem:
[ERROR 2020-06-06T23:17:27 main] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foreman.example.com ]: Could not evaluate: Proxy foreman.example.com cannot be retrieved: unknown error (response 500)
My host information are as below
[root@foreman /]# cat /etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.17.0.3 foreman.example.com foreman
[root@foreman /]# netstat -tupln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 1586/postmaster
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 2854/ruby
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 2078/httpd
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 1372/redis-server 1
tcp 0 0 0.0.0.0:8140 0.0.0.0:* LISTEN 2423/java
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2078/httpd
tcp6 0 0 :::8443 :::* LISTEN 2854/ruby
udp 0 0 0.0.0.0:69 0.0.0.0:* 1443/xinetd
Waiting for your reply
a 500 error indicates that there was some issue with the smart proxy, not necessarily the same one as described in this thread - many errors might lead to 500 message. Note that this thread is from over two years ago, so most likely you are seeing a different issue.
I suggest opening a new thread with what foreman versions you are attempting to install, as well as the contents of /var/log/foreman-proxy/proxy.log
and /var/log/foreman-installer/installer.log
.