AnykeyNL / OCI-AutoScale

Automatic Scaling for OCI BM Database Cloud Service (Schedule based)
Universal Permissive License v1.0
113 stars 67 forks source link

Authenticated problem #15

Closed lucbind closed 2 years ago

lucbind commented 2 years ago

Even all seems well configured ?i receive NotAuthenticated error

Starting Auto Scaling script on region eu-stockholm-1, executing Down actions Day of week: Sunday, IsWeekday: False, Current hour: 3 Getting all resources supported by the search function... Traceback (most recent call last): File "/home/opc/OCI-AutoScale/AutoScaleALL.py", line 1625, in autoscale_region(region_name) File "/home/opc/OCI-AutoScale/AutoScaleALL.py", line 519, in autoscale_region result = search.search_resources(search_details=sdetails, limit=1000, retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY).data File "/usr/lib/python3.6/site-packages/oci/resource_search/resource_search_client.py", line 321, in search_resources response_type="ResourceSummaryCollection") File "/usr/lib/python3.6/site-packages/oci/retry/retry.py", line 279, in make_retrying_call return func_ref(*func_args, **func_kwargs) File "/usr/lib/python3.6/site-packages/oci/base_client.py", line 432, in call_api response = self.request(request) File "/usr/lib/python3.6/site-packages/oci/base_client.py", line 547, in request self.raise_service_error(request, response) File "/usr/lib/python3.6/site-packages/oci/base_client.py", line 717, in raise_service_error original_request=request) oci.exceptions.ServiceError: {'opc-request-id': '5ED703761B414925B724AA58AD22ACCE/7782177353E4E49F162E90BFB61D5AA3/36FAC36B2F485449E8D560CD401CEEA8', 'code': 'NotAuthenticated', 'message': 'The required information to complete authentication was not provided or was incorrect.', 'status': 401}

[opc@VMCheckSchedule .oci]$ oci os ns get { "data": "frofufwuvghu" }

lucbind commented 2 years ago

the problem was caused by not correct authorization on other regions