Closed philxia closed 8 years ago
time="2015-11-25T15:58:50+08:00" level=error msg="Unknown region in authorizatio n header." Error={Invalid region *errors.errorString [{81 C:/mygo/src/github.com /minio/minio/api-signature.go main.isValidRegion map[]} {89 C:/mygo/src/github.c om/minio/minio/api-signature.go main.stripAccessKeyID map[]} {108 C:/mygo/src/gi thub.com/minio/minio/api-signature.go main.initSignatureV4 map[]} {84 C:/mygo/sr c/github.com/minio/minio/signature-handler.go main.signatureHandler.ServeHTTP ma p[]}] map[host.os:windows host.arch:amd64 host.name:SHA2UA0151LHQ host.cpus:8 me m.heap.total:3.0MB host.lang:go1.5.1 mem.used:2.2MB mem.total:6.1MB mem.heap.use d:2.2MB]}
Recently minio server moved its region from default 'milkyway' to 'us-east-1' . Looks like you are using published dotnet package? I haven't published new changes yet which were done to this repo recently.
Can you clone this repo and try again?
I have published an updated nuget package. Can you update and try again?
Thanks for replying. I tried both this repo (sync to head) and nuget pckage (Successfully installed 'Minio 0.2.1' to Test), but still get the same error.
I tried both this repo (sync to head) and nuget pckage (Successfully installed 'Minio 0.2.1' to Test), but still get the same error.
@philxia - here is the snippet of the code that i tried with both master and nuget package with server https://github.com/minio/minio
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Minio;
using Minio.Xml;
namespace Minio.Examples
{
class ListBuckets
{
static int Main(string[] args)
{
var client = new MinioClient("http://localhost:9000", "WLGDGYAQYIGI833EV05A", "BYvgJM101sHngl2uzjXS/OBF/aMxAN06JrJ3qJlF");
var buckets = client.ListBuckets();
foreach (Bucket bucket in buckets)
{
Console.Out.WriteLine(bucket.Name + " " + bucket.CreationDateDateTime);
}
return 0;
}
}
}
$ mono Minio.Examples/ListBuckets.exe
newbucket 11/23/2015 5:49:58 AM
testbucket 11/21/2015 5:39:18 PM
Which version of server are you using?
Minio server version is "2015-11-14T09:02:54Z", and I stepped into the code and get the error message as below. Any clue?
AuthorizationHeaderMalformed
Minio server version is "2015-11-14T09:02:54Z", and I stepped into the code and get the error message as below. Any clue?
Now i know what the issue is, we recently changed server to use "us-east-1" instead of "milkyway" so the current version of the library is incompatible with the released binaries. Will be building new versions of the server soon.
You should use '0.2.0' version which should work properly. Here is how i tested locally.
$ mkdir newproj
$ cd newproj
$ mono nuget.exe install minio -Version 0.2.0
$ mcs /r:Minio.0.2.0/lib/net45/Minio.dll ListBuckets.cs
$ export MONO_PATH=Minio.0.2.0/lib/net45:RestSharp.105.1.0/lib/net45
$ mono ListBuckets.exe
newbucket 11/23/2015 5:49:58 AM
testbucket 11/21/2015 5:39:18 PM
Let me know if you see the same issue.
Awesome! Works like a charm. Thank you very much.
I setup the minio server and client at 2 windows machines separately, start the minio server at machine-A, and try the mc.exe in another machine-B to connect it with the credential, it works as expected, like list bucket, and upload file. I tried the .net sample test to list bucket or checking if the bucket exist, always got a bad request exception. I checked the console output of minio server and it said - time="2015-11-25T15:58:50+08:00" level=error msg="Unknown region in authorizatio n header." Error={Invalid region *errors.errorString [{81 C:/mygo/src/github.com /minio/minio/api-signature.go main.isValidRegion map[]} {89 C:/mygo/src/github.c om/minio/minio/api-signature.go main.stripAccessKeyID map[]} {108 C:/mygo/src/gi thub.com/minio/minio/api-signature.go main.initSignatureV4 map[]} {84 C:/mygo/sr c/github.com/minio/minio/signature-handler.go main.signatureHandler.ServeHTTP ma p[]}] map[host.os:windows host.arch:amd64 host.name:SHA2UA0151LHQ host.cpus:8 me m.heap.total:3.0MB host.lang:go1.5.1 mem.used:2.2MB mem.total:6.1MB mem.heap.use d:2.2MB]}
Do i miss anything? Thanks in advance.