1. 程式人生 > >RedHat4找不到網絡卡和mysql啟動不了解決方案

RedHat4找不到網絡卡和mysql啟動不了解決方案

本文記錄了一次RedHat AS release4上出現找不到網絡卡和mysql啟動不了解決方案並解決問題的過程

0.機器環境:

[[email protected] ~]# lsb_release -a
LSB Version:    :core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: RedHatEnterpriseAS
Description:    Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
Release:        4
Codename:       NahantUpdate4

[[email protected] ~]# mysql --version
mysql  Ver 14.14 Distrib 5.1.55, for pc-linux-gnu (i686) using  EditLine wrapper

問題描述:

1.開機不能聯網,找不到網絡卡eth0和eth1,只能找到lo網絡卡

service network start:

Bringing up interface eth0: e1000 device eth0 does not seem to be present, delaying initialization.


解決方案:

 在communities.vmware.com看到一個老外說,他在遇到這個問題時說:“What I found was that my modules.dep and modules.alias were empty,which live in /lib/modules/`uname-r`/”。這讓我想起了,下午我在編一個模組時,執行過depmod,這是會改變modules.dep和modules.alias。到/lib/modules/`uname-r`/一看,果然,裡面只有與我的模組有關的依賴資訊。看來,這是由於我以錯誤的方式執行了depmod命令造成的。可能是由於在向安裝好的php中新增新模組的時候編譯了openssl和curl,而這個過程有可能改變了modules.dep

 看來是系統模組的依賴關係資訊丟失了,啟動時網絡卡驅動等模組無法載入。所以,如果想用modprobe向系統加自己的模組時,應將your_module.ko拷入/lib/modules/`uname -r`/,然後depmod -a 。最後,modprobyour_module。

在/lib/modules/核心版本號/ 執行depmod 重新生成modules.dep和modules.alias


2.Mysql啟動不了

2.1Starting MySQL.Manager of pid-file quit without updating file.[FAILED]mysql

檢視錯誤日誌
預設的mysql錯誤日誌是在/usr/local/mysql/data 下面 more ****.err 有下面的資訊
090302 02:27:26 mysqld_safe mysqld from pid file /opt/mysql/web2.pid ended
090302 02:30:03 mysqld_safe Starting mysqld daemon with databases from /opt/mysql
090302 2:30:03 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option'--skip-federated'
090302 2:30:03 [ERROR] Aborting
解決方法:
只要將/etc/my.cnf裡面的 skip federated註釋掉即可。


2.2

mysql不能啟動 Manager of pid-file quit without updating file


啟動mysql失敗,提示Manager of pid-file quit without updating file.錯誤。從網上直接搜尋錯誤資訊,感覺出錯原因及解決方案都不適用於本機的情況。

本著出錯要查出其原因的原則,查看了mysql的出錯日誌(出錯日誌所在路徑,請根據您自己機子的實際情況查詢),發現錯誤資訊:File ‘./mysql-bin.index’ not found (Errcode: 13),檢視資料庫檔案,mysql-bin.index確實存在。

檢視資料庫檔案的許可權,發現全都變成了 drwx—— 2 1001 1001。突然想起之前重建過mysql使用者,造成資料庫檔案的許可權使用者資訊丟失。重新授權即可。

網上有不少這個原因的解釋,但是都不是我想說的。我要說的原因其實很白痴:data/mysql-bin.index沒有刪除,data/mysql-bin.index是存放日誌檔案索引的檔案,只刪除了日誌檔案而沒有對日誌的索引檔案做處理顯然是不行的。


2.3 errcode 122 waiting for someone to free sapce

Running Centos 6.5

We have been getting these errors for a few days when mysql tries to write to the datafiles in /var/lib/mysql tree. The file names vary. There is 120Gb free in the root partion. Every thing is in root.

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_myserver-lv_root 150245636 14936520 127681188 11% /
tmpfs 4030892 0 4030892 0% /dev/shm
/dev/sda1 495844 116407 353837 25% /boot

140506 16:11:28 [Warning] Disk is full writing './george_wpress/ella_commentmeta.TMD' (Errcode: 122). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space)

As a test I ( using dd command ) created a 5G testfile in the /var/directory without problem.

The total size of the mysql directory is around 500Mb

The fault was resovled by switching off the quota mechanism using the
quotaoff command


2.4 MySQL is running but PID file is not found


今天vps訪問速度很慢,我用/root/lnmp restart 命令給lnmp重啟了一下,重啟之後發覺mysql連結不上了。 ssh裡面執行 service mysql restrat 出現 MySQL is running but PID file could not be found 錯誤。

用mysql -u root -p 命令執行mysql時出現 Can't connect to MySQL through socket mysql.sock 錯誤。

後來網上找到一篇不錯的文章 mysql PID file not found and Can't connect to MySQL through socket mysql.sock雖然後來我是直接重啟vps(reboot)解決這個問題,不過上面文章裡的很多內容還是挺有用的。

記錄幾個以前不知道的知識:

1、grep 是查詢命令 可做檔案內的字串查詢,使用如: ps aux | grep mysql

2、ps 命令 顯示所有程序 跟windows系統的 tasklist 命令相似 aux 顯示所有包含其他使用者的行程 比如我執行 ps aux | grep mysql 命令後能夠找到

–datadir=/usr/local/mysql/var–pid-file=/usr/local/mysql/var/li220-124.pid

3、kill -9 [PID] 終止程序命令 通過ps 找到程序pid 然後用kill -9 [PID]終止程序(-9表示強迫程序立即停止)

4、hostname 命令顯示當前主機名 uname -a 命令顯示當前系統核心版本

5、service命令

通過 service mysql status 可以檢視 mysql的狀態。但是其他服務名稱如何查詢?

發現通過 ls /etc/init.d/ 目錄下面可以找到各個服務名稱。

6、top命令 檢視記憶體和cup使用情況

< shift+m 按記憶體使用排序>

<1 顯示cpu使用情況>

7、chown 更改屬主和屬主組

chown [OPTION]… [OWNER][:[GROUP]] FILE…

如:chown mysql:mysql redhat.pid 更改redhat.pid 的ownner為mysql 所屬組為mysql
2.5 MySQL: mysql is not running but lock exists

A MySQL crash on Red Hat system resulted with:

/etc/init.d/mysql status


coming back with:

mysql is not running but lock exists

Solved by removing the lock file:

rm /var/lock/subsys/mysql

If this happens again it may also be necessary to remove the pid file from /var/lib/mysql
2.6
MySQL: write failed, user block limit reached

this mean that you don't have enouph space to create this backup file. check your qouta and file size


2.7
 sda5: write failed, user block limit reached

1.

da5: write failed, user block limit reached ???

sda5 : write failed, user block limit reached ???

--------------------------------------------------------------------------------

I got write failed, user block limit reached in my server shell ....
I can not start apache and mysql because if I do that server load average goes up ti 100! in seconds..!!  

Already runed /scripts/fixquotas but the problem stills.

sda5 is 50% free space....

I use RH4.


Last edited by sh4ka; 01-31-2006 at 06:05 PM.


Reply With QuoteReply With Quote

2.

01-31-2006, 06:14 PM

nyjimbo nyjimbo is offline

Registered Member

nyjimbo's Avatar
Join DateJan 2003LocationNew YorkPosts1,123


Default

did you try to google or yahoo search:

write failed, user block limit reached

Sounds like you ran out of some kind of room either due to quotas or some other limits.

Is this a virtual server ?

"A dog has raised it’s hind leg on the age of nevermore !"
-- Rolf


Reply With QuoteReply With Quote

3.

01-31-2006, 06:22 PM

sh4ka sh4ka is offline

Registered Member

sh4ka's Avatar
Join DateMay 2005Posts435


Default

Yes is a virtual server...
I already searched google and know the problem is with the disk quota maybe it was bad configured at the setup.. I really don't know, that's why I am asking.

