Registration Failed for Instance

An instance can fail to register with Autonomous Linux for several reasons.

Invalid profile was used

The following conditions might indicate that an instance tried to register with an invalid profile:

  • The status of the instance in the Autonomous Linux is Registration failed.
  • The osmh-agent.logfile displays a message similar to:

    Message: Invalid Managed Instance osFamily ORACLE_LINUX_8 does not match Profile osFamily: ORACLE_LINUX_9 which indicates the profile has the wrong OS version.

To resolve the issue

  1. Open the navigation menu and click Observability & Management. Under Autonomous Linux, click Instances.
  2. Under List scope, select the compartment that contains the instance.
  3. Click the name of the instance.
  4. Click Set profile.
  5. Select the compartment and correct profile to use for registration.
  6. Click Set.

Missing dynamic group rule

If the osmh-agent.log contains the following error, it could indicate that the dynamic group rule isn't set correctly.

ERROR: failed to update managed instance: Error returned by  Service. Http Status Code: 404.
                    Error Code: NotAuthorizedOrNotFound. Opc request id: <requestID>. Message: Authorization failed or requested resource not found.
                    ...
                    Request Endpoint: PUT https://osmh.<region>.oci.oraclecloud.com/20220901/agent/managedInstances/ocid1.managementagent.oc1.iad.<ocid>
To resolve the issue, verify that the dynamic group rules include the compartment that the instance resides in. Dynamic groups don't support compartment inheritance, so you might need to explicitly include subcompartments. See Required Dynamic Group.

Instance was previously unregistered

Re-registering an instance that was unregistered will fail until you remove the unregistration file on the instance. This file prevents the instance from registering with the service. When you try to register an instance that contains this file, the agent plugin displays the following error: started oci-osmh under unregistered mode.

Remove the following file before registering the instance:

  • /var/lib/oracle-cloud-agent/plugins/oci-osmh/osmh-agent-unregister

OS not set to current time

Timeout errors at registration can occur when the time on the instance is different from the time used in the Autonomous Linux service. A clock skew of more than 5 minutes can cause these types of errors.

During management station or instance registration, the following error is reported when running the /opt/oracle/mgmt_agent/agent_inst/bin/setup.sh script:
Starting plugin deployment for: [osmh]
Deploying service plugin(s)..............................Timed out.
        Agent is unable to check if it deployed requested service plugin(s) successfully or not. Please check back later on the console.
  1. Determine if clock skew exists by checking the managementagent service endpoint date against the instance or management station using the following commands.
    curl -s --head https://managementagent.<region>.oci.oraclecloud.com | grep Date
    date -u

    For example:

    $ curl -s --head https://managementagent.us-phoenix-1.oci.oraclecloud.com | grep Date
    Date: Tue, 13 Jun 2023 15:42:17 GMT
    $ date -u
    Tue Jun 13 15:42:19 UTC 2023
  2. If the date or time on the instance or management station is different from the time reported by the service, update the OS time to match the service.
    If time synchronization facilities such as Chrony or Network Time Protocol (NTP) are used, verify their setup and operation.