salt-stack系列报错

Posted Luckyzd

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了salt-stack系列报错相关的知识,希望对你有一定的参考价值。

master启动报错

实验环境为:

[root@master salt]# cat /proc/version
Linux version 3.10.0-327.el7.x86_64 (mockbuild@x86-034.build.eng.bos.redhat.com) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Oct 29 17:29:29 EDT 2015
[root@master salt]# python -V
Python 2.7.5
[root@master salt]# getenforce
Disabled
[root@master salt]# ping salve.sishen.cn
PING salve.sishen.cn (101.78.223.131) 56(84) bytes of data.
^C
--- salve.sishen.cn ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1000ms

[root@master salt]# ping -c 1 master.sishen.cn
PING master.sishen.cn (192.168.75.135) 56(84) bytes of data.
64 bytes from master.sishen.cn (192.168.75.135): icmp_seq=1 ttl=64 time=0.018 ms

--- master.sishen.cn ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.018/0.018/0.018/0.000 ms

salt-master的配置为

image

image

image

然后启动报如下错误

[root@master salt]# systemctl start salt-master
Job for salt-master.service failed because the control process exited with error code. See "systemctl status salt-master.service" and "journalctl -xe" for details.
[root@master salt]# systemctl status salt-master
● salt-master.service - The Salt Master Server
    Loaded: loaded (/usr/lib/systemd/system/salt-master.service; disabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Wed 2017-12-06 05:54:38 CST; 24s ago
   Process: 10012 ExecStart=/usr/bin/salt-master (code=exited, status=4)
  Main PID: 10012 (code=exited, status=4)

Dec 06 05:54:38 master.sishen.cn systemd[1]: Starting T...
Dec 06 05:54:38 master.sishen.cn salt-master[10012]: [W...
Dec 06 05:54:38 master.sishen.cn salt-master[10012]: Th...
Dec 06 05:54:38 master.sishen.cn systemd[1]: salt-maste...
Dec 06 05:54:38 master.sishen.cn systemd[1]: Failed to ...
Dec 06 05:54:38 master.sishen.cn systemd[1]: Unit salt-...
Dec 06 05:54:38 master.sishen.cn systemd[1]: salt-maste...
Hint: Some lines were ellipsized, use -l to show in full.
[root@master salt]# kill -9 10012
-bash: kill: (10012) - No such process
[root@master salt]# systemctl start salt-master
Job for salt-master.service failed because the control process exited with error code. See "systemctl status salt-master.service" and "journalctl -xe" for details.
[root@master salt]# journalctl -xe
-- The result is failed.
Dec 06 05:54:38 master.sishen.cn systemd[1]: Unit salt-mas
Dec 06 05:54:38 master.sishen.cn systemd[1]: salt-master.s
Dec 06 05:54:38 master.sishen.cn polkitd[989]: Unregistere
Dec 06 05:55:42 master.sishen.cn polkitd[989]: Registered
Dec 06 05:55:42 master.sishen.cn systemd[1]: Starting The
-- Subject: Unit salt-master.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/
--
-- Unit salt-master.service has begun starting up.
Dec 06 05:55:42 master.sishen.cn salt-master[10024]: [WARN
Dec 06 05:55:42 master.sishen.cn salt-master[10024]: The p
Dec 06 05:55:42 master.sishen.cn systemd[1]: salt-master.s
Dec 06 05:55:42 master.sishen.cn systemd[1]: Failed to sta
-- Subject: Unit salt-master.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/
--
-- Unit salt-master.service has failed.
--
-- The result is failed.
Dec 06 05:55:42 master.sishen.cn systemd[1]: Unit salt-mas
Dec 06 05:55:42 master.sishen.cn systemd[1]: salt-master.s
Dec 06 05:55:42 master.sishen.cn polkitd[989]: Unregistere

测试报错:

[root@localhost ~]# salt \'*\' test.ping
[ERROR   ] Error parsing configuration file: /etc/salt/master - while parsing a block mapping
   in "<string>", line 16, column 1:
     interface: 192.168.75.130
     ^
expected <block end>, but found \'<block mapping start>\'
   in "<string>", line 411, column 4:
        base:
        ^
[ERROR   ] Error parsing configuration file: /etc/salt/master - while parsing a block mapping
   in "<string>", line 16, column 1:
     interface: 192.168.75.130
     ^
expected <block end>, but found \'<block mapping start>\'
   in "<string>", line 411, column 4:
        base:
        ^
No minions matched the target. No command was sent, no jid was assigned.
ERROR: No return received

以上是关于salt-stack系列报错的主要内容,如果未能解决你的问题,请参考以下文章

salt-stack更换主机名

salt-stack深入学习

记一次修改sga大小之后出现的一系列报错

ClickHouse 系列报错

salt-stack 安装nginx

salt-stack安装redis