On sda5 I have the / partition... including home, and the system directories. /tmp /boot are the other partitions..

[email protected] [~]# quota
Disk quotas for user root (uid 0): none

[email protected] [~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 71G 35G 32G 53% /
/dev/sda1 99M 11M 83M 12% /boot
/dev/sda3 1012M 36M 925M 4% /tmp
none 506M 0 506M 0% /dev/shm
/dev/sdb1 74G 20G 50G 29% /backup/cpbackup

Also the fstab is well configured for this partition:

[email protected] [~]# cat /etc/fstab
/dev/sda5 / ext3 defaults,usrquota 1 1

Any ideas, pleaseeeee ?

thkz!


Reply With QuoteReply With Quote

4.

02-01-2006, 01:48 AM

madaboutlinux madaboutlinux is offline

Registered Member


Join DateJan 2005LocationEarthPosts1,052


Default

If its a VPS, the hosting company do set a Quota limit for each VPS on the main VPS server. There are Disk quotas set for each VPS to control the number of inodes a vps can use. You will have to ask your hosting company to change the quota limit for you. It seems you have reached your Hard limit. You will not be able to sort this issue at your end.

Hope this will sort out your issue.


Reply With QuoteReply With Quote

5.

02-01-2006, 05:32 AM

xerophyte xerophyte is offline

Registered Member


Join DateMar 2003LocationCanadaPosts217


Default

That error happens when you are over the quota, and you try to write to the disk.

In your case looks like one (many) of your hosted site over the quota, and when they try to write to the disk you get that error. Check site(s) which are over the quota.

hope that helps

相關資訊截圖:

1.mysql log

2.檢視 mysql程序

3.mysql失敗

4.mysql版本

5.RedHat版本

6.ulimit設定


相關推薦

RedHat4mysql啟動解決方案

本文記錄了一次RedHat AS release4上出現找不到網絡卡和mysql啟動不了解決方案並解決問題的過程 0.機器環境: [[email protected] ~]# lsb_rel

虛擬機器與配置檔案匹配 Device eth0 does not seem to bepresent

安裝虛擬機器並複製之後,面臨一個問題就是MAC的變更。 當Vmware第一次打開復制虛擬機器的時候,會詢問你虛擬機器來源  如果你選擇 I Copy It 那麼虛擬機器會自動幫你變更MAC地址。 或者你可以自己手工變更MAC地址 此時就會發現ifconfig與 /etc

安裝CentOS 6.8步驟、配置配置yum源

centos6.8 安裝CentOS 6.8 第一步 >>>>Install or upgrade an existing system #安裝或升級現有的系統 install system with basic vide

只發送接收資料的快捷處理

  右鍵本地連線的的屬性--狀態--顯示接收資料為0時,有資料傳送的情況初步可以斷定網絡卡故障,但是還是得檢查幾個東西,首先確定你的網路線路是正常的,用測線儀測試得保證1,2,3.6線是通的 1.開始--執行--輸入cmd--ping127.0.0.1,看是否能ping通,

配置無線有線分別上內外的方法

場景: 到機房去部署應用,需要內網才可以連線到伺服器,部署的同時可能經常需要查資料,也就需要連線外網,然而同時使用wifi和有線的時候,要麼都走wifi,要麼都走有線,導致內外網不能同時訪問,要一直切換,非常麻煩。 解決方案: 利用route配置路由,然後XXX.XXX.

mac蘋果電腦實現USB有線同時訪問內網際網路

工作時偶爾會遇到需要同時訪問公司內網和網際網路,特記錄一下。1:開啟Mac上的“終端” ,鍵入以下命令netstat -rn2: sudo route delete 0.0.0.0  (刪除預設路由)s

vc獲取mac地址(無線有線

獲取網絡卡的MAC地址的方法很多,如:Netbios,SNMP,GetAdaptersInfo等。經過測試發現 Netbios 方法在網線拔出的情況下獲取不到MAC,而 SNMP 方法有時會獲取多個重複的網絡卡的MAC,試來試去還是 GetAdaptersInfo 方法比較

Android之解決ubuntu沒有無線手機wifi實現adb wifi除錯

1、問題 ubuntu沒有無線網絡卡,但是在在wifi1是同一個網段,然後手機需要wifi adb除錯 2、解決辦法 1、連線上wifi1 2、手機下載“終端模擬器apk”安裝在手機上 3、手機連線電腦,然後adb tcpip 5555 4、然後adb push dro

CentOS7 中沒有eth0()檔案並且能上網

[[email protected] ~]# ifconfig ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.137.2 netmask 255.255.255.0

Linux下千兆萬兆ethtool對比

[[email protected] ~]# ethtool em3 Settings for em3:         Supported ports: [ TP ]         Su

C# 區分無線有線的MAC

C# 獲取MAC地址 方法一: 使用 ManagementClass string strMAC = ""; ManagementClass MC = new ManagementClass("Win32_NetworkAdapterConfiguration"); ManagementObjec

只要分發速度夠快,頓就趕上我!

ive size 大量 私有 qos ffffff .com img 性能 只要分發速度夠快,網絡卡頓就趕不上我!全面了解CDN服務,如何支持多樣加速場景,保障優質網絡體驗。 什麽是CDN?華為雲內容分發網絡(Huawei Cloud Content Delivery Ne

RHEL6 克隆eth0變成eth1的問題怎麼解決

修改/etc/udev/rules.d/70-persistent-net.rules  檔案     vi /etc/udev/rules.d/70-persistent-net.rules   開啟後會有兩行資訊如下: SUBSY

Centos6.5 eth0無法自動啟動解決方法

查詢ip地址,發現沒有網絡卡eth0 檢查ifcfg-eth0檔案,ONBOOT="yes",設定的是網絡卡自啟動的方式 懷疑是NetworkManager服務和network衝突 關閉NetworkManager服務及自啟動 重啟下network服務,再

Linux下設定開機自啟動

每次開機後都要用 ifup eth0 命令 啟動網絡卡,想著怎麼可以開機自動啟動網絡卡,於是就法百度了一下,方法如下: 方法一: 編輯網絡卡配置檔案 vi /etc/sysconfig/netw

ubuntu拔插網線或usb導致dns服務丟失的解決辦法

  丟失DNS簡單來說就是,上網頁上不去,或者ping www.baidu.com出現ping:unknow host http://www.baidu.com 。但是呢,如果你改成ping 114.114.114.114或者其他的IP地址的時候,是可以ping通的,這就是DNS服務丟失的現象。往上說有修改

LINUX 下無線 rtl8821CE/rtl8723de 驅動 無法驅動解決辦法

1. 確保linux核心版本大於 4.14 2. 下載linux中8821CE/rtl8723de的驅動原始碼 3.編譯驅動 解壓rtl8821ce.zip 修改檔案Makefile export TopDIR ?= $(sr

啟動RTNETLINK answers: File exists錯誤解決方法

一、問題描述 VMware中克隆虛擬機器是經常的事情,雖然如此,用到虛擬機器時,本人還是喜歡新安裝一個作業系統,針對伺服器的應用,在安裝作業系統時,一併安裝好,並且也花不了多少時間。但最近需要大量的配置一樣的虛擬機器進行測試,故安裝了一個模板虛擬機器,然後直接複製模板虛擬機

分流器--運營商解決方案--湖南戎騰分流器大數據解決方案

元組 -c 一個 架構 mar 搜索 定制 後端 體驗 網絡分流器系列之網絡分流器運營商解決方案聲明:此方案為湖南戎騰網絡公司獨有方案,僅供參考, 有需要的朋友可以聯系湖南戎騰公司銷售總監:18774055368  [微信同號]   湖南戎騰公司為專業的方案解決商,分流器供

20 編程 粘包現象與解決方案

truct json字符串 利用 tps 也有 網絡編程 長度 發送數據 .com 1、https://www.cnblogs.com/guobaoyuan/p/6809447.html 發送數據包前 對包的長度進行計算 1. 比較low的方法是 len( pac