Agent does not connect to master

An agent that cannot connect to the Cloudera Migration Assistant engine does not receive commands, and its clusters do not appear in Cloudera Migration Assistant. Check the agent URL settings, the network path, and the certificates that the agent trusts.

Symptoms

One or more of the following:

  • On the Agent Overview page of the Cloudera Migration Assistant web interface, the agent is displayed as Pending on the Registration tab after the agent has started.
  • On the Instances tab, an agent that runs on the Anywhere Cloud cluster is missing, or an error is displayed in the Message column.
  • The log of an agent on a Cloudera Base on premises cluster stops after the line Initializing connection to master, and the agent does not receive any commands.
  • An agent pod on the Anywhere Cloud cluster restarts repeatedly, and its log shows PKIX path building failed.

Agent on Cloudera Base on premises cluster cannot reach Cloudera Migration Assistant engine

An agent outside the Anywhere Cloud cluster opens all connections to the Cloudera Migration Assistant engine. It needs HTTPS access to the landing page URL, the agent connection URL, and the built-in Git server URL of the engine, and to the Anywhere Cloud authentication service. The authentication service has the hostname of the Anywhere Cloud Console, with console. replaced by knox..

Solution

  1. In Cloudera Manager, open the configuration of the CMA Agent service.
  2. Check that CMA Gateway URL is the landing page URL of the Cloudera Migration Assistant engine instance, in the form https://[***INSTANCE***]-gateway.[***CLUSTER-DOMAIN***], with no port number.
    Build the landing page URL from the name of the engine instance and the domain of the cluster. The details of the engine instance in the Anywhere Cloud Console do not show the URL.
  3. On the agent host, check that each of these hostnames resolves and responds over HTTPS:
    curl -sS -o /dev/null -w '%{http_code}\n' https://[***INSTANCE***]-gateway.[***CLUSTER-DOMAIN***]
    curl -sS -o /dev/null -w '%{http_code}\n' https://[***INSTANCE***]-grpc.[***CLUSTER-DOMAIN***]
    curl -sS -o /dev/null -w '%{http_code}\n' https://[***INSTANCE***]-gitea.[***CLUSTER-DOMAIN***]
    curl -sS -o /dev/null -w '%{http_code}\n' https://knox.[***CONSOLE-DOMAIN***]

    Any HTTP status code means that the host is reachable. An error such as Could not resolve host or Connection timed out means that the agent host cannot reach it.

  4. If a hostname does not resolve, fix the DNS configuration for the Anywhere Cloud cluster.
  5. If a connection times out, ask your network administrator to allow outbound HTTPS from the agent hosts to these hostnames.
    See Network requirements.
  6. Restart the CMA Agent service in Cloudera Manager.
    The agent connects to the Cloudera Migration Assistant engine, and its status changes to ONLINE on the Instances tab.

Agent on Cloudera Base on premises cluster does not trust certificate

When an agent registers, Cloudera Migration Assistant sends it the CA certificate of the Anywhere Cloud platform, and the agent adds the certificate to its truststore. If the agent cannot get the certificate, for example, because it cannot complete the registration, its log shows PKIX path building failed or SSLHandshakeException.

Solution

  1. Fix the registration first.
    See Agent registration token is rejected or expired.
  2. If the certificate error remains after the agent registers, get the CA certificate chain of the Anywhere Cloud platform, in PEM format, from your Anywhere Cloud administrator.
  3. Copy the PEM file to each agent host, in a directory that the agent can read.
  4. In Cloudera Manager, set Agent CA Certificate File of the CMA Agent service to the path of the PEM file.
  5. Restart the CMA Agent service.

Agent on Anywhere Cloud cluster restarts repeatedly

An agent that runs as a Cloudera Migration Assistant Agent engine signs in through the Anywhere Cloud authentication service when it starts. If the agent pod does not trust the internal certificate authority of Anywhere Cloud, the agent stops at startup, and Kubernetes restarts the pod repeatedly. The log of the agent pod shows PKIX path building failed.

Solution

  1. Check the log of the agent pod:
    kubectl -n [***AGENT-NAMESPACE***] get pods
    kubectl -n [***AGENT-NAMESPACE***] logs [***AGENT-POD-NAME***] --previous
  2. If the log shows PKIX path building failed, collect the diagnostic bundle of the Anywhere Cloud cluster.
    See Collecting diagnostics and logs.
  3. Contact Cloudera Support, and attach the bundle.

Agent did not complete its registration

An agent outside the Anywhere Cloud cluster cannot connect until it has registered with a valid registration token.

Solution

If the agent stays Pending or shows Expired on the Registration tab, see Agent registration token is rejected or expired.

An agent that runs against a Cloudera on cloud Data Lake cluster also needs the access key and the environment name that it uses for Cloudera on cloud. Check them in the configuration of the agent, and see Registering agents on Cloudera on cloud Data Lakes.