Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Hadoop to Ozone Connection Troubleshooting Guide

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

When your Hadoop applications suddenly can't reach Apache Ozone, jobs fail with connection errors, timeouts, or "bucket not found" exceptions. This guide walks you through the systematic process of diagnosing and fixing connectivity issues between Hadoop clients and Ozone services. You'll learn to check configuration, network, service health, and permissions—in the order that resolves most problems fastest.

What You'll Need

  • Access to the Hadoop cluster where your application runs (or at least the client machine).
  • Access to the Ozone cluster's configuration files (ozone-site.xml, core-site.xml, hdfs-site.xml).
  • Basic command-line skills and the ability to run commands like ping, telnet, or curl.
  • If Ozone runs in a separate cluster, network access to its hosts and ports.

Step-by-Step

  1. Verify Ozone services are actually running.
    SSH to the Ozone leader (or use the Ozone admin CLI) and run ozone admin cluster info or check the web UIs (default ports: 9874 for Ozone Manager, 9876 for Storage Container Manager). If services are down, start them and re-test your application.
  2. Check the Ozone service addresses in your Hadoop configuration.
    In core-site.xml on the client, confirm ozone.om.address points to the correct Ozone Manager host and port (default 9862). Also verify ozone.scm.names and ozone.scm.datanode.address in ozone-site.xml. A typo here is the most common cause.
  3. Test network connectivity from the client to Ozone.
    From the machine running your Hadoop job, use telnet <OM-host> 9862 and telnet <SCM-host> 9861. If telnet fails, check firewalls, security groups, and whether the hosts are reachable via ping.
  4. Verify Hadoop's Ozone filesystem is enabled.
    In core-site.xml, ensure fs.ozone.impl is set to org.apache.hadoop.fs.ozone.OzoneFileSystem and that fs.AbstractFileSystem.ozone.impl is set to org.apache.hadoop.fs.ozone.OzoneFs. Without these, Hadoop won't recognize the o3fs:// or ofs:// scheme.
  5. Check for Kerberos or authentication issues.
    If Ozone is secured, your application must have a valid Kerberos ticket. Run klist to see if a ticket exists, and kinit to renew it. Also verify the principal names in ozone-site.xml (e.g., ozone.om.kerberos.principal).
  6. Inspect Ozone logs for errors.
    On the Ozone Manager host, check ozone-om.log for exceptions like "Connection refused" or "Bucket not found". On the client side, look at the Hadoop job logs for stack traces—they often point to the exact missing configuration.
  7. Test with a simple Ozone command.
    Use the Ozone shell (if available) to run ozone sh bucket list / or ozone sh key list <volume>/<bucket>. If this works, the issue is in your Hadoop application's configuration; if it fails, the problem is in Ozone itself.
  8. Check for version compatibility.
    Ensure your Hadoop client version is compatible with the Ozone server version. Mismatched versions (e.g., Hadoop 3.3 with Ozone 1.1) can cause protocol errors. Consult the official compatibility matrix and upgrade/downgrade as needed.

Common Mistakes

  • Using the wrong URI scheme – Hadoop applications must use o3fs://bucket.volume/path or ofs://, not hdfs://.
  • Forgetting to include Ozone jars – The client classpath must include Ozone's Hadoop client jars (e.g., ozone-filesystem-hadoop3). If missing, you'll get ClassNotFoundException.
  • Pointing to a load balancer that isn't configured for Ozone – If you use a proxy, ensure it forwards to the correct OM/SCM ports.
  • Ignoring DNS resolution – Hostnames in configs must resolve from the client. Test with nslookup.
  • Assuming SCM and OM are on the same host – They can be separate; verify each address.

Tips

  • Use the Ozone web UI to confirm the cluster is healthy before debugging your app.
  • Enable debug logging for the Ozone client by setting log4j.logger.org.apache.hadoop.ozone=DEBUG in your client's log4j properties.
  • If you're using Docker or Kubernetes, check that service discovery names (like om-service) resolve correctly.
  • For quick tests, use ozone sh commands—they bypass Hadoop and isolate the problem.
  • Keep a backup of your working configuration; compare with the current one using diff.

Troubleshooting

If the steps above don't resolve the issue:

  • Still failing after config check? Try running your application from a different client machine. If it works there, the issue is local to the original machine (e.g., missing jars or DNS).
  • Timeouts? Increase the socket timeout in ozone-site.xml (ozone.client.connection.timeout and ozone.client.read.timeout) temporarily to see if the connection completes slowly.
  • Permission errors? Even if you can connect, the application might lack access to the volume/bucket. Check Ozone ACLs with ozone sh volume getacl and ozone sh bucket getacl.
  • Check for network proxies – If your Hadoop client uses a proxy for HDFS, it might also try to proxy Ozone traffic. Set NO_PROXY for Ozone hosts.
  • Look at the SCM logs – Sometimes the OM is fine but SCM rejects the client due to pipeline issues. Search for "pipeline" or "container" errors.
  • If all else fails, restart Ozone services – A rolling restart of OM and SCM can clear transient state issues. Do this during a maintenance window.

Frequently Asked Questions

Why does my job fail with "Bucket not found" when the bucket exists?

This usually means the client is connecting to a different Ozone cluster than you think. Verify the ozone.om.address in your client's config points to the same OM that hosts the bucket. Also check that the volume and bucket names are spelled correctly, including case sensitivity.

Can I use the HDFS shell to access Ozone?

No, the HDFS shell (hdfs dfs) is for HDFS. Use the Ozone shell (ozone sh) or the Hadoop FS shell with the o3fs:// scheme, e.g., hadoop fs -ls o3fs://bucket.volume/.

What ports need to be open for Ozone to work with Hadoop?

Default ports: Ozone Manager RPC 9862, SCM RPC 9861, datanode RPC 9857, and SCM datanode port 9856. Also, the Ozone UI ports (9874 for OM, 9876 for SCM) if you access them. Ensure your firewall allows these from the Hadoop client.

Why do I get a ClassNotFoundException for OzoneFileSystem?

Your Hadoop client classpath is missing the Ozone filesystem jars. Add the Ozone client jars (e.g., from the Ozone distribution's share/hadoop/ozone directory) to your application's classpath, or set HADOOP_CLASSPATH to include them.

Is it possible to run Hadoop and Ozone on the same cluster?

Yes, Ozone can be deployed on the same nodes as HDFS, but they are separate services. Make sure they don't conflict on ports (HDFS NameNode uses 8020, Ozone OM uses 9862). You can run both, but it's more common to run Ozone on a separate cluster for isolation.

How do I know which Ozone version I'm running?

Run ozone version on the Ozone host, or check the web UI's footer. On the client side, you can check the jar version with hadoop jar ozone-filesystem-hadoop3.jar or by looking at the manifest of the Ozone client jar.