BotoServerError

BotoServerError: 502 Bad Gateway None search by Google

_error_message : NoneType
None
args : tuple
(502, 'Bad Gateway', '<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor="white">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n')
body : NoneType
None
box_usage : NoneType
None
error_code : NoneType
None
message : str
<html> <head><title>502 Bad Gateway</title></head> <body bgcolor="white"> <center><h1>502 Bad Gateway</h1></center> <hr><center>nginx</center> </body> </html>
reason : str
Bad Gateway
request_id : NoneType
None
status : int
502

Traceback

  1. /usr/local/lib/python3.7/unittest/case.py in testPartExecutor (arguments )

    self : _Outcome
    <unittest.case._Outcome object at 0x7f81109e2e50>
    test_case : Volumes
    test_type_changing_standard (c2tests.ec2.volumes.Volumes)
    isTest : bool
    False
    1. @contextlib.contextmanager
    2. def testPartExecutor(self, test_case, isTest=False):
    3. old_success = self.success
    4. self.success = True
    5. try:
    6. yield
    7. except KeyboardInterrupt:
    8. raise
    9. except SkipTest as e:
    10. self.success = False

    Locals

    exc_info : NoneType
    None
    old_success : bool
    True

    Globals

    __unittest : bool
    True
    _subtest_msg_sentinel : object
    <object object at 0x7f8128eeafb0>
    DIFF_OMITTED : str
    Diff is %s characters long. Set self.maxDiff to None to see it.
  2. /usr/local/lib/python3.7/unittest/case.py in run (arguments )

    self : Volumes
    test_type_changing_standard (c2tests.ec2.volumes.Volumes)
    result : DiagnosticsTestResult
    <xmlrunner.extra.diagnosticstestrunner.DiagnosticsTestResult run=1 errors=0 failures=0>
    1. outcome = _Outcome(result)
    2. try:
    3. self._outcome = outcome
    4. with outcome.testPartExecutor(self):
    5. self.setUp()
    6. if outcome.success:
    7. outcome.expecting_failure = expecting_failure
    8. with outcome.testPartExecutor(self, isTest=True):
    9. testMethod()

    Locals

    expecting_failure : bool
    False
    expecting_failure_class : bool
    False
    expecting_failure_method : bool
    False
    orig_result : DiagnosticsTestResult
    <xmlrunner.extra.diagnosticstestrunner.DiagnosticsTestResult run=1 errors=0 failures=0>
    outcome : _Outcome
    <unittest.case._Outcome object at 0x7f81109e2e50>
    testMethod : method
    <bound method Volumes.test_type_changing of <c2tests.ec2.volumes.Volumes testMethod=test_type_changing_standard>>

    Globals

    __unittest : bool
    True
    _subtest_msg_sentinel : object
    <object object at 0x7f8128eeafb0>
    DIFF_OMITTED : str
    Diff is %s characters long. Set self.maxDiff to None to see it.
  3. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/ec2/volumes.py in setUp (arguments )

    self : Volumes
    test_type_changing_standard (c2tests.ec2.volumes.Volumes)
    1. class Volumes(c2tests.EC2TestCase):
    2. """Tests various volume operations."""
    3. def setUp(self):
    4. super(Volumes, self).setUp()
    5. self.pops = 4
    6. def assert_create_error(self, error, function, **kwargs):
    7. if not kwargs.get("zone"):

    Locals

    Globals

    randint : method
    <bound method Random.randint of <random.Random object at 0x1ca9760>>
  4. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in setUp (arguments )

    self : Volumes
    test_type_changing_standard (c2tests.ec2.volumes.Volumes)
    1. self.entities[resources.VPC_VPCS] = self.get_all_vpcs()
    2. self.entities[resources.VPC_DHCP_OPTIONS] = self.get_all_dhcp_options()
    3. def setUp(self):
    4. self._default_vpcs = dict([(i, None) for i in profile.AVAILABLE_PROJECTS])
    5. super(VPCTestCase, self).setUp()
    6. zones = self.get_all_zones()
    7. def _setup():
    8. # ensure that default VPC exists

    Locals

    Globals

    gethostbyname : builtin_function_or_method
    <built-in function gethostbyname>
    UNSIGNED : UNSIGNED
    <botocore.UNSIGNED object at 0x7f811b6a9410>
  5. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in setUp (arguments )

    self : Volumes
    test_type_changing_standard (c2tests.ec2.volumes.Volumes)
    1. """
    2. return self.profile.get_connection(profile.EC2Connection)
    3. def setUp(self):
    4. super(_EC2TestCase, self).setUp()
    5. self._default_acls = {i: None for i in profile.AVAILABLE_PROJECTS}
    6. self._default_groups = {i: None for i in profile.AVAILABLE_PROJECTS}
    7. self._default_subnets = {i: {} for i in profile.AVAILABLE_PROJECTS}
    8. self._default_keypair = None

    Locals

    Globals

    gethostbyname : builtin_function_or_method
    <built-in function gethostbyname>
    UNSIGNED : UNSIGNED
    <botocore.UNSIGNED object at 0x7f811b6a9410>
  6. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in setUp (arguments )

    self : Volumes
    test_type_changing_standard (c2tests.ec2.volumes.Volumes)
    1. self.log.warning(message, *args, **kwargs)
    2. def setUp(self):
    3. self.report("Cleaning up before the test")
    4. self.cleanup()
    5. self.report("Cleaning up finished")
    6. self.log.warning("Running testcase: {0}".format(self._testMethodName))
    7. def tearDown(self):

    Locals

    Globals

    gethostbyname : builtin_function_or_method
    <built-in function gethostbyname>
    UNSIGNED : UNSIGNED
    <botocore.UNSIGNED object at 0x7f811b6a9410>
  7. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in cleanup (arguments )

    self : Volumes
    test_type_changing_standard (c2tests.ec2.volumes.Volumes)
    projects : NoneType
    None
    1. """Cleans up all data created by the test."""
    2. for project in projects or profile.AVAILABLE_PROJECTS:
    3. with self.switch_project(project):
    4. self.report("Filling up {0} project entities...".format(project))
    5. self._fill_entities()
    6. self.report("Cleaning up {0} project entities...".format(project))
    7. self._cleanup()
    8. def cleanup_prod(self):

    Locals

    project : str
    images

    Globals

    gethostbyname : builtin_function_or_method
    <built-in function gethostbyname>
    UNSIGNED : UNSIGNED
    <botocore.UNSIGNED object at 0x7f811b6a9410>
  8. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in _fill_entities (arguments )

    self : Volumes
    test_type_changing_standard (c2tests.ec2.volumes.Volumes)
    1. self.__vpcconn_prod = p.get_connection(profile.VPCConnection)
    2. return self.__vpcconn_prod
    3. def _fill_entities(self):
    4. super(VPCTestCase, self)._fill_entities()
    5. self._init_entities(resources.VPC_RESOURCES)
    6. self.entities[resources.VPC_ACLS] = self.get_all_acls(
    7. filters={"default": False}

    Locals

    Globals

    gethostbyname : builtin_function_or_method
    <built-in function gethostbyname>
    UNSIGNED : UNSIGNED
    <botocore.UNSIGNED object at 0x7f811b6a9410>
  9. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in _fill_entities (arguments )

    self : Volumes
    test_type_changing_standard (c2tests.ec2.volumes.Volumes)
    1. def _fill_entities(self):
    2. super(_EC2TestCase, self)._fill_entities()
    3. self._init_entities(resources.EC2_RESOURCES)
    4. self.entities[resources.EC2_ADDRESSES] = self.get_all_addresses()
    5. self.entities[resources.EC2_SECURITY_GROUPS] = [
    6. group
    7. for group in self.get_all_security_groups()
    8. if group.name != constants.SECURITY_GROUP_DEFAULT_NAME

    Locals

    Globals

    gethostbyname : builtin_function_or_method
    <built-in function gethostbyname>
    UNSIGNED : UNSIGNED
    <botocore.UNSIGNED object at 0x7f811b6a9410>
  10. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in get_all_addresses (arguments )

    self : Volumes
    test_type_changing_standard (c2tests.ec2.volumes.Volumes)
    *args : tuple
    ()
    **kwargs : dict
    {}
    1. acls = self.vpcconn.get_all_network_acls(*args, **kwargs)
    2. self.log.info("Available Network ACLs: {0}".format(acls))
    3. return acls
    4. def get_all_addresses(self, *args, **kwargs):
    5. addresses = self.conn.get_all_addresses(*args, **kwargs)
    6. self.log.info("Addresses: {0}".format(addresses))
    7. return addresses
    8. def get_all_byoip_cidrs(self, *args, **kwargs):

    Locals

    Globals

    gethostbyname : builtin_function_or_method
    <built-in function gethostbyname>
    UNSIGNED : UNSIGNED
    <botocore.UNSIGNED object at 0x7f811b6a9410>
  11. /root/c2tests/.venv/src/boto/boto/ec2/connection.py in get_all_addresses (arguments )

    self : EC2Connection
    EC2Connection:api.dev.c2.croc.ru
    addresses : NoneType
    None
    filters : NoneType
    None
    allocation_ids : NoneType
    None
    dry_run : bool
    False
    1. self.build_list_params(params, allocation_ids, 'AllocationId')
    2. if filters:
    3. self.build_filter_params(params, filters)
    4. if dry_run:
    5. params['DryRun'] = 'true'
    6. return self.get_list('DescribeAddresses', params, [('item', Address)], verb='POST')
    7. def allocate_address(self, domain=None, address=None,
    8. public_ipv4_pool=None, dry_run=False, tags=None):
    9. """

    Locals

    params : dict
    {}

    Globals

  12. /root/c2tests/.venv/src/boto/boto/connection.py in get_list (arguments )

    self : EC2Connection
    EC2Connection:api.dev.c2.croc.ru
    action : str
    DescribeAddresses
    params : dict
    {}
    markers : list
    [('item', <class 'boto.ec2.address.Address'>)]
    path : str
    /
    parent : EC2Connection
    EC2Connection:api.dev.c2.croc.ru
    verb : str
    POST
    1. def get_list(self, action, params, markers, path='/',
    2. parent=None, verb='GET'):
    3. if not parent:
    4. parent = self
    5. response = self.make_request(action, params, path, verb)
    6. body = response.read()
    7. boto.log.debug(body)
    8. if not body:
    9. boto.log.error('Null body %s' % body)

    Locals

    Globals

    config : Config
    <boto.pyami.config.Config object at 0x7f811bd6c310>
    DEFAULT_CA_CERTS_FILE : str
    /root/c2tests/.venv/src/boto/boto/cacerts/cacerts.txt
    HAVE_HTTPS_CONNECTION : bool
    True
    ON_APP_ENGINE : bool
    False
    PORTS_BY_SECURITY : dict
    {True: 443, False: 80}
    UserAgent : str
    Boto/2.46.1 Python/3.7.9 Linux/3.10.0-862.2.3.el7.x86_64
  13. /root/c2tests/.venv/src/boto/boto/ec2/connection.py in make_request (arguments )

    self : EC2Connection
    EC2Connection:api.dev.c2.croc.ru
    action : str
    DescribeAddresses
    params : dict
    {}
    path : str
    /
    verb : str
    POST
    1. def make_request(self, action, params=None, path='/', verb='GET'):
    2. if self.aws_sudo_id:
    3. if params is None:
    4. params = {}
    5. params['AWSSudoId'] = self.aws_sudo_id
    6. return AWSQueryConnection.make_request(self, action, params, path, verb)
    7. def get_params(self):
    8. """
    9. Returns a dictionary containing the value of all of the keyword
  14. /root/c2tests/.venv/src/boto/boto/connection.py in make_request (arguments )

    self : EC2Connection
    EC2Connection:api.dev.c2.croc.ru
    action : str
    DescribeAddresses
    params : dict
    {}
    path : str
    /
    verb : str
    POST
    1. self.host)
    2. if action:
    3. http_request.params['Action'] = action
    4. if self.APIVersion:
    5. http_request.params['Version'] = self.APIVersion
    6. return self._mexe(http_request)
    7. def build_list_params(self, params, items, label):
    8. if isinstance(items, six.string_types):
    9. items = [items]

    Locals

    http_request : HTTPRequest
    method:(POST) protocol:(https) host(api.dev.c2.croc.ru) port(8443) path(/) params({'Action': 'DescribeAddresses', 'Version': '2014-10-01'}) headers({'User-Agent': 'Boto/2.46.1 Python/3.7.9 Linux/3.10.0-862.2.3.el7.x86_64', 'X-Amz-Date': '20230901T124553Z', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Content-Length': '43', 'Authorization': 'AWS4-HMAC-SHA256 Credential=images:admin@hc.cloud.croc.ru/20230901/dev/api/aws4_request,SignedHeaders=host;x-amz-date,Signature=1c3ea6995be24025d24f9a70887fa2a58fffaa599cf30dd1cfa52d74202f7f47', 'Host': 'api.dev.c2.croc.ru:8443'}) body(Action=DescribeAddresses&Version=2014-10-01)

    Globals

    config : Config
    <boto.pyami.config.Config object at 0x7f811bd6c310>
    DEFAULT_CA_CERTS_FILE : str
    /root/c2tests/.venv/src/boto/boto/cacerts/cacerts.txt
    HAVE_HTTPS_CONNECTION : bool
    True
    ON_APP_ENGINE : bool
    False
    PORTS_BY_SECURITY : dict
    {True: 443, False: 80}
    UserAgent : str
    Boto/2.46.1 Python/3.7.9 Linux/3.10.0-862.2.3.el7.x86_64
  15. /root/c2tests/.venv/src/boto/boto/connection.py in _mexe (arguments )

    self : EC2Connection
    EC2Connection:api.dev.c2.croc.ru
    request : HTTPRequest
    method:(POST) protocol:(https) host(api.dev.c2.croc.ru) port(8443) path(/) params({'Action': 'DescribeAddresses', 'Version': '2014-10-01'}) headers({'User-Agent': 'Boto/2.46.1 Python/3.7.9 Linux/3.10.0-862.2.3.el7.x86_64', 'X-Amz-Date': '20230901T124553Z', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Content-Length': '43', 'Authorization': 'AWS4-HMAC-SHA256 Credential=images:admin@hc.cloud.croc.ru/20230901/dev/api/aws4_request,SignedHeaders=host;x-amz-date,Signature=1c3ea6995be24025d24f9a70887fa2a58fffaa599cf30dd1cfa52d74202f7f47', 'Host': 'api.dev.c2.croc.ru:8443'}) body(Action=DescribeAddresses&Version=2014-10-01)
    sender : NoneType
    None
    override_num_retries : NoneType
    None
    retry_handler : NoneType
    None
    1. # use it to raise an exception.
    2. # Otherwise, raise the exception that must have already happened.
    3. if self.request_hook is not None:
    4. self.request_hook.handle_request_data(request, response, error=True)
    5. if response:
    6. raise BotoServerError(response.status, response.reason, body)
    7. elif ex:
    8. raise ex
    9. else:
    10. msg = 'Please report this exception as a Boto Issue!'

    Locals

    body : str
    <html> <head><title>502 Bad Gateway</title></head> <body bgcolor="white"> <center><h1>502 Bad Gateway</h1></center> <hr><center>nginx</center> </body> </html>
    connection : HTTPSConnection
    <http.client.HTTPSConnection object at 0x7f81113abf10>
    ex : NoneType
    None
    i : int
    4
    location : NoneType
    None
    msg : str
    Received 502 response. Retrying in 1.2 seconds
    next_sleep : float
    1.1822277920442374
    num_retries : int
    3
    response : HTTPResponse
    <boto.connection.HTTPResponse object at 0x7f81113ab610>

    Globals

    config : Config
    <boto.pyami.config.Config object at 0x7f811bd6c310>
    DEFAULT_CA_CERTS_FILE : str
    /root/c2tests/.venv/src/boto/boto/cacerts/cacerts.txt
    HAVE_HTTPS_CONNECTION : bool
    True
    ON_APP_ENGINE : bool
    False
    PORTS_BY_SECURITY : dict
    {True: 443, False: 80}
    UserAgent : str
    Boto/2.46.1 Python/3.7.9 Linux/3.10.0-862.2.3.el7.x86_64

Environment

Time of report generation
2023-09-01 15:45:54
Python version
3.7.9 (default, Sep 21 2022, 19:11:27) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
Path to executable
/root/c2tests/.venv/bin/python
Working directory
/root/c2tests
Arguments vector
  1. /root/c2tests/.venv/bin/c2tests
  2. run
  3. -s
  4. ec2