Git Product home page Git Product logo

Comments (8)

zzjackaa avatar zzjackaa commented on August 24, 2024

就好像没有hosts文件一样

from ops.

zzjackaa avatar zzjackaa commented on August 24, 2024

ansible-playbook -i hosts.ini /data/Ops-master/media/playbook/2020/7/2/abd.yml 这是我在您这个项目节点启动的playbook
测试是正常的 。求大佬解答谢谢

from ops.

pythonzm avatar pythonzm commented on August 24, 2024

不需要hosts文件,主机组就是你的目标主机,需要提前在主机组中添加好,ansible主节点是这个系统所在的节点

from ops.

zzjackaa avatar zzjackaa commented on August 24, 2024

还有个问题大佬
MySQL [ops]> select * from ops_ansible_module_log;
Empty set (0.00 sec)
我只成功了这个moudle 但是找不到日志 后来我去这个表中未发现数去插入
module_record.delay
看了下可能是celery的问题 但也找不到什么问题 因为ansible.log没有找到抛出的异常

后来发现后台启动后自己关闭了 而且没有log输出 虽说创建了log日志但是里面什么都没有 我是root起的
root@big02:/var/log/celery# /etc/init.d/celeryd start
celery init v10.1.
Using config script: /etc/default/celeryd
celery multi v4.2.0 (windowlicker)

Starting nodes...
> worker@big02: OK
root@big02:/var/log/celery# ps -aux |grep celery
root 312052 91.5 0.0 243860 89732 ? R 16:52 0:01 /usr/bin/python3 -m celery worker --app=Ops --concurrency=8 --time-limit=300 --loglevel=INFO --logfile=/var/log/celery/worker%I.log --pidfile=/var/run/celery/worker.pid --hostname=worker@big02
root 312058 0.0 0.0 21312 940 pts/26 S+ 16:52 0:00 grep --color=auto celery
root@big02:/var/log/celery# ps -aux |grep celery
root 312062 0.0 0.0 21312 944 pts/26 S+ 16:52 0:00 grep --color=auto celery
root@big02:/var/log/celery# ls
beat.log worker.log
root@big02:/var/log/celery# ls -l
总用量 0
-rw-r--r-- 1 root root 0 6月 23 10:22 beat.log
-rw-r--r-- 1 root root 0 6月 23 10:21 worker.log
root@big02:/var/log/celery#

from ops.

pythonzm avatar pythonzm commented on August 24, 2024

如果使用root启动失败的话,先执行 export C_FORCE_ROOT="true" ,再使用 /etc/init.d/celeryd start 启动

from ops.

zzjackaa avatar zzjackaa commented on August 24, 2024

[root@master Ops-master]# export C_FORCE_ROOT="true"
[root@master Ops-master]# /etc/init.d/celeryd start
celery init v10.1.
Using config script: /etc/default/celeryd

  • Creating default directory: '/var/run/celery'
  • Changing permissions of '/var/run/celery' to 02755
  • Changing owner of '/var/run/celery' to 'root'
  • Changing group of '/var/run/celery' to 'root'
    celery multi v4.2.0 (windowlicker)

Starting nodes...
> workr@master: OK
提示起来了 但是ps -aux |grep celery 的时候进程只有1s中就没了 log无输出 只有文件被创建

from ops.

zzjackaa avatar zzjackaa commented on August 24, 2024

手动执行 celery worker -A Ops.celery会报错

File "/usr/local/lib/python3.6/site-packages/celery/app/base.py", line 673, in _autodiscover_tasks
return self._autodiscover_tasks_from_fixups(related_name)
File "/usr/local/lib/python3.6/site-packages/celery/app/base.py", line 683, in _autodiscover_tasks_from_fixups
pkg for fixup in self._fixups
File "/usr/local/lib/python3.6/site-packages/celery/app/base.py", line 684, in
for pkg in fixup.autodiscover_tasks()
AttributeError: 'NoneType' object has no attribute 'autodiscover_tasks'

from ops.

pythonzm avatar pythonzm commented on August 24, 2024

celery的配置文件都配置的正确么

from ops.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.