常見錯誤集合

錯誤 1

 

  1. The program package-cleanup is found in the yum-utils package 

解決方法:

  1. # yum clean all 

  2. # rpm --rebuilddb 

  3. # yum update 

 

使用解決方法仍然報錯,根據錯誤信息 檢查/etc/yum.conf確保 沒有這行exclude=*.i386 *.i586 *.i686

結束

原來使用yum 安裝軟件時會自動安裝上兩個版本的,xxx.i386 與 xxx.x86_64 ,由於我使用的基本是64 位操作系統,所以在 /etc/yum.conf 屏蔽安裝所有 i386 軟件包,造成了這個錯誤。

 

錯誤2

  1. login: PAM [dlerror: /lib/security/pam_limits.so: cannot open shared object 

  2. file: No such file or directory] 

解決方法

  1. vim /etc/pam.d/login 

  2. 修改 

  3. "session    required     /lib/security/pam_limits.so" 

  4. 爲 

  5. "session    required     /lib64/security/pam_limits.so" 

  6. 重啓 

 錯誤3

  1. /usr/local/php/bin/phpize  

  2. Cannot find config.m4. 

  3. Make sure that you run '/usr/local/php/bin/phpize' in the top level source directory of the module 

解決方法

  1. # ls 

  2. config0.m4  CREDITS    openssl.dsp  php_openssl.h  tests 

  3. config.w32  openssl.c  openssl.mak  README         xp_ssl.c 

  4. ln -s config0.m4 config.m4 

  5. # ls 

  6. config0.m4  config.w32  openssl.c    openssl.mak    README  xp_ssl.c 

  7. config.m4   CREDITS     openssl.dsp  php_openssl.h  tests 

  8. /usr/local/php/bin/phpize 

  9. Configuring for: 

  10. PHP Api Version:         20041225 

  11. Zend Module Api No:      20060613 

  12. Zend Extension Api No:   220060519 

#3.1 We selected 'Asia/Chongqing' for 'CST/8.0/no DST'  

  1. cat /etc/sysconfig/clock 

  2. ZONE="Asia/Shanghai"

  3. //修改一下php.ini的時區 

  4. date.timezone = Asia/Shanghai 

 

錯誤4

  1. Last login: Fri Mar 30 14:34:50 2012 from 172.0.0.50 

  2. id: cannot find name for group ID 525 

解決方法

  1. useradd -g zm zm

  2. 或者 

  3. useradd -G zm zm

 

錯誤 5 netfilter 相關

  1. Apr  1 13:29:24 haproxy_t kernel: nf_conntrack: table full, dropping packet. 

  2. Apr  1 13:29:25 haproxy_t kernel: nf_conntrack: table full, dropping packet. 

  3. Apr  1 13:29:25 haproxy_t kernel: nf_conntrack: table full, dropping packet. 

  4. Apr  1 13:29:26 haproxy_t kernel: nf_conntrack: table full, dropping packet. 

  5. Apr  1 13:29:32 haproxy_t kernel: possible SYN flooding on port 80. Sending cookies.

  6. Apr  1 13:30:32 haproxy_t kernel: possible SYN flooding on port 80. Sending cookies. 

  7. Apr  1 13:31:32 haproxy_t kernel: possible SYN flooding on port 80. Sending cookies. 

  8. Apr  1 13:32:32 haproxy_t kernel: possible SYN flooding on port 80. Sending cookies. 

 kernel: nf_conntrack: table full, dropping packet.

解決方法

rhel5/centos5

  1. 在/etc/sysctl.conf中加入: 

  2. net.ipv4.netfilter.ip_conntrack_max = 655350

  3. net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 1200

  4.  

  5. 立即生效 

  6. sysctl -p 


  7. 統計

  8. wc -l /proc/net/ip_conntrack

  9. 34546 /proc/net/ip_conntrack 

rhel6/centos6

  1. 在/etc/sysctl.conf中加入:  

  2. net.nf_conntrack_max = 100000

  3.  

  4. 立即生效

  5. sysctl -p

  6.  

  7. 統計

  8. wc -l /proc/net/nf_conntrack

  9. 51962 /proc/net/nf_conntrack

