antoinemartin / django-windows-tools

Django application providing management commands to host Django projects in Windows environments
BSD 2-Clause "Simplified" License
50 stars 13 forks source link

The Celeryd can not launch properly, it dies! #7

Closed timtan closed 7 years ago

timtan commented 11 years ago

Celeryd dies in a very fast fashion. but celerybeat works correctly.

Error Message as I executed the command:

python service.py debug

Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\site-packages\billiard\forking.py", line 503, in main prepare(preparation_data) File "C:\Python27\lib\site-packages\billiard\forking.py", line 644, in prepare file, path_name, etc = imp.find_module(main_name, dirs) ImportError: No module named PythonService

my service.ini

[services]

run=celeryd

clean=c:\logs\celeryd.pid;c:\logs\celerybeat.pid

[celeryd]

command=celeryd

parameters=-f c:\logs\celery.log -l debug --settings=rcs_main.win_dev

[celerybeat]

command=celerybeat

parameters=-f c:\logs\beat.log -l info --pidfile=c:\logs\celerybeat.pid --settings=rcs_main.win_dev

[runserver]

command=runserver

parameters=--noreload --insecure 0.0.0.0:8000

[log]

filename=c:\logs\service.log

level=INFO

Here is my log

[INFO/Process-1] Starting command : C:\Python27\lib\site-packages\django_windows_tools\service.pyc celeryd -f c:\logs\celery.log -l debug --settings=rcs_main.win_dev [ERROR/Process-1] Process 'PoolWorker-1' pid:2568 exited with exitcode 1 [ERROR/Process-1] Process 'PoolWorker-2' pid:2196 exited with exitcode 1 [ERROR/Process-1] Process 'PoolWorker-3' pid:708 exited with exitcode 1 [ERROR/Process-1] Process 'PoolWorker-4' pid:4016 exited with exitcode 1 [ERROR/Process-1] Process 'PoolWorker-5' pid:3828 exited with exitcode 1 [ERROR/Process-1] Process 'PoolWorker-6' pid:3416 exited with exitcode 1 [ERROR/Process-1] Process 'PoolWorker-7' pid:3228 exited with exitcode 1 [ERROR/Process-1] Process 'PoolWorker-8' pid:1348 exited with exitcode 1

timtan commented 11 years ago

I found the problem was fixed in Git Repo. please distribute the version to pypi :)

findsarfaraz commented 9 years ago

Where is fix for this issue. I am facing the same. Please help

timtan commented 9 years ago

Use the code in Github, not pypi. Can @antoinemartin publish a new version and n pypi?

cyberfantasy commented 9 years ago

Updating

Thanks for fixing this issue in github. For other people who are encountering this issue, please replace the service.py with the one in github after calling pip install django-windows-tools.

Greeting,

I am encounting this issue when testing my app with latest packages on a Windows machine. Here is my debug log. My current understanding is something went wrong in billliard side.

I have added following line to fix virtualenv issue.

https://github.com/antoinemartin/django-windows-tools/issues/12

sys.exec_prefix = sys.exec_prefix + "\Scripts\"

(env) d:\website>python service.py debug Debugging service - press Ctrl+C to stop. Info 0x400000FF - Initialization Info 0x400000FF - d:\website\service.ini Info 0x400000FF - starting Info 0x400000FF - Spawned D:\website\env\lib\site-packages\django_windows_tools\servi ce.pyc celery worker -A -l info -f d:\website\celeryworker1.log Info 0x400000FF - Started. Waiting for stop No handlers could be found for logger "multiprocessing"

-------------- celery@ v3.1.19 (Cipater) ---- * ----- --- \ * * -- Windows-7-6.1.7601-SP1 -- * - **\ ---

[tasks] . api.tasks.add_downloadjob . api.tasks.check_file . api.tasks.remove_olditems . .celery.debug_task

Info 0x400000FF - Started. Waiting for stop Traceback (most recent call last): File "", line 1, in File "D:\website\env\lib\site-packages\billiard\forking.py", line 430, in main prepare(preparation_data) File "D:\website\env\lib\site-packages\billiard\forking.py", line 557, in prepare file, path_name, etc = imp.find_module(main_name, dirs) ImportError: No module named PythonService Traceback (most recent call last): File "", line 1, in File "D:\website\env\lib\site-packages\billiard\forking.py", line 430, in main prepare(preparation_data) File "D:\website\env\lib\site-packages\billiard\forking.py", line 557, in prepare file, path_name, etc = imp.find_module(main_name, dirs) ImportError: No module named PythonService

mrbean-bremen commented 8 years ago

@antoinemartin - if you can find the time, could you push the current version to pypi? There are a number of fixes in since last push, and this make the live easier for the users... I already increased the version to 0.1.2, but only the original owner is allowed to push to pypi.

Thanks in advance!

antoinemartin commented 8 years ago

Done. If you give me a valid pypi username, I'd be more than happy to hand over the ownership to you.

mrbean-bremen commented 8 years ago

Thanks a lot! My pypi username is the same as on github, if you really want to transfer the ownership, though I think it's not really needed.

antoinemartin commented 8 years ago

Done. We are now owners together of the project on pypi. As I already said before, I'm sorry if I can't handle update requests but I made this package in 2012 for a client that wanted to run all its servers on Windows.

I thought at the time that running Django on Windows was a bad idea. It's even more the case now that alternatives like Docker exists.

mrbean-bremen commented 8 years ago

Thank you - I didn't realize that shared ownership is possible on pypi. And I completely agree about running django servers on Windows. But that's the thing with big companies - they move very slowly, and it will take some time before they get to use other technologies than what they are used to. Anyway, if you have to go this path, it is nice to have helper tools like this one, as configuration in Windows can be a nightmare. So thank you for that!

mrbean-bremen commented 7 years ago

Closing this as fixed in the latest pypi version, as far as I can see.