Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7724055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:35:59+00:00 2026-06-01T04:35:59+00:00

I ran into an error that was painful to track down, so I thought

  • 0

I ran into an error that was painful to track down, so I thought I’d add the cause + “solution” here.

The setup:
Devbox – Running Google App Engine listening on all ports (“–address=0.0.0.0”) serving a URL that launches a task.
Client – Client (Python requests library) which queries the callback URL

App Engine code:

class StartTaskCallback(webapp.RequestHandler):
  def post(self):
    param = self.request.get('param')
    logging.info('STARTTASK: %s' % param)
    # launch a task
    taskqueue.add(url='/tasks/mytask',
                  queue_name='myqueue',
                  params={'param': param})

class MyTask(webapp.RequestHandler):
  def post(self):
    param = self.request.get('param')
    logging.info('MYTASK: param = %s' % param)

When I queried the callback with my browser, everything worked, but the same query from the remote client gave me the following error:

ERROR    2012-03-23 21:18:27,351 taskqueue_stub.py:1858] An error occured while sending the task "task1" (Url: "/tasks/mytask") in queue "myqueue". Treating as a task error.
Traceback (most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/taskqueue/taskqueue_stub.py", line 1846, in ExecuteTask
    connection.endheaders()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 868, in endheaders
    self._send_output()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 740, in _send_output
    self.send(msg)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 699, in send
    self.connect()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 683, in connect
    self.timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 498, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno 8] nodename nor servname provided, or not known

This error would just spin in a loop as the task retried. Though oddly, I could go to Admin -> Task Queues and click ‘Run’ to get the task to complete successfully.

At first I thought this was an error with the binding. I would not get an error if I queried the StartTaskCallback via the browser or if I ran the client locally.

Finally I noticed that App Engine is using the ‘host’ field of the request in order to build an absolute URL for the task. In /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/taskqueue/taskqueue_stub.py (1829):

  connection_host, = header_dict.get('host', [self._default_host])
  if connection_host is None:
    logging.error('Could not determine where to send the task "%s" '
                  '(Url: "%s") in queue "%s". Treating as an error.',
                  task.task_name(), task.url(), queue.queue_name)
    return False
  connection = httplib.HTTPConnection(connection_host)

In my case, I was using a special name + hosts file on the remote client to access the server.
192.168.1.208 devbox
So the ‘host’ for the remote client looked like ‘devbox:8085’ which the local server could not resolve.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T04:36:00+00:00Added an answer on June 1, 2026 at 4:36 am

    To fix the issue, I simply added devbox to my AppEngine server’s hosts file, but it sure would have been nice if the gaierror exception had printed the name it failed to resolve, or if App Engine didn’t use the ‘host’ of the incoming request to build a URL for task creation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I ran into an error that states XPath failed due to: A sequence of
I ran into a compiler error that didn't make much sense to me: #include
Ran into this error message while trying to select some records off a table.
I ran into this error when building my code with CLANG: In file included
I ran into an error when trying to serialize a linq entitySet. To get
today I ran into an error and have no clue how to fix it.
I ran into unbound method error in python with this code: import random class
I ran into an interesting error with the following LiNQ query using LiNQPad and
I ran into a little error trying to select off of my table. I
Ran into an Out of Stack Space error trying to serialize an ASP.Net AJAX

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.