Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid endpoint #238

Closed
DeepSnowNeeL opened this issue Sep 4, 2018 · 9 comments
Closed

Invalid endpoint #238

DeepSnowNeeL opened this issue Sep 4, 2018 · 9 comments

Comments

@DeepSnowNeeL
Copy link

Hello i'm trying to use minio on docker containers, and I usually use docker names as hostnames since it resolves correctly with the docker DNS system.

But I can't because I got this exception :
Minio.Exceptions.InvalidEndpointException: 'Minio API responded with message=Endpoint: minio_recette does not follow ip address or domain name standards.'

I use both the java & c# api for minio, and solved my problem on the java side by using http://minio_recette:9000 as my endpoint, but the c# doesn't allow for "/" in the endpoint.

Could you please support simple names, for docker containers ? Thanks

I'm still trying to find a way around this...

@poornas
Copy link
Contributor

poornas commented Sep 4, 2018

@DeepSnowNeeL, init the c# client like this and it should work.

private static MinioClient minio = new MinioClient("minio_recette:9000",
                "accesskey",
                "secretkey"
                );

@DeepSnowNeeL
Copy link
Author

DeepSnowNeeL commented Sep 4, 2018

It doesn't, i even tried using the network name like "minio_recette.my_network:9000" with or without the port I get the same exception

PS : You can try the endpoints without having the server running, the exception pops up.

Edit:

Things I tried :
"minio_recette"
"minio_recette:9000"
"minio_recette.my_network"
"minio_recette.my_network:9000"
"http://minio_recette"
"http://minio_recette:9000"

Right now i'm going for "192.168.0.6" which is my container ip on the docker network, I hope at least this works.

This is strange because I use "http://localhost:9010" locally and it worked, the difference is that i'm on windows, and I have a minio container with port forwarding and on the server its a debian and it's 2 containers (one for c# the other for minio) they are on the same docker network but minio crashes

@poornas
Copy link
Contributor

poornas commented Sep 4, 2018

@DeepSnowNeeL, my mistake - we need a proper ip address or endpoint url.Will check on this feature request and let you know.

@DeepSnowNeeL
Copy link
Author

Great :)
Please make it work for the java API as well. (and others ?)

Btw, It works when I specify the IP directly so I'll use that for now

@WolfspiritM
Copy link
Contributor

WolfspiritM commented Sep 24, 2018

This is causing us issues aswell.
With docker this is definitely needed as docker distincts stacks based on stackname_servicename.

Also underscore can be a valid part of a DNS name. See (https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names):

While a hostname may not contain other characters, such as the underscore character (_), other DNS names may contain the underscore

As you don't know what the primary DNS suffix is, a host with underscore should be allowed.

Something like that is valid as a domain according to wikipedia:
storage_proxy(.domain.com)

Related Regex that is not checking for underscores:

Regex validLabel = new Regex("^[a-zA-Z0-9]([A-Za-z0-9-]*[a-zA-Z0-9])?$");

@deekoder
Copy link

We are welcoming PRs for this since we currently don't have the cycles to take this on atm. Would @WolfspiritM or @DeepSnowNeeL if you want to send PR, we'd be really glad.

@leeroya
Copy link

leeroya commented Dec 23, 2018

For the dotnet project, I am using I used only the IP: Port configuration i.e. "127.0.0.1:9000".

@deekoder deekoder modified the milestones: Current, Future Jan 29, 2019
@deekoder
Copy link

Will address in the future. As mentioned earlier, we will reactivate this into current milestone when we are done with current priorities.

@mangrer
Copy link

mangrer commented Feb 23, 2021

I see the issue was reported closed? Have there been any updates or workaround figured for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants