로컬환경에서 테스트를 끝내고 실서버에 Celery 환경을 구성하고 있습니다. App 서버에

 
Jacob Seongwoon Lee

로컬환경에서 테스트를 끝내고 실서버에 Celery 환경을 구성하고 있습니다.
App 서버에 redis를 돌려서 broker와 result backend로 이용하고,
Worker 서버를 하나 같은 환경으로 만들어 celery를 실행하였습니다.
근데 실행 단계에서 오류가 하나 발생하였는데, Traceback만 보아서는 무슨 오류인지 모르겠습니다.

실행 명령

$ python manage.py celery worker –loglevel INFO –settings=hello_cherry_picker.settings.prod

Traceback

[2014-04-24 21:34:15,497: ERROR/MainProcess] Unrecoverable error: TypeError(‘argument must be an int, or have a fileno() method.’,)
Traceback (most recent call last):
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/celery/worker/__init__.py”, line 206, in start
self.blueprint.start(self)
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/celery/bootsteps.py”, line 123, in start
step.start(parent)
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/celery/bootsteps.py”, line 373, in start
return self.obj.start()
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/celery/worker/consumer.py”, line 278, in start
blueprint.start(self)
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/celery/bootsteps.py”, line 123, in start
step.start(parent)
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/celery/worker/consumer.py”, line 478, in start
c.connection = c.connect()
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/celery/worker/consumer.py”, line 375, in connect
callback=maybe_shutdown,
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/kombu/connection.py”, line 373, in ensure_connection
interval_start, interval_step, interval_max, callback)
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/kombu/utils/__init__.py”, line 243, in retry_over_time
return fun(*args, **kwargs)
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/kombu/connection.py”, line 241, in connect
return self.connection
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/kombu/connection.py”, line 758, in connection
self._connection = self._establish_connection()
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/kombu/connection.py”, line 713, in _establish_connection
conn = self.transport.establish_connection()
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/kombu/transport/virtual/__init__.py”, line 809, in establish_connection
self._avail_channels.append(self.create_channel(self))
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/kombu/transport/virtual/__init__.py”, line 791, in create_channel
channel = self.Channel(connection)
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/kombu/transport/redis.py”, line 445, in __init__
self._pool.disconnect()
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/redis/connection.py”, line 478, in disconnect
connection.disconnect()
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/kombu/transport/redis.py”, line 800, in disconnect
channel._on_connection_disconnect(self)
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/kombu/transport/redis.py”, line 461, in _on_connection_disconnect
self.connection.cycle._on_connection_disconnect(connection)
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/kombu/transport/redis.py”, line 259, in _on_connection_disconnect
self.poller.unregister(connection._sock)
File “/home/nalebe/Development/VirtualEnvs/hcp/local/lib/python2.7/site-packages/kombu/utils/eventio.py”, line 85, in unregister
self._epoll.unregister(fd)
TypeError: argument must be an int, or have a fileno() method.

  • Jacob Seongwoon Lee

    [2014-04-24 21:31:43,255: DEBUG/MainProcess] | Consumer: Starting Connection 이후 에러가 발생합니다.

    Seo Min Kyu

    브로커가 켜져있지 않은가봐요~

    Jacob Seongwoon Lee

    Seo Min Kyu 고맙습니다. 확인해보겠습니다!

    Jacob Seongwoon Lee

    Seo Min Kyu 그 문제가 맞는거 같군요. redis를 백그라운드로 돌려뒀는데.. 뭔가 문제가 있었나보네요.

    Jacob Seongwoon Lee

    Seo Min Kyu 답변 감사드립니다.

Advertisements