赞
踩
journalctl -xe
,另一种是查看messages
的方式,两种方式不是绝对的某一种好使,下面我会分别作出说明。[root@control ~]# systemctl start httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
systemctl status httpd.service
或journalctl -xe
查看详细systemctl status httpd.service
:既然服务起不来,那么看的这个状态肯定是failed的。journalctl -xe
:这是直接查看日志,这里面可能会有关键字invalid value
这个开头的关键字,如果有的话,一般后面就是报错内容了journalctl -xe | grep "invalid value"
过滤哦。cat /var/log/messages |grep "invalid value"
cd /var/log
tail -f messages
systemctl restart httpd
,然后回到日志窗口看最新日志/etc/httpd/conf/httpd.conf
中265行错误,所以,现在打开文件,定位到265行systemctl start httpd
, 成功[root@vms160 ~]# systemctl restart etcd
Job for etcd.service failed because the control process exited with error code. See "systemctl status etcd.service" and "journalctl -xe" for details.
[root@vms160 ~]#
systemctl status httpd.service
或journalctl -xe
查看详细[root@vms160 ~]# systemctl restart etcd
Job for etcd.service failed because the control process exited with error code. See "systemctl status etcd.service" and "journalctl -xe" for details.
[root@vms160 ~]#
systemctl status httpd.service
:既然服务起不来,那么看的这个状态肯定是failed的。journalctl -xe
:这是直接查看日志,这里面可能会有关键字invalid value
这个开头的关键字,如果有的话,一般后面就是报错内容了journalctl -xe | grep "invalid value"
过滤哦。[root@vms160 ~]# journalctl -xe | grep "invalid value" 7月 13 16:44:03 etcd1 bash[2559]: invalid value "http://localhost:2379,,192.168.59.160:2379" for flag -listen-client-urls: URL scheme must be http, https, unix, or unixs: 7月 13 16:44:04 etcd1 bash[2570]: invalid value "http://localhost:2379,,192.168.59.160:2379" for flag -listen-client-urls: URL scheme must be http, https, unix, or unixs: 7月 13 16:44:04 etcd1 bash[2580]: invalid value "http://localhost:2379,,192.168.59.160:2379" for flag -listen-client-urls: URL scheme must be http, https, unix, or unixs: 7月 13 16:44:44 etcd1 bash[2604]: invalid value "http://localhost:2379,,192.168.59.160:2379" for flag -listen-client-urls: URL scheme must be http, https, unix, or unixs: 7月 13 16:44:44 etcd1 bash[2615]: invalid value "http://localhost:2379,,192.168.59.160:2379" for flag -listen-client-urls: URL scheme must be http, https, unix, or unixs: 7月 13 16:44:45 etcd1 bash[2625]: invalid value "http://localhost:2379,,192.168.59.160:2379" for flag -listen-client-urls: URL scheme must be http, https, unix, or unixs: 7月 13 16:44:45 etcd1 bash[2635]: invalid value "http://localhost:2379,,192.168.59.160:2379" for flag -listen-client-urls: URL scheme must be http, https, unix, or unixs: 7月 13 16:44:45 etcd1 bash[2646]: invalid value "http://localhost:2379,,192.168.59.160:2379" for flag -listen-client-urls: URL scheme must be http, https, unix, or unixs: 7月 13 16:45:35 vms160 bash[2707]: invalid value "http://localhost:2379,,192.168.59.160:2379" for flag -listen-client-urls: URL scheme must be http, https, unix, or unixs: 7月 13 16:45:35 vms160 bash[2722]: invalid value "http://localhost:2379,,192.168.59.160:2379" for flag -listen-client-urls: URL scheme must be http, https, unix, or unixs: 7月 13 16:45:36 vms160 bash[2733]: invalid value "http://localhost:2379,,192.168.59.160:2379" for flag -listen-client-urls: URL scheme must be http, https, unix, or unixs: 7月 13 16:45:36 vms160 bash[2744]: invalid value "http://localhost:2379,,192.168.59.160:2379" for flag -listen-client-urls: URL scheme must be http, https, unix, or unixs: 7月 13 16:45:36 vms160 bash[2755]: invalid value "http://localhost:2379,,192.168.59.160:2379" for flag -listen-client-urls: URL scheme must be http, https, unix, or unixs: 7月 13 16:47:21 vms160 bash[2789]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:47:21 vms160 bash[2800]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:47:21 vms160 bash[2811]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:47:22 vms160 bash[2821]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:47:22 vms160 bash[2832]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:48:00 vms160 bash[2862]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:48:00 vms160 bash[2873]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:48:00 vms160 bash[2884]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:48:00 vms160 bash[2895]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:48:01 vms160 bash[2905]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:55:11 vms160 bash[2947]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:55:11 vms160 bash[2957]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:55:12 vms160 bash[2968]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:55:12 vms160 bash[2978]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:55:12 vms160 bash[2989]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:58:07 vms160 bash[3012]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:58:07 vms160 bash[3023]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:58:07 vms160 bash[3034]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:58:07 vms160 bash[3045]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 16:58:08 vms160 bash[3055]: invalid value "http://localhost:2379,192.168.59.160:2379" for flag -listen-client-urls: parse 192.168.59.160:2379: first path segment in URL cannot contain colon 7月 13 17:25:46 vms160 bash[3244]: invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379 7月 13 17:25:47 vms160 bash[3254]: invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379 7月 13 17:25:47 vms160 bash[3265]: invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379 7月 13 17:25:47 vms160 bash[3275]: invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379 7月 13 17:25:48 vms160 bash[3286]: invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379 7月 13 17:37:00 vms160 bash[3310]: invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379 7月 13 17:37:00 vms160 bash[3320]: invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379 7月 13 17:37:00 vms160 bash[3330]: invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379 7月 13 17:37:01 vms160 bash[3341]: invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379 7月 13 17:37:01 vms160 bash[3352]: invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379 [root@vms160 ~]#
invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379
是这行代码出错了cat /var/log/messages |grep "invalid value"
[root@vms160 log]# systemctl restart etcd
Job for etcd.service failed because the control process exited with error code. See "systemctl status etcd.service" and "journalctl -xe" for details.
[root@vms160 log]#
[root@vms160 log]# pwd
/var/log
[root@vms160 log]# cat /var/log/messages |grep "invalid value"
Jul 13 17:42:45 vms160 bash: invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379
Jul 13 17:42:45 vms160 bash: invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379
Jul 13 17:42:46 vms160 bash: invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379
Jul 13 17:42:46 vms160 bash: invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379
Jul 13 17:42:46 vms160 bash: invalid value "http://localhost:2379,http:/192.168.59.160:2379" for flag -listen-client-urls: URL address does not have the form "host:port": http:/192.168.59.160:2379
[root@vms160 log]#
/
所以报错了【故意删的这个/,为了展示错误】/
加上以后,再次重启服务,正常了【如果继续有报错,继续用上方法查看即可了】Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。