Closed mitchellmaler closed 6 years ago
The endpoint
parameter is just a host and port. Try something like ...
-file="s3://key:token@consul-backups/consul_kvs.bak?region=default&endpoint=minio.endpoint.com&secure=false"
That will attempt an HTTP based connection to minio.endpoint.com
on port 80. If you're minio instance uses a different port you will need to specify it in the endpoint parameter.
I just tried it without the http:// and with secure=fase and I am still getting the same issue. It seems to still be trying an https/443 connection
...&endpoint=minio.endpoint.com&secure=false"
I can see it is returning the error below which has
caused by: Put https://minio.endpoint.com/: dial tcp 10.160.7.199:443: connect: connection refused
I also tried specifying port 80 and it still tried the https protocol.
caused by: Put https://minio.endpoint.com:80/: read tcp 10.1.0.147:40886->10.160.7.199:80: read: connection reset by peer
This is all with the &secure=false
So, I think I picked a really bad name for that parameter when reading the code:
https://github.com/myENA/consul-backinator/blob/v1.6.4/common/s3util.go#L105-L113
That will disable ssl/https if secure
is set to true
... that's probably the exact opposite intent. I'll make a change to switch that logic.
Please test the latest master branch and let me know if this corrects the behavior. Please re-open the issue if it does not.
I can also roll a new release if needed.
Ah that makes more sense! yea it defiantly is a bit confusing. I looked at the code and just checking for false looks good but I am not sure if that is my underlying issue.
It is now using http and port 80 but I am still getting the error. Looking at it a bit closely it seems to be trying to hit the DNS of http://consul-backups.minio.endpoint.com/ on that IP address. Right now our minio server doesn't support DNS based buckets and only path based. I wonder if that is the main issue I am having.
That could be it as well, I can add a path style option as well.
Actually ... I forgot, I have that. It was fixed with PR #42 but it only lives in master:
https://github.com/myENA/consul-backinator/blob/master/common/s3util.go#L118-L126
I'll roll a new release.
Ah awesome!! thanks
Done, v1.6.5 contains this fix and the pathstyle addition.
@leprechau That fixed it! Thanks for the quick help!
Np, thank you!
Hello, I am trying to get this to work using Minio as the S3 backend but when I provide all the connection information I am getting an error. I have other things using this minio cluster which is working fine so it makes me think that there is either an issue with the s3 library or my connection string.
Here is my s3 file connection string.