EC2ResponseError

EC2ResponseError: 400 Bad Request <?xml version='1.0' encoding='UTF-8'?> <Response><RequestID>c3ecd86f-5de6-4e09-9f7f-acfa211e28db</RequestID><Errors><Error><Code>AuthFailure</Code><Message>User not authorized.</Message></Error></Errors></Response> search by Google

_errorResultSet : ResultSet
[<boto.exception._EC2Error object at 0x7f81106cc390>]
_error_message : NoneType
None
args : tuple
(400, 'Bad Request', b"<?xml version='1.0' encoding='UTF-8'?>\n<Response><RequestID>c3ecd86f-5de6-4e09-9f7f-acfa211e28db</RequestID><Errors><Error><Code>AuthFailure</Code><Message>User not authorized.</Message></Error></Errors></Response>")
body : str
<?xml version='1.0' encoding='UTF-8'?> <Response><RequestID>c3ecd86f-5de6-4e09-9f7f-acfa211e28db</RequestID><Errors><Error><Code>AuthFailure</Code><Message>User not authorized.</Message></Error></Errors></Response>
box_usage : NoneType
None
error_code : str
AuthFailure
errors : list
[('AuthFailure', 'User not authorized.')]
message : str
User not authorized.
reason : str
Bad Request
request_id : str
c3ecd86f-5de6-4e09-9f7f-acfa211e28db
status : int
400

Traceback

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

    self : _Outcome
    <unittest.case._Outcome object at 0x7f8110ca1c50>
    test_case : VolumeVersions
    test_create_file_standard (c2tests.ec2.volume_versions.VolumeVersions)
    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 : VolumeVersions
    test_create_file_standard (c2tests.ec2.volume_versions.VolumeVersions)
    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 0x7f8110ca1c50>
    testMethod : method
    <bound method VolumeVersions.test_create_file of <c2tests.ec2.volume_versions.VolumeVersions testMethod=test_create_file_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/__init__.py in setUp (arguments )

    self : VolumeVersions
    test_create_file_standard (c2tests.ec2.volume_versions.VolumeVersions)
    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>
  4. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in setUp (arguments )

    self : VolumeVersions
    test_create_file_standard (c2tests.ec2.volume_versions.VolumeVersions)
    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>
  5. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in setUp (arguments )

    self : VolumeVersions
    test_create_file_standard (c2tests.ec2.volume_versions.VolumeVersions)
    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>
  6. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in cleanup (arguments )

    self : VolumeVersions
    test_create_file_standard (c2tests.ec2.volume_versions.VolumeVersions)
    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>
  7. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in _fill_entities (arguments )

    self : VolumeVersions
    test_create_file_standard (c2tests.ec2.volume_versions.VolumeVersions)
    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>
  8. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in _fill_entities (arguments )

    self : VolumeVersions
    test_create_file_standard (c2tests.ec2.volume_versions.VolumeVersions)
    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>
  9. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in get_all_addresses (arguments )

    self : VolumeVersions
    test_create_file_standard (c2tests.ec2.volume_versions.VolumeVersions)
    *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>
  10. /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

  11. /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. xml.sax.parseString(body, h)
    2. return rs
    3. else:
    4. boto.log.error('%s %s' % (response.status, response.reason))
    5. boto.log.error('%s' % body)
    6. raise self.ResponseError(response.status, response.reason, body)
    7. def get_object(self, action, params, cls, path='/',
    8. parent=None, verb='GET'):
    9. if not parent:

    Locals

    body : bytes
    <?xml version='1.0' encoding='UTF-8'?> <Response><RequestID>c3ecd86f-5de6-4e09-9f7f-acfa211e28db</RequestID><Errors><Error><Code>AuthFailure</Code><Message>User not authorized.</Message></Error></Errors></Response>
    response : HTTPResponse
    <boto.connection.HTTPResponse object at 0x7f8110ca1cd0>

    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:44:13
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