擴展

  1. kernel 用 ip_conntrack 模塊來記錄 iptables 網絡包的狀態,並保存到 table 裏(/proc/net/ip_conntrack|/proc/net/nf_conntrack),

  2. 如果網絡狀況繁忙,比如高連接,高併發連接等會導致逐步佔用這個 table 可用空間,

  3. 一般這個 table 很大不容易佔滿並且可以自己清理,table 的記錄會一直呆在 table 裏佔用空間直到源 IP 發一個 RST 包,

  4. 但是如果出現被***、錯誤的網絡配置、有問題的路由/路由器、有問題的網卡等情況的時候,就會導致源 IP 發的這個 RST 包收不到,

  5. 這樣就積累在 table 裏,越積累越多直到佔滿,滿了以後 iptables 就會丟包,出現外部無法連接服務器的情況。 

  6. 知道問題就好辦了,要麼增加 table 容量以便能記錄更多的連接信息(會消耗一點內存),要麼就卸載 ip_conntrack 模塊。 

 

錯誤6 (編譯 nrpe for nagios)

  1. [root@three nrpe-2.13]# make all 

  2. cd ./src/; make ; cd .. 

  3. make[1]: Entering directory `/root/nagios/nrpe-2.13/src' 

  4. gcc -g -O2 -I/usr/local/openssl/include/openssl -I/usr/local/openssl/include -DHAVE_CONFIG_H -o nrpe nrpe.c utils.c acl.c -L/usr/lib64  -lssl -lcrypto -lnsl -lwrap  

  5. nrpe.c: In function ‘main’: 

  6. nrpe.c:218: warning: assignment discards qualifiers from pointer target type 

  7. nrpe.c:251: warning: assignment makes pointer from integer without a cast 

  8. /tmp/ccK17MBg.o: In function `main': 

  9. /root/nagios/nrpe-2.13/src/nrpe.c:251: undefined reference to `get_dh512'

  10. collect2: ld returned 1 exit status 

  11. make[1]: *** [nrpe] Error 1 

  12. make[1]: Leaving directory `/root/nagios/nrpe-2.13/src' 

  13. *** Compile finished *** 

  14. If the NRPE daemon and client compiled without any errors, you 

  15. can continue with the installation or upgrade process. 

原因

  1. 在/usr/local/目錄下裝有openssl,導致  配置時調用配置目錄 -I/usr/local/openssl/include,而非系統自帶 

解決方法

  1. [root@three nrpe-2.13]# vim configure 

  2. 行6630  去掉 /usr/local/openssl 即可,

  3. 如"for dir in $ssl_inc_dir $ssl_dir /usr/local/openssl /usr/local/ssl" 

  4. [root@three nrpe-2.13]# ./configure  #再次配置
    ....
    [root@three nrpe-2.13]# make all

  5. .... *** Compile finished ***                                      #通過

 

錯誤7 named  (zone test.com/IN: not loaded due to errors.)

原因

  1. $ tail /var/log/messages 

  2. May  7 10:42:00 one named[27080]: reading built-in trusted keys from file '/usr/local/named/etc/bind.keys' 

  3. May  7 10:42:00 one named[27080]: using default UDP/IPv4 port range: [1024, 65535] 

  4. May  7 10:42:00 one named[27080]: using default UDP/IPv6 port range: [1024, 65535] 

  5. May  7 10:42:00 one named[27080]: sizing zone task pool based on 2 zones 

  6. May  7 10:42:00 one named[27080]: reloading configuration succeeded 

  7. May  7 10:42:00 one named[27080]: reloading zones succeeded 

  8. May  7 10:42:00 one named[27080]: zone test.com/IN: NS 'ns1.test.com' has no address records (A or AAAA) 

  9. May  7 10:42:00 one named[27080]: zone test.com/IN: not loaded due to errors. 

  10. May  7 10:42:00 one named[27080]: all zones loaded 

  11. May  7 10:42:00 one named[27080]: running 

 解決方法(注意ns1.test.com.的".")

  1. $TTL 600  

  2. @       IN      SOA     ns1.test.com.   root.test.com. ( 

  3.         2009050401 

  4.         3600 

  5.         600 

  6.         3600000 

  7.         1800 ) 

  8. @               IN      NS      ns1.test.com. 

  9. ns1             IN      A       192.168.57.71 

  10. www             IN      A       192.168.57.71     

  11. monitor         IN      A       192.168.57.70  

 mysql(Column count of mysql.db is wrong. Expected 22, found 20. The table is probably corrupte)

  1. 120511 14:26:49 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. The table is probably corrupted 

  2. 120511 14:26:49 [ERROR] mysql.user has no `Event_priv` column at position 29 

  3. 120511 14:26:49 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler. 

 

