Post by jameslundberg on Jun 22, 2022 17:40:47 GMT
# In installed the redfish emulator and started it up on port 5000
(redfish) <user>$ python3 emulator.py
INFO:root:Mockup folders
['Redfish']
* Redfish endpoint at localhost:5000
* Using static mockup
INFO:root:Init ResourceDictionary.
INFO:root:Loading Redfish static resources
INFO:root:Init ResourceDictionary.
* Use HTTP
* Running in Redfish mode
* Serving Flask app 'g' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
WARNING:werkzeug: * Running on all addresses.
WARNING: This is a development server. Do not use it in a production deployment.
INFO:werkzeug: * Running on 9.114.207.147:5000/ (Press CTRL+C to quit)
# so it's running on port 5000, but I can't reach it via "curl 9.114.207.147:5000/redfish/v1", so I figure it's the firewalld.
$sudo firewall-cmd --zone=public --add-port=5000/tcp --permanent
success
# checked ports listening
$(redfish) <user>$ sudo lsof -i -P -n | grep LISTEN
rpcbind 2037 rpc 8u IPv4 17764 0t0 TCP *:111 (LISTEN)
rpcbind 2037 rpc 11u IPv6 17767 0t0 TCP *:111 (LISTEN)
cupsd 2671 root 10u IPv6 16876 0t0 TCP [::1]:631 (LISTEN)
cupsd 2671 root 11u IPv4 16877 0t0 TCP 127.0.0.1:631 (LISTEN)
sshd 2676 root 3u IPv4 11141 0t0 TCP *:22 (LISTEN)
sshd 2676 root 4u IPv6 11143 0t0 TCP *:22 (LISTEN)
rpc.statd 2827 rpcuser 9u IPv4 13820 0t0 TCP *:37036 (LISTEN)
rpc.statd 2827 rpcuser 11u IPv6 13826 0t0 TCP *:60478 (LISTEN)
master 3103 root 13u IPv4 98845 0t0 TCP 127.0.0.1:25 (LISTEN)
master 3103 root 14u IPv6 98846 0t0 TCP [::1]:25 (LISTEN)
ncpa_list 3192 nagios 8u IPv6 9616 0t0 TCP *:5693 (LISTEN)
dnsmasq 3218 nobody 6u IPv4 16938 0t0 TCP 192.168.122.1:53 (LISTEN)
ld-linux- 26782 jimlund 5u IPv6 1605926 0t0 TCP *:6002 (LISTEN)
ld-linux- 26782 jimlund 6u IPv4 1605927 0t0 TCP *:6002 (LISTEN)
vncserver 26801 jimlund 7u IPv6 1602732 0t0 TCP *:5902 (LISTEN)
vncserver 26801 jimlund 8u IPv4 1602733 0t0 TCP *:5902 (LISTEN)
ld-linux- 33245 jimlund 5u IPv6 183037 0t0 TCP *:6001 (LISTEN)
ld-linux- 33245 jimlund 6u IPv4 183038 0t0 TCP *:6001 (LISTEN)
vncserver 33264 jimlund 8u IPv6 31429 0t0 TCP *:5901 (LISTEN)
vncserver 33264 jimlund 9u IPv4 31430 0t0 TCP *:5901 (LISTEN)
ld-linux- 44965 schiff 5u IPv6 1302977 0t0 TCP *:6026 (LISTEN)
ld-linux- 44965 schiff 6u IPv4 1302978 0t0 TCP *:6026 (LISTEN)
vncserver 44984 schiff 8u IPv6 1080554 0t0 TCP *:5926 (LISTEN)
vncserver 44984 schiff 9u IPv4 1080555 0t0 TCP *:5926 (LISTEN)
httpd 48447 root 4u IPv6 1705859 0t0 TCP *:80 (LISTEN)
httpd 48448 apache 4u IPv6 1705859 0t0 TCP *:80 (LISTEN)
httpd 48449 apache 4u IPv6 1705859 0t0 TCP *:80 (LISTEN)
httpd 48450 apache 4u IPv6 1705859 0t0 TCP *:80 (LISTEN)
httpd 48451 apache 4u IPv6 1705859 0t0 TCP *:80 (LISTEN)
httpd 48452 apache 4u IPv6 1705859 0t0 TCP *:80 (LISTEN)
ld-linux- 48816 jcordes 5u IPv6 1322576 0t0 TCP *:6017 (LISTEN)
ld-linux- 48816 jcordes 6u IPv4 1322577 0t0 TCP *:6017 (LISTEN)
vncserver 48835 jcordes 8u IPv6 1100782 0t0 TCP *:5917 (LISTEN)
vncserver 48835 jcordes 9u IPv4 1100783 0t0 TCP *:5917 (LISTEN)
# I don't see it running 5000 so I figured it need redfish added as a service
(redfish) [jimlund@monty-poksm4 redfish-emulator]$ sudo firewall-cmd --permanent --zone=public --add-service=redfish
Error: INVALID_SERVICE: 'redfish' not among existing services
# Checked httpd services configured
(redfish) <user>$ firewall-cmd --get-services
RH-Satellite-6 RH-Satellite-6-capsule amanda-client amanda-k5-client amqp amqps apcupsd audit
bacula bacula-client bgp bitcoin bitcoin-rpc bitcoin-testnet bitcoin-testnet-rpc ceph ceph-mon
cfengine condor-collector ctdb dhcp dhcpv6 dhcpv6-client distcc dns docker-registry docker-swarm
dropbox-lansync elasticsearch etcd-client etcd-server finger freeipa-ldap freeipa-ldaps
freeipa-replication freeipa-trust ftp ganglia-client ganglia-master git gre high-availability
http https imap imaps ipp ipp-client ipsec irc ircs iscsi-target isns jenkins kadmin kerberos
kibana klogin kpasswd kprop kshell ldap ldaps libvirt libvirt-tls lightning-network llmnr
managesieve matrix mdns minidlna mongodb mosh mountd mqtt mqtt-tls ms-wbt mssql murmur mysql
nfs nfs3 nmea-0183 nrpe ntp nut openvpn ovirt-imageio ovirt-storageconsole ovirt-vmconsole
plex pmcd pmproxy pmwebapi pmwebapis pop3 pop3s postgresql privoxy proxy-dhcp ptp pulseaudio
puppetmaster quassel radius redis rpc-bind rsh rsyncd rtsp salt-master samba samba-client
samba-dc sane sip sips slp smtp smtp-submission smtps snmp snmptrap spideroak-lansync squid
ssh steam-streaming svdrp svn syncthing syncthing-gui synergy syslog syslog-tls telnet tftp
tftp-client tinc tor-socks transmission-client upnp-client vdsm vnc-server vncserver-virtuald
vncserver-x11-serviced wbem-http wbem-https wsman wsmans xdmcp xmpp-bosh xmpp-client xmpp-local
xmpp-server zabbix-agent zabbix-server
so redfish is not a service?
(redfish) <user>$ python3 emulator.py
INFO:root:Mockup folders
['Redfish']
* Redfish endpoint at localhost:5000
* Using static mockup
INFO:root:Init ResourceDictionary.
INFO:root:Loading Redfish static resources
INFO:root:Init ResourceDictionary.
* Use HTTP
* Running in Redfish mode
* Serving Flask app 'g' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
WARNING:werkzeug: * Running on all addresses.
WARNING: This is a development server. Do not use it in a production deployment.
INFO:werkzeug: * Running on 9.114.207.147:5000/ (Press CTRL+C to quit)
# so it's running on port 5000, but I can't reach it via "curl 9.114.207.147:5000/redfish/v1", so I figure it's the firewalld.
$sudo firewall-cmd --zone=public --add-port=5000/tcp --permanent
success
# checked ports listening
$(redfish) <user>$ sudo lsof -i -P -n | grep LISTEN
rpcbind 2037 rpc 8u IPv4 17764 0t0 TCP *:111 (LISTEN)
rpcbind 2037 rpc 11u IPv6 17767 0t0 TCP *:111 (LISTEN)
cupsd 2671 root 10u IPv6 16876 0t0 TCP [::1]:631 (LISTEN)
cupsd 2671 root 11u IPv4 16877 0t0 TCP 127.0.0.1:631 (LISTEN)
sshd 2676 root 3u IPv4 11141 0t0 TCP *:22 (LISTEN)
sshd 2676 root 4u IPv6 11143 0t0 TCP *:22 (LISTEN)
rpc.statd 2827 rpcuser 9u IPv4 13820 0t0 TCP *:37036 (LISTEN)
rpc.statd 2827 rpcuser 11u IPv6 13826 0t0 TCP *:60478 (LISTEN)
master 3103 root 13u IPv4 98845 0t0 TCP 127.0.0.1:25 (LISTEN)
master 3103 root 14u IPv6 98846 0t0 TCP [::1]:25 (LISTEN)
ncpa_list 3192 nagios 8u IPv6 9616 0t0 TCP *:5693 (LISTEN)
dnsmasq 3218 nobody 6u IPv4 16938 0t0 TCP 192.168.122.1:53 (LISTEN)
ld-linux- 26782 jimlund 5u IPv6 1605926 0t0 TCP *:6002 (LISTEN)
ld-linux- 26782 jimlund 6u IPv4 1605927 0t0 TCP *:6002 (LISTEN)
vncserver 26801 jimlund 7u IPv6 1602732 0t0 TCP *:5902 (LISTEN)
vncserver 26801 jimlund 8u IPv4 1602733 0t0 TCP *:5902 (LISTEN)
ld-linux- 33245 jimlund 5u IPv6 183037 0t0 TCP *:6001 (LISTEN)
ld-linux- 33245 jimlund 6u IPv4 183038 0t0 TCP *:6001 (LISTEN)
vncserver 33264 jimlund 8u IPv6 31429 0t0 TCP *:5901 (LISTEN)
vncserver 33264 jimlund 9u IPv4 31430 0t0 TCP *:5901 (LISTEN)
ld-linux- 44965 schiff 5u IPv6 1302977 0t0 TCP *:6026 (LISTEN)
ld-linux- 44965 schiff 6u IPv4 1302978 0t0 TCP *:6026 (LISTEN)
vncserver 44984 schiff 8u IPv6 1080554 0t0 TCP *:5926 (LISTEN)
vncserver 44984 schiff 9u IPv4 1080555 0t0 TCP *:5926 (LISTEN)
httpd 48447 root 4u IPv6 1705859 0t0 TCP *:80 (LISTEN)
httpd 48448 apache 4u IPv6 1705859 0t0 TCP *:80 (LISTEN)
httpd 48449 apache 4u IPv6 1705859 0t0 TCP *:80 (LISTEN)
httpd 48450 apache 4u IPv6 1705859 0t0 TCP *:80 (LISTEN)
httpd 48451 apache 4u IPv6 1705859 0t0 TCP *:80 (LISTEN)
httpd 48452 apache 4u IPv6 1705859 0t0 TCP *:80 (LISTEN)
ld-linux- 48816 jcordes 5u IPv6 1322576 0t0 TCP *:6017 (LISTEN)
ld-linux- 48816 jcordes 6u IPv4 1322577 0t0 TCP *:6017 (LISTEN)
vncserver 48835 jcordes 8u IPv6 1100782 0t0 TCP *:5917 (LISTEN)
vncserver 48835 jcordes 9u IPv4 1100783 0t0 TCP *:5917 (LISTEN)
# I don't see it running 5000 so I figured it need redfish added as a service
(redfish) [jimlund@monty-poksm4 redfish-emulator]$ sudo firewall-cmd --permanent --zone=public --add-service=redfish
Error: INVALID_SERVICE: 'redfish' not among existing services
# Checked httpd services configured
(redfish) <user>$ firewall-cmd --get-services
RH-Satellite-6 RH-Satellite-6-capsule amanda-client amanda-k5-client amqp amqps apcupsd audit
bacula bacula-client bgp bitcoin bitcoin-rpc bitcoin-testnet bitcoin-testnet-rpc ceph ceph-mon
cfengine condor-collector ctdb dhcp dhcpv6 dhcpv6-client distcc dns docker-registry docker-swarm
dropbox-lansync elasticsearch etcd-client etcd-server finger freeipa-ldap freeipa-ldaps
freeipa-replication freeipa-trust ftp ganglia-client ganglia-master git gre high-availability
http https imap imaps ipp ipp-client ipsec irc ircs iscsi-target isns jenkins kadmin kerberos
kibana klogin kpasswd kprop kshell ldap ldaps libvirt libvirt-tls lightning-network llmnr
managesieve matrix mdns minidlna mongodb mosh mountd mqtt mqtt-tls ms-wbt mssql murmur mysql
nfs nfs3 nmea-0183 nrpe ntp nut openvpn ovirt-imageio ovirt-storageconsole ovirt-vmconsole
plex pmcd pmproxy pmwebapi pmwebapis pop3 pop3s postgresql privoxy proxy-dhcp ptp pulseaudio
puppetmaster quassel radius redis rpc-bind rsh rsyncd rtsp salt-master samba samba-client
samba-dc sane sip sips slp smtp smtp-submission smtps snmp snmptrap spideroak-lansync squid
ssh steam-streaming svdrp svn syncthing syncthing-gui synergy syslog syslog-tls telnet tftp
tftp-client tinc tor-socks transmission-client upnp-client vdsm vnc-server vncserver-virtuald
vncserver-x11-serviced wbem-http wbem-https wsman wsmans xdmcp xmpp-bosh xmpp-client xmpp-local
xmpp-server zabbix-agent zabbix-server
so redfish is not a service?