mohankumarpaluru / oracle-freetier-instance-creation

A script to create free instance
MIT License
152 stars 31 forks source link

Unhandled Exception Occurred. #41

Open solitonmedic opened 12 hours ago

solitonmedic commented 12 hours ago

Describe the bug `The script encountered an unhandled error and exited unexpectedly.

Please re-run the script by executing './setup_init.sh rerun'.

And raise a issue on GitHub if its not already existing: https://github.com/mohankumarpaluru/oracle-freetier-instance-creation/issues

And include the following error message to help us investigate and resolve the problem:

status: 401 code: NotAuthenticated message: Failed to verify the HTTP(S) Signature`

Expected behavior Boot up the script.

Instance Type (please complete the following information):

Environment (please complete the following information):

Additional context Add any other context about the problem here.

solitonmedic commented 12 hours ago

.venv output:

Traceback (most recent call last): File "main.py", line 310, in execute_oci_command response = getattr(client, method)(*args, kwargs) File "/home/ubuntu/oracle-freetier-instance-creation/.venv/lib/python3.8/site-packages/oci/identity/identity_client.py", line 8285, in get_user return retry_strategy.make_retrying_call( File "/home/ubuntu/oracle-freetier-instance-creation/.venv/lib/python3.8/site-packages/oci/retry/retry.py", line 308, in make_retrying_call response = func_ref(*func_args, *func_kwargs) File "/home/ubuntu/oracle-freetier-instance-creation/.venv/lib/python3.8/site-packages/oci/base_client.py", line 535, in call_api response = self.request(request, allow_control_chars, operation_name, api_reference_link) File "/home/ubuntu/oracle-freetier-instance-creation/.venv/lib/python3.8/site-packages/circuitbreaker.py", line 146, in wrapper return self.call(function, args, kwargs) File "/home/ubuntu/oracle-freetier-instance-creation/.venv/lib/python3.8/site-packages/circuitbreaker.py", line 188, in call return func(*args, **kwargs) File "/home/ubuntu/oracle-freetier-instance-creation/.venv/lib/python3.8/site-packages/oci/base_client.py", line 726, in request self.raise_service_error(request, response, service_code, message, operation_name, api_reference_link, target_service, request_endpoint, client_version, timestamp, deserialized_data) File "/home/ubuntu/oracle-freetier-instance-creation/.venv/lib/python3.8/site-packages/oci/base_client.py", line 891, in raise_service_error raise exceptions.ServiceError( oci.exceptions.ServiceError: {'target_service': 'identity', 'status': 401, 'code': 'NotAuthenticated', 'opc-request-id': '6B62B41D734540BEA61E3B62BCB6E1F8/49911FD8ECC7C537595F9B6CFD6A2AED/2BF1392FC2945DAE136EFD9EBEA711C1', 'message': 'Failed to verify the HTTP(S) Signature', 'operation_name': 'get_user', 'timestamp': '2024-09-23T06:53:25.694601+00:00', 'client_version': 'Oracle-PythonSDK/2.134.0', 'request_endpoint': 'GET https://identity.us-ashburn-1.oci.oraclecloud.com/20160918/users/ocid1.user.oc1..aaaaaaaakeyyfd5w2ehcckchivhrznowcr6sfsg53d4kfhdzkkp334hcknya', 'logging_tips': 'To get more info on the failing request, refer to https://docs.oracle.com/en-us/iaas/tools/python/latest/logging.html for ways to log the request/response details.', 'troubleshooting_tips': "See https://docs.oracle.com/iaas/Content/API/References/apierrors.htm#apierrors_401__401_notauthenticated for more information about resolving this error. Also see https://docs.oracle.com/iaas/api/#/en/identity/20160918/User/GetUser for details on this operation's requirements. If you are unable to resolve this identity issue, please contact Oracle support and provide them this full error message."}

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "main.py", line 464, in launch_instance() File "main.py", line 364, in launch_instance user_info = execute_oci_command(iam_client, "get_user", OCI_USER_ID) File "main.py", line 317, in execute_oci_command handle_errors(args, data, logging_step5) File "main.py", line 290, in handle_errors raise Exception("Error: %s" % data) Exception: Error: {'status': 401, 'code': 'NotAuthenticated', 'message': 'Failed to verify the HTTP(S) Signature'}