Domanda

I am getting the following warning:

WARNING  2011-09-21 20:25:32,259 urlfetch_stub.py] urlfetch received https://z_c
l.zzzz.me:10312/zzzz/Data/0 ; port 10312 is not allowed in production!

Is there anyway to use that port in Production?

È stato utile?

Soluzione

Update your SDK version!
Since march 2010 (SDK 1.3.2), GAE has allowed a wider range of ports: 80-90, 440-450, 1024-65535.

They switched from:

PORTS_ALLOWED_IN_PRODUCTION = (
    None, '80', '443', '4443', '8080', '8081', '8082', '8083', '8084', '8085',
    '8086', '8087', '8088', '8089', '8188', '8444', '8990')
if port not in PORTS_ALLOWED_IN_PRODUCTION:
        logging.warning(
          'urlfetch received %s ; port %s is not allowed in production!' %
          (url, port))

to:

def _IsAllowedPort(port):
  if port is None:
    return True
  try:
    port = int(port)
  except ValueError, e:
    return False
  if ((port >= 80 and port <= 90) or
      (port >= 440 and port <= 450) or
      port >= 1024):
    return True
  return False

if not _IsAllowedPort(port):
        logging.warning(
          'urlfetch received %s ; port %s is not allowed in production!' %
          (url, port))
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top