Snmp服務無法啟動問題(CentOS5)

顯示結果從第 1 筆 到 8 筆,共計 8 筆
  1. #1
    會員
    註冊日期
    2004-03-12
    討論區文章
    922

    Snmp服務無法啟動問題(CentOS5)

    請教各位前輩
    以CentOS來架設linux主機,但以下列方式啟動snmpd服務時
    /etc/rc.d/init.d/snmpd start 或 service snmpd start
    它服務可以啟動,但是當我檢查其狀態(service snmpd status) 都會出現下列的錯誤訊息
    -->snmp 已停止執行但pid檔案仍在

    而snmp 我是用yum -y install snmp來安裝的,是否有方式可修正呢?
    謝謝



  2. #2
    會員
    註冊日期
    2001-05-18
    討論區文章
    1,939

    回覆: Snmp服務無法啟動問題(CentOS5)

    引用 作者:shung0116 瀏覽文章
    請教各位前輩
    以CentOS來架設linux主機,但以下列方式啟動snmpd服務時
    /etc/rc.d/init.d/snmpd start 或 service snmpd start
    它服務可以啟動,但是當我檢查其狀態(service snmpd status) 都會出現下列的錯誤訊息
    -->snmp 已停止執行但pid檔案仍在

    而snmp 我是用yum -y install snmp來安裝的,是否有方式可修正呢?
    謝謝
    RHEL 5
    umount /dev/hdc
    mount /dev/hdc /mnt <------ 把 第二張光碟放進光碟機

    rpm -ivh /mnt/Server/lm_sensors-2.10.0-3.1.i386.rpm

    umount /dev/hdc
    放第三張光碟
    mount /dev/hdc /mnt
    rpm -ivh /mnt/Server/net-snmp-5.3.1-14.el5.i386.rpm

    service snmpd restart

    用其他台
    C:\Downloads\mrtg-2.16.2\mrtg-2.16.2\contrib\snmpping>snmpping.pl 192.168.0.146
    => Linux localhost.localdomain 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686
    此文章於 2009-01-13 11:49 PM 被 bx2aa 編輯。

  3. #3
    會員
    註冊日期
    2001-05-18
    討論區文章
    1,939

    回覆: Snmp服務無法啟動問題(CentOS5)

    CentOS 5.2 全新
    僅裝 基礎系統 和 開發工具 和 函式庫
    [root@localhost /]# rpm -ivh /mnt/CentOS/lm_sensors-2.10.0-3.1.i386.rpm
    warning: /mnt/CentOS/lm_sensors-2.10.0-3.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
    Preparing... ########################################### [100%]
    1:lm_sensors ########################################### [100%]
    [root@localhost /]# rpm -ivh /mnt/CentOS/net-snmp-5.3.1-24.el5.i386.rpm
    warning: /mnt/CentOS/net-snmp-5.3.1-24.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
    Preparing... ########################################### [100%]
    1:net-snmp ########################################### [100%]
    [root@localhost /]# chkconfig snmpd on
    [root@localhost /]# service snmpd restart
    正在停止 snmpd: [失敗]
    正在啟動 snmpd: [ 確定 ]
    [root@localhost /]#

    [root@localhost /]# iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    RH-Firewall-1-INPUT all -- anywhere anywhere

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination
    RH-Firewall-1-INPUT all -- anywhere anywhere

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination

    Chain RH-Firewall-1-INPUT (2 references)
    target prot opt source destination
    ACCEPT all -- anywhere anywhere
    ACCEPT icmp -- anywhere anywhere icmp any
    ACCEPT esp -- anywhere anywhere
    ACCEPT ah -- anywhere anywhere
    ACCEPT udp -- anywhere 224.0.0.251 udp dpt:mdns
    ACCEPT udp -- anywhere anywhere udp dpt:ipp
    ACCEPT tcp -- anywhere anywhere tcp dpt:ipp
    ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
    ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
    ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:snmp
    ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:162
    ACCEPT udp -- anywhere anywhere state NEW udp dpt:snmp
    ACCEPT udp -- anywhere anywhere state NEW udp dpt:snmp
    REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

    [root@localhost ~]# ifconfig
    eth0 Link encap:Ethernet HWaddr 00:0C:29F:B8:69
    inet addr:192.168.0.109 Bcast:192.168.0.255 Mask:255.255.255.0
    inet6 addr: fe80::20c:29ff:fedf:b869/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:1632 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1649 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:151478 (147.9 KiB) TX bytes:704536 (688.0 KiB)
    Base address:0x10f0 Memory:e8820000-e8840000

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:8 errors:0 dropped:0 overruns:0 frame:0
    TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)

    一樣用 MRTG 的 snmpping.pl
    在 XP
    C:\Downloads\mrtg-2.16.2\mrtg-2.16.2\contrib\snmpping>snmpping.pl 192.168.0.109
    => Linux localhost.localdomain 2.6.18-92.el5 #1 SMP Tue Jun 10 18:49:47 EDT 2008 i686

  4. #4
    會員
    註冊日期
    2004-03-12
    討論區文章
    922

    回覆: Snmp服務無法啟動問題(CentOS5)

    前輩的步驟 我有照作 但遇到下列的狀況 如下語法所示
    [root@anderson2 tmp]# iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination

    執行iptables -L 只有下面幾行 沒有前輩所列的其它rule
    而ifconfig是檢測網路組態設定用

    且在執行snmpping.pl 192.168.1.35 會出現下列的訊息
    -->Can't locate BER.pm in @INC <@INC contains: ../../run C:/Perl/site/lib C:/Perl/lib .> at C:\mrtg-2.16.2\mrtg-2.16.2\contrib\snmpping\snmpping.pl line 3. BEGIN failed--compilation aborted at C:\mrtg-2.16.2\mrtg-2.16.2\contrib\snmpping\snmpping.pl line 3

    是否我有那個步驟有錯呢?煩請前輩指點
    謝謝

  5. #5
    會員
    註冊日期
    2001-05-18
    討論區文章
    1,939

    回覆: Snmp服務無法啟動問題(CentOS5)

    編輯 \contrib\snmpping\snmpping.pl
    修改 use lib qw(../../run); 為 use lib qw(../../lib/mrtg2);

    iptables -L
    是我當時用的
    你用 service iptables stop 就不用管 iptables -L



  6. #6
    會員
    註冊日期
    2004-03-12
    討論區文章
    922

    回覆: Snmp服務無法啟動問題(CentOS5)

    但是執行後卻出現下列的錯誤訊息
    -->SNMP Error:
    receiving response PDU: Unknown error
    SNMPv1_Session <remote host: "192.168.1.35" [192.168.1.35].161>
    community:"public"
    request ID:-1913781773
    PDU bufsize: 8000 bytes
    timeout:2s
    retries:5
    backoff:1>
    at c:\mrtg-2.16.2\contrib\snmpping\snmpping.pl line 15

    於是我使用下列的方式telnet 192.168.1.35 161 發現似乎服務並沒有開啟
    於是我在CentOS執行service snmpd start
    但卻還是回到之前的老問題:snmpd已停止執行但pid檔案仍在

    為什麼會這樣呢?
    煩請前輩指點
    謝謝

  7. #7
    會員
    註冊日期
    2004-03-12
    討論區文章
    922

    回覆: Snmp服務無法啟動問題(CentOS5)

    在Centos上,我本來想用另外的方式,如視窗方式來開啟snmpd服務,或者webmin視窗設定方式,但卻都發生下列狀況
    -->服務有開啟,但是檢測其服務狀態,都是顯示:snmpd已停止執行但pid檔案仍在
    (IPTABLES已停止)
    謝謝

  8. #8
    會員
    註冊日期
    2001-05-18
    討論區文章
    1,939

    回覆: Snmp服務無法啟動問題(CentOS5)

    開不起來就要看 /var/log/messages 有沒有訊息了!
    tail -f /var/log/messages

    另一台 snmpping.pl 看 tail -f 有沒有顯示訊息.

    我都是隨便裝一裝, 然後就隨便開起來.

    移除:
    rpm -qa | grep snmp
    snmpxxxxxxxx

    rpm -e ........... 把 snmpxxxxxxxx 移掉

    which snmpd
    看有沒有還留著的 snmpd

    netstat -a | grep :snmp
    看還有沒有在執行

    umount /dev/hdc
    放光碟
    mount /dev/hdc /mnt
    rpm -ivh /mnt/CentOS/net-snmp-5.3.1-24.el5.i386.rpm

    service snmpd restart

    cat /etc/snmp/snmpd.conf
    我的沒動過的
    [root@localhost snmp]# cat snmpd.conf | grep -v "^#" | grep -v ^$
    com2sec notConfigUser default public
    group notConfigGroup v1 notConfigUser
    group notConfigGroup v2c notConfigUser
    view systemview included .1.3.6.1.2.1.1
    view systemview included .1.3.6.1.2.1.25.1.1
    access notConfigGroup "" any noauth exact systemview none none
    syslocation Unknown (edit /etc/snmp/snmpd.conf)
    syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
    pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
    [root@localhost snmp]#

    snmpping.pl ???.???.???.??? public <------ 沒改過的
    C:\Downloads\mrtg-2.16.2\mrtg-2.16.2\contrib\snmpping>snmpping.pl 192.168.0.146 public
    => Linux localhost.localdomain 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686

    我改為
    com2sec notConfigUser default bx2aa

    C:\Downloads\mrtg-2.16.2\mrtg-2.16.2\contrib\snmpping>snmpping.pl 192.168.0.146 bx2aa
    => Linux localhost.localdomain 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686


    我用
    tail -f /var/log/messages

    然後關或開 snmpd 或是登入都有訊息

    [root@localhost log]# tail -f /var/log/messages
    Jan 16 18:08:35 localhost snmpd[1912]: Received SNMP packet(s) from UDP: [192.168.0.129]:2149
    Jan 16 18:10:30 localhost snmpd[1912]: Connection from UDP: [192.168.0.129]:2150
    Jan 16 18:10:30 localhost snmpd[1912]: Received SNMP packet(s) from UDP: [192.168.0.129]:2150
    Jan 16 18:10:50 localhost snmpd[1912]: Connection from UDP: [192.168.0.129]:2151
    Jan 16 18:10:50 localhost snmpd[1912]: Received SNMP packet(s) from UDP: [192.168.0.129]:2151
    Jan 16 18:11:10 localhost dhcpd: DHCPREQUEST for 192.168.0.129 from 00:00:00:00:00:0c via eth0: unknown lease 192.168.0.129.
    Jan 16 18:13:19 localhost dhcpd: DHCPREQUEST for 192.168.0.129 from 00:00:00:00:00:0c via eth0: unknown lease 192.168.0.129.
    Jan 16 18:14:21 localhost snmpd[1912]: Connection from UDP: [192.168.0.129]:2198
    Jan 16 18:14:21 localhost snmpd[1912]: Received SNMP packet(s) from UDP: [192.168.0.129]:2198
    Jan 16 18:14:27 localhost snmpd[1912]: Received TERM or STOP signal... shutting down...
    Jan 16 18:14:47 localhost gdm[2357]: gdm_slave_session_start: /root 可以被相同群組的使用者寫入。
    Jan 16 18:14:53 localhost gconfd (root-2622): 啟動 (2.14.0 版本),pid 2622,使用者‘root’
    Jan 16 18:14:53 localhost gconfd (root-2622): 第 0 個位置的位址“xml:readonly:/etc/gconf/gconf.xml.mandatory”已解析為一個唯讀的設定來源
    Jan 16 18:14:53 localhost gconfd (root-2622): 第 1 個位置的位址“xml:readwrite:/root/.gconf”已解析為一個可寫入的設定來源
    Jan 16 18:14:53 localhost gconfd (root-2622): 第 2 個位置的位址“xml:readonly:/etc/gconf/gconf.xml.defaults”已解析為一個唯讀的設定來源
    Jan 16 18:15:02 localhost hcid[1760]: Default passkey agent (:1.5, /org/bluez/applet) registered
    Jan 16 18:15:03 localhost pcscd: winscard.c:219:SCardConnect() Reader E-Gate 0 0 Not Found
    Jan 16 18:15:03 localhost last message repeated 4 times
    Jan 16 18:15:06 localhost gconfd (root-2622): 第 0 個位置的位址“xml:readwrite:/root/.gconf”已解析為一個可寫入的設定來源
    Jan 16 18:15:36 localhost snmpd[2792]: NET-SNMP version 5.3.1
    此文章於 2009-01-17 02:18 AM 被 bx2aa 編輯。

