2、Nginx: [emerg] getpwnam("www") Failed 出现情况:刚装完Nginx后,运行测试文件的时候。 错误意思:获得 www 用户失败。 解决办法:在Nginx.conf中 把"#user nobody;"的前面#注释去掉,改为"user www www;"
3、Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid" Failed (2: No such file or directory) 出现情况:刚安装完Nginx后重启时报的错。 错误意思:在 /usr/local/Nginx/logs 目录下没有Nginx.pid 解决办法: 运行这句话,问题解决 "/usr/local/Nginx/sbin/Nginx -c /usr/local/Nginx/conf/Nginx.conf" 这句话的意思的为Nginx指定配置文件路径。 /usr/local/Nginx/sbin/Nginx -t 测试Nginx的配置文件是否正确
4、Nginx: [warn] conflicting server name "" on 0.0.0.0:80, ignored 出现情况: 配置完Nginx的 配置文件后,reload时出现的这个错误。 错误意思:Nginx的 配置文件中有域名冲突了 解决办法:查看配置文件是否有冲突的域名,如果有的话删除再reload就可以了。 linux上用LINUX下用grep "blogguy.cn"搜索一下,一般是由于修改的是没有注意造成的。 搜索到有相同的重复,去掉重复的域名配置就可以了。
5、Nginx: [alert] kill(34719, 1) Failed (3: No such process) 出现情况:重启linux系统后,运行 "/usr/local/Nginx/sbin/Nginx -s reload" 报这个错误 错误意思:Nginx启动的时候杀死进程34719失败,原因是没有这个进程。 解决办法: [root @mylinux ~]# /usr/local/Nginx/sbin/Nginx -c /usr/local/Nginx/conf/Nginx.conf [root @mylinu x ~]# /usr/local/Nginx/sbin/Nginx -s reload 指定一下Nginx 的配置文件 然后重启就好了。
6、[root@mylinux logs]# /usr/local/PHP/sbin/PHP-fpm -t [23-Jun-2013 21:00:29] ERROR: Failed to open configuration file '/usr/local/PHP/etc/PHP-fpm.conf': No such file or directory (2) [23-Jun-2013 21:00:29] ERROR: Failed to load configuration file '/usr/local/PHP/etc/PHP-fpm.conf' [23-Jun-2013 21:00:29] ERROR: FPM initialization Failed 出现情况:运行 " /usr/local/PHP/sbin/PHP-fpm -t " 测试 PHP-fpm 的配置文件时出现。 错误意思:找不到 PHP-fpm.conf 文件(PHP-fpm配置文件) 解决办法: [root@mylinux init.d]# cd /usr/local/PHP/etc [root@mylinux etc]# cp PHP-fpm.conf.default PHP-fpm.conf [root@mylinux etc]# /usr/local/PHP/sbin/PHP-fpm -t [23-Jun-2013 21:04:00] NOTICE: configuration file /usr/local/PHP/etc/PHP-fpm.conf test is successful
7、[root@mylinux init.d]# /etc/init.d/PHP-fpm start 或者 service PHP-fpm start Starting PHP-fpm [23-Jun-2013 21:16:01] ERROR: Failed to open configuration file '/usr/local/PHP/etc/PHP-fpm.conf': No such file or directory (2) [23-Jun-2013 21:16:01] ERROR: Failed to load configuration file '/usr/local/PHP/etc/PHP-fpm.conf' [23-Jun-2013 21:16:01] ERROR: FPM initialization Failed Failed 出现情况:启动PHP-fpm的时候遇到,该问题和问题6、实际是同一个问题。 错误意思: 找不到 PHP-fpm.conf 文件(PHP-fpm配置文件) 解决办法: [root@mylinux init.d]# cd /usr/local/PHP/etc [root@mylinux etc]# cp PHP-fpm.conf.default PHP-fpm.conf [root@mylinux etc]# service PHP-fpm start Starting PHP-fpm done
8、Starting MysqL.. ERROR! The server quit without updating PID file (/usr/local/MysqL/data/mylinux.pid). 出现情况:运行" service MysqLd start"或者" /etc/init.d/MysqLd start" 启动MysqLd守护进程的时 错误意思:重启MysqL失败,原因是找不到 解决办法: 从报错上看,看不出具体问题,只能看日志了 [root@mylinux /]# cd /usr/local/MysqL/data [root@mylinux data]# tail -f -n 20 mylinux.err
130623 16:34:53 MysqLd_safe Starting MysqLd daemon with databases from /usr/local/MysqL/data 130623 16:34:53 [Note] Plugin 'FEDERATED' is disabled. 130623 16:34:53 InnoDB: The InnoDB memory heap is disabled 130623 16:34:53 InnoDB: Mutexes and rw_locks use GCC atomic builtins 130623 16:34:53 InnoDB: Compressed tables use zlib 1.2.3 130623 16:34:53 InnoDB: Initializing buffer pool, size = 128.0M 130623 16:34:53 InnoDB: Completed initialization of buffer pool InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another MysqLd process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another MysqLd process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another MysqLd process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another MysqLd process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another MysqLd process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another MysqLd process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another MysqLd process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another MysqLd process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another MysqLd process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another MysqLd process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another MysqLd process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another MysqLd process InnoDB: using the same InnoDB data or log files. 130623 16:36:33 InnoDB: Unable to open the first data file InnoDB: Error in opening ./ibdata1 130623 16:36:33 InnoDB: Operating system error number 11 in a file operation. InnoDB: Error number 11 means 'Resource temporarily unavailable'. InnoDB: Some operating system error numbers are described at InnoDB: http://dev.MysqL.com/doc/refman/5.5/en/operating-system-error-codes.html 130623 16:36:33 InnoDB: Could not open or create data files. 130623 16:36:33 InnoDB: If you tried to add new data files, and it Failed here, 130623 16:36:33 InnoDB: you should Now edit innodb_data_file_path in my.cnf back 130623 16:36:33 InnoDB: to what it was, and remove the new ibdata files InnoDB created 130623 16:36:33 InnoDB: in this Failed attempt. InnoDB only wrote those files full of 130623 16:36:33 InnoDB: zeros, but did not yet use them in any way. But be careful: do not 130623 16:36:33 InnoDB: remove old data files which contain your precIoUs data! 130623 16:36:33 [ERROR] Plugin 'InnoDB' init function returned error. 130623 16:36:33 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE Failed. 130623 16:36:33 [ERROR] UnkNown/unsupported storage engine: InnoDB 130623 16:36:33 [ERROR] Aborting 130623 16:36:33 [Note] /usr/local/MysqL/bin/MysqLd: Shutdown complete 130623 16:36:33 MysqLd_safe MysqLd from pid file /usr/local/MysqL/data/mylinux.pid ended
出现情况: 查看以上日志很明显是一句 InnoDB: Check that you do not already have another MysqLd process 说明已经有MysqLd进程在运行了,所以启动MysqL失败。 解决办法: [root@mylinux etc]# ps -ef|grep MysqLd [root@mylinux etc]# kill -9 进程号 [root@mylinux etc]# service MysqLd start 这是启动一次 MysqL 报的具体的错误。 我重启了一下CentOS服务器,再重启一下MysqLd,问题自己解决了,可能是由于LVM磁盘管理软件的原因。
google了下 ,出现这个问题可能的原因有多种,具体什么原因最好的办法是先查看下错误日志:
1.可能是/usr/local/MysqL/data/rekfan.pid文件没有写的权限
解决方法 :给予权限,执行 “chown -R MysqL:MysqL /var/data” “chmod -R 755 /usr/local/MysqL/data” 然后重新启动MysqLd!
2.可能进程里已经存在MysqL进程
解决方法:用命令“ps -ef|grep MysqLd”查看是否有MysqLd进程,如果有使用“kill -9 进程号”杀死,然后重新启动MysqLd!
3.可能是第二次在机器上安装MysqL,有残余数据影响了服务的启动。
解决方法:去MysqL的数据目录/data看看,如果存在MysqL-bin.index,就赶快把它删除掉吧,它就是罪魁祸首了。本人就是使用第三条方法解决的 !http://blog.rekfan.com/?p=186
4.MysqL在启动时没有指定配置文件时会使用/etc/my.cnf配置文件,请打开这个文件查看在[MysqLd]节下有没有指定数据目录(datadir)。
解决方法:请在[MysqLd]下设置这一行:datadir = /usr/local/MysqL/data
5.skip-federated字段问题
解决方法:检查一下/etc/my.cnf文件中有没有没被注释掉的skip-federated字段,如果有就立即注释掉吧。
6.错误日志目录不存在
解决方法:使用“chown” “chmod”命令赋予MysqL所有者及权限
7.selinux惹的祸,如果是centos系统,默认会开启selinux
解决方法:关闭它,打开/etc/selinux/config,把SELINUX=enforcing改为SELINUX=disabled后存盘退出重启机器试试。
8.MysqL的data目录挂载的磁盘空间已经用完
解决方法:df -h 查看磁盘使用情况,果然磁盘满了,因为当时分区采用系统默认,不知道为什么不能自动扩容然后清理多余数据,以后在研究吧。启动MysqL,成功启动!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。