[
https://issues.apache.org/jira/browse/HDDS-9768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17789470#comment-17789470
]
Attila Doroszlai commented on HDDS-9768:
----------------------------------------
Thanks [~montura] for trying Ozone.
The pseudo cluster run in Docker Compose exposes ports to the host. There are
3 datanodes, all of which use the same port inside the container. These are
mapped on the host to different random ports, assigned by Docker Compose.
Ozone is not aware of these assignments. So when you try to write a key from
outside Docker Compose, it will look for the datanodes' ports as defined inside
the containers (9858). Creating volumes and buckets works fine, because there
is only one OM in your cluster, and its internal port can be mapped to the same
port on your host.
There are a few ways to solve this:
# Run your client in one of the Docker containers part of the cluster.
# Run Ozone on your host without using Docker Compose. Ozone source code comes
with run configurations for IDEA (see the wiki page describing how to [Run
Ozone cluster from
IDE|https://cwiki.apache.org/confluence/display/OZONE/Run+Ozone+cluster+from+IDE]
for usage information).
# Run the pseudo cluster with a single datanode ({{OZONE_REPLICATION_FACTOR=1
./run.sh}}). Before starting the cluster, edit {{docker-compose.yaml}} to map
datanode's ports to the same values on the host, replacing random mapping.
> Can't write file with OzoneClient RPC
> -------------------------------------
>
> Key: HDDS-9768
> URL: https://issues.apache.org/jira/browse/HDDS-9768
> Project: Apache Ozone
> Issue Type: Bug
> Affects Versions: 1.4.0
> Environment: {*}OS{*}: Ubuntu 22.04.3 LTS, {*}Arch{*}: 64-bit,
> {*}Processor{*}: Intel Core i7-9750H CPU 2.6GHz x 12
> {*}OS{*}: Mac OS Ventura 13.2, {*}Arch{*}: 64-bit, {*}Processor{*}: Intel
> Core i9 CPU 2.3GHz x 8
> Reporter: Andrei Mikhalev
> Priority: Major
> Attachments: err.log, om.log
>
>
> Try to wite a key following the docs
> ([https://ozone.apache.org/docs/1.3.0/interface/javaapi.html)]
> # Build apache/ozone locally as specified in
> [https://github.com/apache/ozone/blob/master/CONTRIBUTING.md#build-the-project]
> # Install local build to local maven (.m2)
> # Run pseudo cluster
> [https://github.com/apache/ozone/blob/master/CONTRIBUTING.md#running-ozone-in-docker]
> # Run sample to a key ([https://github.com/Montura/ozone_test_client])
>
> Faced with problems: _OzoneOutputStream_ couldn't be closed, wait in
> _RatisBlockOutputStream::waitOnFlushFutures()_
> !https://user-images.githubusercontent.com/4503006/285421762-3b866f47-eb5e-4c1b-9f55-523ee30f78d7.png|width=958,height=260!
> _Sample output is attatched:_ *err.log*
> _Ozone manager log:_ *om.log*
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]