類似的主題

  1. 【問題】移除不良服務後造成firewall/ICS無法啟動
    作者:orea2004 所在討論版:-- 防 駭 / 防 毒 版
    回覆: 1
    最後發表: 2008-11-26, 09:38 PM
  2. 【軟體求助】Apache服務無法啟動的問題
    作者:shung0116 所在討論版:-- HELP ME 電 腦 軟 硬 體 急 救 版
    回覆: 3
    最後發表: 2008-03-29, 02:54 PM
  3. 【求助】Apache服務無法自動啟動(Windows XP)
    作者:風凌正 所在討論版:☉ -- 架 站 DIY 討 論 版
    回覆: 0
    最後發表: 2005-09-07, 05:16 AM
  4. 【求助】無法啟動File Replication服務
    作者:ivyserver 所在討論版:-- Windows 討 論 版
    回覆: 5
    最後發表: 2005-04-26, 04:03 PM
  5. MAC Bridge Miniport 服務無法啟動【求助】
    作者:Nissan 所在討論版:-- 網 路 技 術 版
    回覆: 0
    最後發表: 2004-02-09, 01:48 AM

 

此網頁沒有從搜尋引擎而來的訪客

發表文章規則

  • 不可以發表新主題
  • 不可以回覆文章
  • 不可以上傳附加檔案
  • 不可以編輯自己的文章
  •