Run dev_appserver on non-loopback IP address causes enqueuing to tasks queues to fail

79 views
Skip to first unread message

googlefox

unread,
Mar 27, 2012, 3:30:26 PM3/27/12
to google-a...@googlegroups.com
I am running my dev_appserver instance on a non-loopback IP address (i.e the IP address bound to my network adapter). I am doing this because I want my app to be accessible outside of localhost.

My app exposes a HTTP page. This page takes the POST entity body, and then enqueues a task to a push queue using taskQueue. The call is as follows:

--
taskqueue.add(url='/processBatch', params={ 'requests' : requestEntityBody})
--

Now, when this is done, the task throws an exception:

--
ERROR    2012-03-27 19:12:07,424 taskqueue_stub.py:1857] An error occured while sending the task "task1" (Url: "/processBatch") in queue "default". Treating as a task error.
Traceback (most recent call last):
  File "/home/gaeuser/test/src/main/python/parts/google_appengine/google/appengine/api/taskqueue/taskqueue_stub.py", line 1845, in ExecuteTask
    connection.endheaders()
  File "/usr/lib/python2.7/httplib.py", line 951, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 811, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 773, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 754, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 571, in create_connection
    raise err
error: [Errno 111] Connection refused
WARNING  2012-03-27 19:12:07,425 taskqueue_stub.py:1937] Task task1 failed to execute. This task will retry in 0.001 seconds
--

I think what is happening is that while the app is listening on the non-loopback IP address endpoint, the TaskQueue api is trying to enqueue the task to the loopback endpoint, which is not active.

Can the GAE team confirm this? Any suggested workarounds?
Reply all
Reply to author
Forward
0 new messages