Open light682 opened 9 years ago
多谢了,安装问题已经解决了,现在测试,执行脚本一直是pending状态,有相关的打印日志可以知道问题出在哪里吗
可以看下/tmp/ansible_debug.log,/tmp下 celery的log,执行脚本是pending状态,一般是由于celery进程问题导致的
您好,能帮我看看是哪个参数有问题么?,分割线后面是相关的配置 2015-08-19 15:41:40,054 CRIT Supervisor running as root (no user in config file) 2015-08-19 15:41:40,069 INFO RPC interface 'supervisor' initialized 2015-08-19 15:41:40,371 INFO RPC interface 'supervisor' initialized 2015-08-19 15:41:40,371 CRIT Server 'unix_http_server' running without any HTTP authentication checking 2015-08-19 15:41:40,372 INFO daemonizing the supervisord process 2015-08-19 15:41:40,373 INFO supervisord started with pid 2731 2015-08-19 15:41:41,376 INFO spawned: 'ansible_celeryd' with pid 2732 2015-08-19 15:41:41,384 INFO exited: ansible_celeryd (exit status 127; not expected) 2015-08-19 15:41:42,387 INFO spawned: 'ansible_celeryd' with pid 2733 2015-08-19 15:41:42,394 INFO exited: ansible_celeryd (exit status 127; not expected) 2015-08-19 15:41:44,399 INFO spawned: 'ansible_celeryd' with pid 2736 2015-08-19 15:41:44,408 INFO exited: ansible_celeryd (exit status 127; not expected) 2015-08-19 15:41:47,414 INFO spawned: 'ansible_celeryd' with pid 2737 2015-08-19 15:41:47,422 INFO exited: ansible_celeryd (exit status 127; not expected)
[program:ansible_celeryd] autorestart = true stopwaitsecs = 600
command = /root/envansible/bin/python /home/ansible/ansible_ui/manage.py celeryd -B -l info --autoscale=20,2 --concurrency=20 user = ansible autostart = true log_stdout = true log_stderr = true logfile_maxbytes = 50MB logfile_backups = 10
你把command单独拿出来执行,从前台能获得更多的报错信息
是这样的么? /root/envansible/bin/python /home/ansible/ansible_ui/manage.py celeryd -B -l info --autoscale=20,2 --concurrency=20 Running a worker with superuser privileges when the worker accepts messages serialized with pickle is a very bad idea!
If you really want to continue then you have to set the C_FORCE_ROOT environment variable (but please think about this before you do).
User information: uid=0 euid=0 gid=0 egid=0
恩,你可以先设置C_FORCE_ROOT
还是报错麻烦问一下,ansible_celeryd是哪个进程?,我这边启动supervisord的时候,直接就fatal掉了 (envansible)[root@10.6.0.50 tmp]# supervisorctl Server requires authentication Username:admin Password:
root 2500 2493 1 15:35 pts/1 00:00:46 /root/envansible/bin/python manage.py runserver 10.6.0.50:8000 root 3766 1 0 16:14 ? 00:00:00 /root/envansible/bin/python /root/envansible/bin/supervisord -c celery-conf/supervisord.conf
日志中envansible_dir,这个配置是从哪个配置文件里面读的呢? INFO /envansible_dir/bin/ansible-playbook -i /home/ansible/ansible_ui/projects/test/inventories/hosts /home/ansible/ansible_ui/projects/test/.tmp/5cb866c4-464c-11e5-a902-000c2942e9e7.yml --private-key /home/ansible/ansible_ui/cretential/root/id_dsa
vim settings_local.py 修改 LDAP Datebase Mail 和ansible_playbook命令位置(which ansible_playbook)配置 ansible_playbook 默认配置的路径 /envansible_dir/bin/ansible-playbook,需要修改
测试文件传输,仍然是peding状态,单独执行脚本命令, 发现提示ssh 失败,但是之前的部署密钥,都是成功的,而且server目前ssh目标主机也不需要输入密码了,麻烦您能再帮我看看这个问题么,太感谢了 /root/envansible/bin/ansible-playbook -i /home/ansible/ansible_ui/projects/test/inventories/hosts /home/ansible/ansible_ui/projects/test/.tmp/6edf44f8-4651-11e5-97b4-000c2942e9e7.yml --private-key /home/ansible/ansible_ui/cretential/root/id_dsa
PLAY [10.6.0.51] ******
GATHERING FACTS *** fatal: [10.6.0.51] => private_key_file (/home/ansible/ansible_ui/cretential/root/id_dsa) is group-readable or world-readable and thus insecure - you will probably get an SSH failure
TASK: [execute script] **** FATAL: no hosts matched or all hosts have already failed -- aborting
PLAY RECAP **** to retry, use: --limit @/root/6edf44f8-4651-11e5-97b4-000c2942e9e7.retry
10.6.0.51 : ok=0 changed=0 unreachable=1 failed=0
private_key_file (/home/ansible/ansible_ui/cretential/root/id_dsa) is group-readable or world-readable and thus insecure - you will probably get an SSH failure 你把id_dsa改成 400试试
您好,昨天多谢您的帮助了,我把系统的公钥文件,直接替换到环境目录后,就可以了,但是不知道为什么,两个密钥是完全一样的,权限也没问题。 今天发现界面执行命令还是不成功,一直是pending状态,但是直接执行日志的脚本,都成功了,还请帮忙分析下原因可能出在哪?多谢! 下面是ansible_debug.log,脚本单独执行的结果,web页面一直是pending,前台一直刷日志如下: [20/Aug/2015 11:27:10] "GET /ansible/test/result_json/30 HTTP/1.1" 200 87
(envansible)[root@10.6.0.50 tmp]# /root/envansible/bin/ansible-playbook -i /home/ansible/ansible_ui/projects/test/inventories/hosts /home/ansible/ansible_ui/projects/test/.tmp/c7fdae32-46ea-11e5-9127-000c2942e9e7.yml --private-key /home/ansible/ansible_ui/cretential/root/id_dsa
PLAY [10.6.0.51] ******
GATHERING FACTS *** ok: [10.6.0.51]
TASK: [ping hosts] **** ok: [10.6.0.51]
PLAY RECAP **** 10.6.0.51 : ok=2 changed=0 unreachable=0 failed=0
您好,感觉还是celery队列有问题,前后对比了安装文档,该修改的地方应该都该掉了,麻烦大神帮忙分析下,这个还可能是什么原因
python manage.py celeryd Running a worker with superuser privileges when the worker accepts messages serialized with pickle is a very bad idea!
If you really want to continue then you have to set the C_FORCE_ROOT environment variable (but please think about this before you do).
User information: uid=0 euid=0 gid=0 egid=0
谢谢大哥了,已经解决,是用户权限的问题
貌似没有使用消息队列系统吧 类似rabbitmq这种和 celery结合做异步、??
请教一个问题,我按requirement安装相关python包后,执行命令:python manage.py schemamigration desktop.apps.account --init
(ansible_ui)[root@python2 ansible_ui]# python manage.py schemamigration desktop.apps.account --init
Traceback (most recent call last):
File "manage.py", line 11, in
实在不知道哪里出错!高手能指点下吗?!感谢
老大,现在还能用么ansible2.1还没试,有群不学习,感谢
什么qq群?谢谢发下!
。。。就是想问下,咱们有没有Q群,可以关注下~~
@light682 遇到和你一的问题,请问是哪里权限的问题?
总是提示这个错误怎么回事fatal: [192.168.163.140]: FAILED! => {"failed": true, "reason": "ERROR! no action detected in task\n\nThe error appears to have been in '/home/ansible/ansible_ui-master/projects/test/playbooks/test.yml': line 1, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- hosts: test\n ^ here\n"}
执行python manage.py syncdb,这一步报错:django.db.utils.OperationalError: (1045, "Access denied for user 'ansibleuser'@'localhost' (using password: YES)")
之前mysql配置有2个 create database ansible CHARACTER SET utf8; grant all on ansible.* to ansibleuser@'localhost' identified by '**';
本人是个菜鸟,不太懂,请大家帮忙,多谢