Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I communicate with Celery on Cloud Foundry?
    primarykey
    data
    text
    <p>I have a wsgi app with a celery component. Basically, when certain requests come in they can hand off relatively time-consuming tasks to celery. I have a working version of this product on a server I set up myself, but our client recently asked me to deploy it to Cloud Foundry. Since Celery is not available as a service on Cloud Foundry, we (me and the client's deployment team) decided to deploy the app <em>twice</em> – once as a wsgi app and once as a standalone celery app, sharing a rabbitmq service.</p> <p>The code between the apps is identical. The wsgi app responds correctly, returning the expected web pages. <code>vmc logs celeryapp</code> shows that celery is to be up-and-running, but when I send requests to wsgi that should become celery tasks, they disappear as soon as they get to a <code>.delay()</code> statement. They neither appear in the celery logs nor do they appear as an error.</p> <h2>Attempts to debug:</h2> <ul> <li>I can't use <code>celery.contrib.rdb</code> in Cloud Foundry (to supply a telnet interface to pdb), as each app is sandboxed and port-restricted.</li> <li>I don't know how to find the specific rabbitmq instance these apps are supposed to share, so I can see what messages it's passing.</li> </ul> <p>Update: to corroborate the above statement about finding rabbitmq, here's what happens when I try to access the node that should be sharing celery tasks:</p> <pre><code>root@cf:~# export RABBITMQ_NODENAME=eecef185-e1ae-4e08-91af-47f590304ecc root@cf:~# export RABBITMQ_NODE_PORT=57390 root@cf:~# ~/cloudfoundry/.deployments/devbox/deploy/rabbitmq/sbin/rabbitmqctl list_queues Listing queues ... =ERROR REPORT==== 18-Jun-2012::11:31:35 === Error in process &lt;0.36.0&gt; on node 'rabbitmqctl17951@cf' with exit value: {badarg,[{erlang,list_to_existing_atom,["eecef185-e1ae-4e08-91af-47f590304ecc@localhost"]},{dist_util,recv_challenge,1},{dist_util,handshake_we_started,1}]} Error: unable to connect to node 'eecef185-e1ae-4e08-91af-47f590304ecc@cf': nodedown diagnostics: - nodes and their ports on cf: [{'eecef185-e1ae-4e08-91af-47f590304ecc',57390}, {rabbitmqctl17951,36032}] - current node: rabbitmqctl17951@cf - current node home dir: /home/cf - current node cookie hash: 1igde7WRgkhAea8fCwKncQ== </code></pre> <p>How can I debug this and/or why are my tasks vanishing? </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload