Unclear how to troubleshoot connection to Docker image #801
Labels
No labels
action
check-aws
action
discussion-needed
action
for-external-contributors
action
for-newcomers
action
more-info-needed
action
need-funding
action
triage-required
kind
correctness
kind
ideas
kind
improvement
kind
performance
kind
testing
kind
usability
kind
wrong-behavior
prio
critical
prio
low
scope
admin-api
scope
background-healing
scope
build
scope
documentation
scope
k8s
scope
layout
scope
metadata
scope
ops
scope
rpc
scope
s3-api
scope
security
scope
telemetry
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#801
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As my dev machine runs MacOS rather than linux, I tried following the instructions at https://garagehq.deuxfleurs.fr/documentation/quick-start/ but substituting the Docker image for a binary.
The last config file I tried is
I tried several variations on network addresses, but they all suffer the problem below.
/etc/garage.toml, /var/lib/garage/meta and /var/lib/garage/data on my dev machine are all owned by me.
I can create a container so:
The image starts up and the log includes
so it appears to running properly.
I create an alias so:
alias garage="docker exec -ti garaged /garage"
and
garage status
returnsI can create and apply a cluster layout:
I can use the command line to create a bucket and API key, and give the key permission to use the bucket:
I can set environment variables for AWSCLI:
But AWSCLI can't access Garage via the S3 API:
With appropriate configuration, I can use AWSCLI to access a Min.IO server running locally.
Also, I have a Node.JS app, which, when properly configured, can access the Min.IO server. When I use the AWS configuration above for Garage, I get:
I've been through all this, using localhost or http://[::]:3900 as the endpoint, but all fail with the above errors.
Is there a guide to troubleshooting connection issues?
Hello, I think your issue is that you are using
--network host
, which is not supported under mac os. You should instead try forwarding ports individually using the--port
argument.Thanks, but creating the container with
only results in different error messages. AWSCLI returns
Connection was closed before we received a valid response from endpoint URL: "http://localhost:3900/"
and my Node.JS app gets
Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
FWIW, when I use
alias garage="docker exec -ti garaged /garage"
to rungarage bucket list
, I see some messages in the log, starting withINFO garage_net::netapp: Accepted connection from 75b6268c2b8f3587 at 127.0.0.1:49370
When I try to use AWSCLI to connect, I don't see anything whatsoever in the log, even when I set
RUST_LOG=garage=trace
Do I need to rebuild the image, after editing the Dockerfile to assert that the image uses the various ports?
You might need to set
api_bind_addr = "[::]:3900"
in your config file to allow connctions arriving through the Docker port forward.Yep, one needs to leave the network addresses as
[::]:3900
but change--network host
to-p 3900:3900 -p 3901:3901 -p 3902:3902 -p 3903:3903
.I've submitted a doc PR for this: #803