Hadoop to Ozone Connection Troubleshooting Guide
In this article
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, orcurl. - If Ozone runs in a separate cluster, network access to its hosts and ports.
Step-by-Step
- Verify Ozone services are actually running.
SSH to the Ozone leader (or use the Ozone admin CLI) and runozone admin cluster infoor 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. - Check the Ozone service addresses in your Hadoop configuration.
Incore-site.xmlon the client, confirmozone.om.addresspoints to the correct Ozone Manager host and port (default 9862). Also verifyozone.scm.namesandozone.scm.datanode.addressinozone-site.xml. A typo here is the most common cause. - Test network connectivity from the client to Ozone.
From the machine running your Hadoop job, usetelnet <OM-host> 9862andtelnet <SCM-host> 9861. If telnet fails, check firewalls, security groups, and whether the hosts are reachable viaping. - Verify Hadoop's Ozone filesystem is enabled.
Incore-site.xml, ensurefs.ozone.implis set toorg.apache.hadoop.fs.ozone.OzoneFileSystemand thatfs.AbstractFileSystem.ozone.implis set toorg.apache.hadoop.fs.ozone.OzoneFs. Without these, Hadoop won't recognize theo3fs://orofs://scheme. - Check for Kerberos or authentication issues.
If Ozone is secured, your application must have a valid Kerberos ticket. Runklistto see if a ticket exists, andkinitto renew it. Also verify the principal names inozone-site.xml(e.g.,ozone.om.kerberos.principal). - Inspect Ozone logs for errors.
On the Ozone Manager host, checkozone-om.logfor 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. - Test with a simple Ozone command.
Use the Ozone shell (if available) to runozone sh bucket list /orozone 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. - 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/pathorofs://, nothdfs://. - 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=DEBUGin 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 shcommands—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.timeoutandozone.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 getaclandozone 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_PROXYfor 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.