故障原由:ios
1. 服務器從新安裝服務器
問題:cookie
沒法從新啓動funcd 進程網絡
解決方法:架構
1. 從新安裝func ,無效框架
2. 修改/etc/hosts,無效ssh
3. 刪除/etc/pki/certmaster/* ,無效(slave端)tcp
4. 刪除/var/lib/certmaster/certmaster/certs/* ,成功(master端)ide
總結:ui
1. 原理這個時候就顯示的很重要,你要知道它的工做原理,這樣就容易判斷問題在哪裏。
2. 實際是爲了更好的理解原理、真正的掌握和創造價值。
附錄:
FUNC 使用指南
1. Func 簡介:
·Fedora 統一網絡控制器
·Fedora Unified Network Controller
·能夠用在RedHat系列產品上
·是爲了解決統一管理監控問題,而設計開發的系統管理基礎框架
·Func 能夠讓你在主控機上一次管理任意多臺服務器,或任意多個服務器組
·Func 命令行能夠直接發送遠程命令或者遠程獲取數據
·Func 通信基於 XMLRPC 和 SSL 標準協議
·新裝服務器也能夠在 Kickstart 文件中自動安裝 Func,自動註冊到主控服務器
·創建了 Master - Slaves 主從 SSL 證書管控體系,能夠將證書自動分發到全部受控服務器
1.4. Func 安裝
·主控端與被控端都需安裝
·Certmaster
Func
·下載:[http://download.fedora.redhat.com/pub/epel/]
·/etc/certmaster/certmaster.conf 編輯,容許autosign == yes
·讓certmaster啓動
·在 /etc/certmaster/minion.conf 指定certmaster服務器
·讓funcd服務器啓動
·在服務端上看有多少臺客戶端註冊
·certmaster-ca --list-sign
·或
ls /var/lib/certmaster/certmaster/certs/
certmaster-ca -c hostname
或
rm /var/lib/certmaster/certmaster/certs/hostname.cert
·必須在服務端刪除此客戶機的cert文件
rm /var/lib/certmaster/certmaster/certs/hostname.cert
1.10. 若是在服務端刪掉了客戶端的 .cert文件怎麼辦
·能夠將client的 /etc/pki/certmaster/hostname.cert 拷貝過來
·將client 的/etc/pki/certmaster/hostname.*也刪掉,再重啓funcd,cert文件會自動傳輸過來
CommandModule -- Running Arbitrary Commands Like SSH Does
IPtablesModule -- iptables management
NetworkTest -- Test out network stuff.
ProcessModule -- Process Info, memory usage, and Killing
ServiceModule --Service Status and Control
JBossModule -- monitoring and control jboss instances
HardwareModule -- Hardware Profilling
MountModule -- mount, unmount, and query mounted resources
NagiosCheck -- be able to call Nagios plugins and get their results,without needing to install nagios. Works with any plugin
·格式:
func hostname call command run command
·例:
func ’ssh-1′ call command run /usr/bin/uptime
func ’ssh-1′ call command run 「date -s 09:47:40「
func ’ssh-1′ call command run 「hwclock -w「
func 「ssh-1″ call command run 「cat /proc/cpuinfo」 不過排列很差看
·格式:
Func hostname call service start/stop/restart servername
·例:
func ssh-1 call service start httpd
func ssh-1 call service stop sendmail
Func ssh-1 call service restart named
·格式:
func hostname call hardware info
-例:
func ’ssh-1′ call hardware info
若是不能執行通常是由於 smolt 沒有安裝
·格式:
func hostname call iptables command
·例:
func 「ssh-1″ call iptables policy func 「ssh-1″ call iptables dump func 「ssh-1″ call iptables.port drop_to 53 192.168.0.0/24 udp src
func ’ssh-1′ call iptables run 「-L INPUT」 func ’ssh-1′ call iptables policy OUTPUT DROP func ’ssh-1′ call iptables drop_from 192.168.0.10
·格式: Func hostname call command run command
·例: func ’ssh-1′ call command run ‘iptables -A INPUT -s 192.168.239.233 -j DROP’
·格式:
func hostname call jboss command
·例:
func 「*」 call jboss status
func 「*」 call jboss check
func 「*」 call jboss search_by_instance 「default「
func 「*」 call jboss search_by_address 「127.0.0.1「
func 「*」 call jboss search_by_port 8080
·格式:
Func hostname call process command
·例:
func ssh-1 call process info 「aux」
func ssh-1 call process mem
func ssh-1 call process kill httpd SIGHUP
·格式:
Func hostname call sysctl command
·例:
func ssh-1 call sysctl list
func 「*」 call sysctl get <parameter> func 「*」 call sysctl set <parameter> <value>
func ssh-1 call sysctl set net.ipv4.tcp_syncookies 1
2.1.8. RpmModule模塊 ( =rpm –qa )
func ssh-1 call rpms inventory
2.1.9. SmartModule模塊 ( 看硬盤信息 )
func ssh-1 call smart info
func ssh-1 call yumcmd update
func ssh-1 call command run ‘yum update’