Closed Muramono closed 8 months ago
The issue might be an incorrect subnet ID. Please confirm that the oci_subnet_id variable on line 302 matches the following pattern:
ocid1.subnet.oc1.<region>.<unique_ID>
Double-check that there are no typos or extra characters in the subnet ID provided.
@mohankumarpaluru Sorry I'm not super familiar with network stuff, but since I am using my local machine instead of a oracle mini VM I used ifconfig to find my netmask and set that as the subnet ID. My subnet that I get from that is formatted xxx.xxx.xxx.x . I'm also not sure if this would cause any issues, but I am trying to run this on a WSL ubuntu instance. Any other ideas?
@maciekniewielki
okay that's your local subnet but we can't create the Instance in that subnet so you got to create a VPC in the Oracle Cloud Console, establish a subnet within it, and utilize the specific subnet's OCI ID in line 302 for seamless integration.
it's fairly simple process, try searching on how to create VPC/Subnet in Oracle cloud you should see some examples. let me know if you face any issues
@mohankumarpaluru Thank you I got it working now with this. I actually already had a subnet setup, but I didn't fully understand which subnet was required for that step. Thank you for a very well documented and helpful github.
Hello, I've tried following all the README instructions, but I am getting the follow error after running the script. Also for context I cannot currently get a oracle micro instance so I am running the script locally and modified the subnet with my own subnet and commented out line 299-301 as you suggested per another issue. I've tried to include all the possibly helpful info below, but let me know if you need anything else.
Launch_instance.log error
Things I've tried so far
oci.env for Reference
OCI Configuration
OCI_Config for reference [DEFAULT] user=ocid1.user.oc1..aaaaaaaay......... fingerprint=51:eb:....... tenancy=ocid1.tenancy.oc1..aaaaaaaab....... region=us-chicago-1 key_file=/home/mura/oracle-freetier-instance-creation/oci_api_private_key.pem
Error Trace I get from running the main.py
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/mura/oracle-freetier-instance-creation/main.py", line 373, in
launch_instance()
File "/home/mura/oracle-freetier-instance-creation/main.py", line 369, in launch_instance
handle_errors("launch_instance", data, logging_step5)
File "/home/mura/oracle-freetier-instance-creation/main.py", line 216, in handle_errors
raise Exception("Error: %s" % data)
Exception: Error: {'status': 404, 'code': 'NotAuthorizedOrNotFound', 'message': 'Authorization failed or requested resource not found.'}