在centos6.3上安装salt-minion。配置完minion后启动/etc/init.d/salt-minion start
报如下的错误
-
[root@cdn salt]# /etc/init.d/salt-minion start
-
Starting salt-minion daemon: [ OK ]
-
[root@cdn salt]# ps -ef|grep salt
-
root 20613 1 2 15:26 ? 00:00:00 /usr/bin/python /usr/bin/salt-minion -d
-
root 20638 20613 5 15:26 ? 00:00:00 /usr/bin/python /usr/bin/salt-minion -d
-
root 20640 20460 0 15:26 pts/1 00:00:00 grep salt
-
[root@cdn salt]# cd /var/log/salt/
-
[root@cdn salt]# ll
-
total 4
-
-rw------- 1 root root 1134 Apr 28 15:26 minion
-
[root@cdn salt]# tailf minion
-
self.minion = salt.minion.Minion(self.config)
-
File "/usr/lib/python2.6/site-packages/salt/minion.py", line 528, in __init__
-
self.authenticate(timeout, safe)
-
File "/usr/lib/python2.6/site-packages/salt/minion.py", line 1029, in authenticate
-
creds = auth.sign_in(timeout, safe)
-
File "/usr/lib/python2.6/site-packages/salt/crypt.py", line 351, in sign_in
-
self.opts['master_uri'],
-
File "/usr/lib/python2.6/site-packages/salt/payload.py", line 159, in __init__
-
self.context = zmq.Context()
-
NameError: global name 'zmq' is not defined
最后说没找到zmq。然后用python 查zmq的库文件是否在path里
-
[root@cdn /]# python
-
Python 2.6.6 (r266:84292, Jun 18 2012, 14:18:47)
-
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
-
Type "help", "copyright", "credits" or "license" for more information.
-
>>> import sys
-
>>> print sys.path
-
['', '/usr/lib64/python26.zip', '/usr/lib64/python2.6', '/usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old', '/usr/lib64/python2.6/lib-dynload', '/usr/lib64/python2.6/site-packages', '/usr/lib64/python2.6/site-packages/gtk-2.0', '/usr/lib/python2.6/site-packages']
-
>>>
-
-
-
[root@cdn /]# find . -name *zmq*
-
./var/lib/yum/yumdb/p/2d253855846b08d0bd26a0ef34a63e658553af26-python-zmq-2.2.0.1-1.el6-x86_64
-
./usr/share/doc/python-zmq-2.2.0.1
-
./usr/share/doc/python-zmq-2.2.0.1/examples/logger/zmqlogger.py
-
./usr/share/doc/python-zmq-2.2.0.1/examples/bench/pyzmq_client.py
-
./usr/share/doc/python-zmq-2.2.0.1/examples/bench/pyzmq_server.py
-
./usr/local/usr/local/include/zmq.h
-
./usr/local/usr/local/include/zmq_utils.h
-
./usr/local/usr/local/share/man/man7/zmq_ipc.7
-
./usr/local/usr/local/share/man/man7/zmq_curve.7
-
./usr/local/usr/local/share/man/man7/zmq_pgm.7
-
./usr/local/usr/local/share/man/man7/zmq_inproc.7
-
./usr/local/usr/local/share/man/man7/zmq_tcp.7
-
./usr/local/usr/local/share/man/man7/zmq_plain.7
-
./usr/local/usr/local/share/man/man7/zmq_epgm.7
-
./usr/local/usr/local/share/man/man7/zmq_null.7
-
./usr/local/usr/local/share/man/man7/zmq.7
-
./usr/local/usr/local/share/man/man3/zmq_unbind.3
-
./usr/local/usr/local/share/man/man3/zmq_disconnect.3
-
./usr/local/usr/local/share/man/man3/zmq_msg_recv.3
-
./usr/local/usr/local/share/man/man3/zmq_msg_init_size.3
-
./usr/local/usr/local/share/man/man3/zmq_ctx_destroy.3
-
./usr/local/usr/local/share/man/man3/zmq_msg_copy.3
-
./usr/local/usr/local/share/man/man3/zmq_bind.3
-
./usr/local/usr/local/share/man/man3/zmq_msg_move.3
-
./usr/local/usr/local/share/man/man3/zmq_term.3
-
./usr/local/usr/local/share/man/man3/zmq_ctx_set.3
-
./usr/local/usr/local/share/man/man3/zmq_connect.3
-
./usr/local/usr/local/share/man/man3/zmq_z85_decode.3
-
./usr/local/usr/local/share/man/man3/zmq_send_const.3
-
./usr/local/usr/local/share/man/man3/zmq_socket.3
-
./usr/local/usr/local/share/man/man3/zmq_errno.3
-
./usr/local/usr/local/share/man/man3/zmq_socket_monitor.3
-
./usr/local/usr/local/share/man/man3/zmq_getsockopt.3
-
./usr/local/usr/local/share/man/man3/zmq_msg_more.3
-
./usr/local/usr/local/share/man/man3/zmq_msg_init.3
-
./usr/local/usr/local/share/man/man3/zmq_send.3
-
./usr/local/usr/local/share/man/man3/zmq_msg_set.3
-
./usr/local/usr/local/share/man/man3/zmq_msg_data.3
-
./usr/local/usr/local/share/man/man3/zmq_msg_send.3
-
./usr/local/usr/local/share/man/man3/zmq_setsockopt.3
-
./usr/local/usr/local/share/man/man3/zmq_curve_keypair.3
-
./usr/local/usr/local/share/man/man3/zmq_ctx_new.3
-
./usr/local/usr/local/share/man/man3/zmq_sendmsg.3
-
./usr/local/usr/local/share/man/man3/zmq_msg_get.3
-
./usr/local/usr/local/share/man/man3/zmq_ctx_term.3
-
./usr/local/usr/local/share/man/man3/zmq_msg_init_data.3
-
./usr/local/usr/local/share/man/man3/zmq_init.3
-
./usr/local/usr/local/share/man/man3/zmq_ctx_get.3
-
./usr/local/usr/local/share/man/man3/zmq_z85_encode.3
-
./usr/local/usr/local/share/man/man3/zmq_close.3
-
./usr/local/usr/local/share/man/man3/zmq_version.3
-
./usr/local/usr/local/share/man/man3/zmq_msg_close.3
-
./usr/local/usr/local/share/man/man3/zmq_strerror.3
-
./usr/local/usr/local/share/man/man3/zmq_poll.3
-
./usr/local/usr/local/share/man/man3/zmq_msg_size.3
-
./usr/local/usr/local/share/man/man3/zmq_recvmsg.3
-
./usr/local/usr/local/share/man/man3/zmq_recv.3
-
./usr/local/usr/local/share/man/man3/zmq_proxy.3
-
./usr/local/usr/local/lib/libzmq.so.3.1.0
-
./usr/local/usr/local/lib/pkgconfig/libzmq.pc
-
./usr/local/usr/local/lib/libzmq.so.3
-
./usr/local/usr/local/lib/libzmq.la
-
./usr/local/usr/local/lib/libzmq.a
-
./usr/local/usr/local/lib/libzmq.so
-
./usr/lib64/python2.6/site-packages/zmq
-
./usr/lib64/python2.6/site-packages/zmq/web/zmqweb.pyo
-
./usr/lib64/python2.6/site-packages/zmq/web/zmqweb.pyc
-
./usr/lib64/python2.6/site-packages/zmq/web/zmqweb.py
-
./usr/lib64/python2.6/site-packages/zmq/core/libzmq.pxd
-
./usr/lib64/python2.6/site-packages/zmq/eventloop/zmqstream.pyc
-
./usr/lib64/python2.6/site-packages/zmq/eventloop/zmqstream.pyo
-
./usr/lib64/python2.6/site-packages/zmq/eventloop/zmqstream.py
-
./usr/lib64/python2.6/site-packages/zmq/utils/zmq_compat.h
-
./usr/lib64/python2.6/site-packages/pyzmq-2.2.0.1-py2.6.egg-info
-
[root@cdn /]# python
从上面的输出看到zmq是在/usr/local/usr/local/lib/下。
那么我们需要在/usr/lib64下做个softlink 就可以,试下
-
lrwxrwxrwx 1 root root 36 Apr 28 15:31 libzmq.so.3 -> /usr/local/usr/local/lib/libzmq.so.3
-
lrwxrwxrwx. 1 root root 25 Mar 11 13:29 libz.so -> ../../lib64/libz.so.1.2.3
-
-rw-r--r--. 1 root root 1437 Jun 22 2012 logging.properties
-
drwxr-xr-x. 3 root root 4096 Mar 11 13:29 lua
-
-rw-r--r--. 1 root root 616 Jun 22 2012 Mcrt1.o
-
drwxr-xr-x. 2 root root 4096 Mar 11 13:29 mysql
-
drwxr-xr-x. 3 root root 4096 Mar 11 13:30 notification-daemon-1.0
-
drwxr-xr-x. 4 root root 4096 Mar 11 13:30 nss
-
drwxr-xr-x. 3 root root 4096 Mar 11 13:29 openssl
-
drwxr-xr-x. 2 root root 4096 Mar 11 13:29 orbit-2.0
-
drwxr-xr-x. 3 root root 4096 Mar 11 13:30 pango
-
drwxr-xr-x. 42 root root 4096 Mar 11 13:31 perl5
-
drwxr-xr-x. 2 root root 4096 Mar 11 13:31 pkgconfig
-
drwxr-xr-x. 3 root root 4096 Mar 11 13:30 plymouth
-
dr-xr-xr-x. 6 root root 4096 Mar 11 13:30 pm-utils
-
drwxr-xr-x. 3 root root 4096 Mar 11 13:30 polkit-1
-
drwxr-xr-x. 2 root root 4096 Nov 12 2010 ppl
-
drwxr-xr-x. 3 root root 4096 Mar 11 13:29 pppd
-
-rwxr-xr-x. 1 root root 40152 Nov 11 2010 preloadable_libintl.so
-
drwxr-xr-x. 3 root root 4096 Mar 11 13:30 pygtk
-
drwxr-xr-x. 23 root root 20480 Mar 11 13:30 python2.6
-
drwxr-xr-x. 4 root root 4096 Mar 11 13:29 ruby
-
drwxr-xr-x. 2 root root 4096 Mar 11 14:41 sa
-
drwxr-xr-x. 2 root root 4096 Mar 11 13:31 sasl2
-
-rw-r--r--. 1 root root 1696 Jun 22 2012 Scrt1.o
-
drwxr-xr-x. 2 root root 4096 Mar 11 13:30 security
-
dr-xr-xr-x. 2 root root 4096 Sep 23 2011 sse2
-
drwxr-xr-x. 2 root root 4096 Mar 11 13:30 systemtap
-
drwxr-xr-x. 2 root root 4096 Mar 11 13:29 tc
-
dr-xr-xr-x. 2 root root 4096 Sep 23 2011 tls
-
drwxr-xr-x. 3 root root 4096 Mar 11 13:31 wireshark
-
dr-xr-xr-x. 2 root root 4096 Sep 23 2011 X11
-
-rw-r--r--. 1 root root 200 Feb 22 2012 xml2Conf.sh
-
-rw-r--r--. 1 root root 180 Nov 12 2010 xsltConf.sh
-
[root@cdn lib64]# python
-
Python 2.6.6 (r266:84292, Jun 18 2012, 14:18:47)
-
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
-
Type "help", "copyright", "credits" or "license" for more information.
-
>>> import zmq
-
>>> quit
-
Use quit() or Ctrl-D (i.e. EOF) to exit
-
>>> quit()
-
[root@cdn lib64]
测试ok那么我们可以启动minion了。
阅读(8945) | 评论(0) | 转发(0) |