Agent registration token is rejected or expired

An agent outside the Anywhere Cloud cluster registers once with a one-time registration token. If Cloudera Migration Assistant rejects the token, the agent stays unregistered and cannot connect. Generate a new token, and give it to the agent.

Symptoms

Agents that run as Cloudera Migration Assistant Agent engines on the Anywhere Cloud cluster do not use registration tokens. This topic applies to agents outside the cluster, for example on a Cloudera Base on premises cluster.

One or more of the following:

  • The agent starts, but does not connect to the Cloudera Migration Assistant engine.
  • On the Agent Overview page, the agent is displayed as Pending, Expired, or Revoked on the Registration tab.
  • You cannot generate a token, or the Registration tab is not displayed.

Token was already used or expired

Each token works for one registration only. You choose the validity when you generate the token: 1 hour, 24 hours, 3 days, or 7 days. A Pending agent displays the expiry of its token. When the token has expired, the agent is displayed as Expired, and no agent can register with that token.

Solution

  1. On the Registration tab of the Agent Overview page, find the agent in the Agents section, and check its Status.
    Only users with the cma-admin role see the Registration tab.
  2. Generate a new token for the agent. Enter the name of the agent in the Name field.
    For the steps, see Generating registration tokens. The new token replaces any earlier token for that name.
  3. In Cloudera Manager, set CMA Agent Registration Token of the CMA Agent service to the new token.
  4. Restart the CMA Agent service.
    The agent registers, and its status changes to Active.

Name belongs to active agent

Cloudera Migration Assistant does not issue a token for a name that an active agent already has. To register that agent again, for example after you move it to another host, revoke it first.

Solution

  1. On the Registration tab, find the agent in the Agents section.
  2. Click Revoke.
  3. Confirm the revocation.
  4. Generate a token for the same name, and give it to the agent, as described for an expired token.
    To register a different agent, give it a name that no active agent uses. See Revoking agents.

Agent was revoked

A revoked agent cannot connect to the Cloudera Migration Assistant engine. Its status on the Registration tab is Revoked.

Solution

To use the agent again, generate a token for its name, and give it to the agent. The agent becomes Pending, and then Active when it registers.

Too many registration attempts

Cloudera Migration Assistant limits agent registration to 5 attempts in 60 seconds from each address. Cloudera Migration Assistant rejects further attempts from the same address until the 60 seconds pass. This happens when several agents register from the same address, or when an agent retries quickly.

Solution

Wait one minute, and then restart the agent. See Rate limits, security headers, and session timeouts.

Registration tab is not displayed

Only users with the cma-admin role see the Registration tab.

Solution

Ask an Anywhere Cloud administrator to assign you the role. See Assigning roles to users.

Table 1. Cloudera Migration Assistant roles
Role Description in Anywhere Cloud What the role can do
cma-admin Full administrative access Everything that a migrator can do, and also generate agent registration tokens and revoke agents. The user who deploys Cloudera Migration Assistant gets this role.
cma-migrator Standard user access Register clusters, manage connections, run scans, create and run migration plans, and create refactor jobs.
cma-viewer Read-only access View clusters, plans, executions, commands, and agents, without changing anything.

A user who has no Cloudera Migration Assistant role gets viewer access at most. Only administrators see the Registration tab on the Agent Overview page.

Agent is offline briefly during updates

When you update a Cloudera Migration Assistant Agent engine, Anywhere Cloud stops the old agent pod before it starts the new one. The agent is offline for a short time, and then connects again by itself.

Solution

Wait until the new pod is running before you start new commands on that agent.