錯誤8 keepalived ip address associated with VRID not present in received packet

原因

  1. 5913 May 16 15:26:04 ha02 Keepalived_vrrp: ip address associated with VRID not present in received packet : 192.168.57.75 

  2. 5914 May 16 15:26:04 ha02 Keepalived_vrrp: one or more VIP associated with VRID mismatch actual MASTER advert 

  3. 5915 May 16 15:26:04 ha02 Keepalived_vrrp: bogus VRRP packet received on eth0 !!! 

  4. 5916 May 16 15:26:04 ha02 Keepalived_vrrp: VRRP_Instance(VI_1) ignoring received advertisment... 

  5. 5917 May 16 15:26:05 ha02 Keepalived_vrrp: ip address associated with VRID not present in received packet : 192.168.57.75 

  6. 5918 May 16 15:26:05 ha02 Keepalived_vrrp: one or more VIP associated with VRID mismatch actual MASTER advert 

  7. 5919 May 16 15:26:05 ha02 Keepalived_vrrp: bogus VRRP packet received on eth0 !!! 

  8. 5920 May 16 15:26:05 ha02 Keepalived_vrrp: VRRP_Instance(VI_1) ignoring received advertisment.. 

解決方法

  1. 在同一網段內virtual_router_id 值不能相同,如果相同會在messages中收到VRRP錯誤包 

  2. 所以需要更改 virual_router_id

錯誤9fdisk partition table entries are not in disk order

  1. fdisk /dev/sdb  (用你的硬盤位置代替/dev/sdb) 

  2. 有提示後輸入 x 回車, 

  3. 在命令列表中會有一項 

  4. f   fix partition order 

  5. 輸入 f 回車 

  6. 成功會提示 done. 

  7. 然後輸入 p 回車,查看調整後的分區表 

  8. 最後輸入 w 回車,這個命令是將之前的操作寫入硬盤 

  9. 重啓之後就會啓用新的分區表。 

錯誤10ubuntu error:unknown filesystem

  1. 因爲我的電腦是Ubuntu的,開機用的是grub引導,而grub就放在Ubuntu裏的/boot/grub下。由於我修復分區順序

  2. 導致grub找不到原先的Ubuntu所在分區,自然就找不到/boot/grub了,因此解決這個問題很簡單,只要把grub和/boot/grub對應上就可以了。 

2 編輯 /boot/grub/grub.cfg

替換原來分區比如, 舊的是 hd0,msdos8替換成 hd0,mdos6

3 重裝grub

grub-install /dev/sda

錯誤11/lib/modules/2.6.32-71.el6.x86_64/build:No such file or directory. Stop.

  1. //如果出現如下錯誤 

  2. make: *** /lib/modules/2.6.32-71.el6.x86_64/build: No such file or directory. Stop. 

  3. //進去相關的目錄看,這個文件是個軟鏈接,顯示位紅色,說明鏈接未成功,用一下命令重新鏈接一次就OK了 

  4. ln -s ../../../usr/src/kernels/2.6.32-71.29.1.el6.x86_64/ build 

錯誤12  php

upload_max_filesize = 2M  //上傳附件大小限制在2M

  1. vim /etc/php.ini 

  2. upload_max_filesize = 16M

 

錯誤13 maps to localhost, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!

修改  /etc/ssh/ssh_config

vim  /etc/ssh/ssh_config

GSSAPIAuthentication no

 

錯誤14

nfs:server is not responding,still trying

方法1 :
我在arm上通過NFS共享文件時出現下面的錯誤提示
nfs:server is not responding,still trying

原因分析:NFS 的默認傳輸協議是 UDP,而PC機與嵌入式系統通過UPD交互時就會出現嚴重的網卡丟包現象。

解決方法:在客戶端改用TCP協議,使用下面的命令,
#mount -o tcp 10.10.19.25:/home/export /mnt/local

方法2:
在目標板上通過NFS複製PC機上較大文件到目標板上的時候遇到的問題:
nfs: server *** not responding, still trying

修改方法:
nfs mount時候出現的NFS崩潰,按照以下的方式mount
mount -t nfs -o intr,nolock,rsize=1024,wsize=1024 192.168.1.3/root/somedir /client

 

錯誤15

本文出自 “dongnan” 博客,轉載請與作者聯繫!

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章