When I mount minio will get error message

What is the problem you are having with rclone?

I want mount minio to windows.
I got error message and it's can't create any file or folder.
ERROR : IO error: AuthorizationHeaderMalformed: The authorization header is malformed; the region is wrong; expecting 'newtaipei-1'.
I make sure my region is newtaipei-1.

Run the command 'rclone version' and share the full output of the command.

rclone v1.59.2

  • os/version: Microsoft Windows 11 Pro 21H2 (64 bit)
  • os/kernel: 10.0.22000.978 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.18.6
  • go/linking: static
  • go/tags: cmount

Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads
-->Yes

Which cloud storage system are you using? (eg Google Drive)

Minio

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone mount aspa:test Z:

The rclone config contents with secrets removed.

[aspa]
type = s3
provider = Minio
access_key_id = vps1-user
secret_access_key = ********
endpoint = https://minio-newtp.aspa.idv.tw:9000
location_constraint = newtaipei-1

A log from the command with the -vv flag

2022/09/26 13:49:55 DEBUG : rclone: Version "v1.59.2" starting with parameters ["rclone" "mount" "-vv" "aspa:test" "Z:"]
2022/09/26 13:49:55 DEBUG : Creating backend with remote "aspa:test"
2022/09/26 13:49:55 DEBUG : Using config file from "C:\\Users\\akong\\AppData\\Roaming\\rclone\\rclone.conf"
2022/09/26 13:49:55 INFO  : S3 bucket test: poll-interval is not supported by this remote
2022/09/26 13:49:55 DEBUG : Network mode mounting is disabled
2022/09/26 13:49:55 DEBUG : Mounting on "Z:" ("aspa test")
2022/09/26 13:49:55 DEBUG : S3 bucket test: Mounting with options: ["-o" "attr_timeout=1" "-o" "uid=-1" "-o" "gid=-1" "--FileSystemName=rclone" "-o" "volname=aspa test"]
2022/09/26 13:49:55 DEBUG : S3 bucket test: Init:
2022/09/26 13:49:55 DEBUG : S3 bucket test: >Init:
2022/09/26 13:49:55 DEBUG : /: Statfs:
2022/09/26 13:49:55 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
2022/09/26 13:49:55 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/09/26 13:49:55 DEBUG : /: >Getattr: errc=0
2022/09/26 13:49:55 DEBUG : /: Readlink:
2022/09/26 13:49:55 DEBUG : /: >Readlink: linkPath="", errc=-40
2022/09/26 13:49:55 DEBUG : /: Getxattr: name="non-existant-a11ec902d22f4ec49003af15282d3b00"
2022/09/26 13:49:55 DEBUG : /: >Getxattr: errc=-40, value=""
The service rclone has been started.
2022/09/26 13:49:55 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/09/26 13:49:55 DEBUG : /: >Getattr: errc=0
2022/09/26 13:49:55 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/09/26 13:49:55 DEBUG : /: >Getattr: errc=0
2022/09/26 13:49:55 DEBUG : /: Opendir:
2022/09/26 13:49:55 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2022/09/26 13:49:55 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2022/09/26 13:49:55 DEBUG : /: >Opendir: errc=0, fh=0x0
2022/09/26 13:49:55 DEBUG : /: Statfs:
2022/09/26 13:49:55 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
2022/09/26 13:49:55 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/09/26 13:49:55 DEBUG : /: >Getattr: errc=0
2022/09/26 13:49:55 DEBUG : /: Releasedir: fh=0x0
2022/09/26 13:49:55 DEBUG : /: >Releasedir: errc=0
2022/09/26 13:49:55 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/09/26 13:49:55 DEBUG : /: >Getattr: errc=0
2022/09/26 13:49:55 DEBUG : /: Opendir:
2022/09/26 13:49:55 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2022/09/26 13:49:55 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2022/09/26 13:49:55 DEBUG : /: >Opendir: errc=0, fh=0x0
2022/09/26 13:49:55 DEBUG : /: Releasedir: fh=0x0
2022/09/26 13:49:55 DEBUG : /: >Releasedir: errc=0
2022/09/26 13:49:55 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/09/26 13:49:55 DEBUG : /: >Getattr: errc=0
2022/09/26 13:49:55 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/09/26 13:49:55 DEBUG : /: >Getattr: errc=0
2022/09/26 13:49:55 DEBUG : /: Opendir:
2022/09/26 13:49:55 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2022/09/26 13:49:55 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2022/09/26 13:49:55 DEBUG : /: >Opendir: errc=0, fh=0x0
2022/09/26 13:49:55 DEBUG : /: Releasedir: fh=0x0
2022/09/26 13:49:55 DEBUG : /: >Releasedir: errc=0
2022/09/26 13:49:58 DEBUG : /autorun.inf: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/09/26 13:49:58 ERROR : /: Dir.Stat error: AuthorizationHeaderMalformed: The authorization header is malformed; the region is wrong; expecting 'newtaipei-1'.
        status code: 400, request id: 17185311F0F63528, host id:
2022/09/26 13:49:58 ERROR : IO error: AuthorizationHeaderMalformed: The authorization header is malformed; the region is wrong; expecting 'newtaipei-1'.
        status code: 400, request id: 17185311F0F63528, host id:
2022/09/26 13:49:58 DEBUG : /autorun.inf: >Getattr: errc=-5
2022/09/26 13:49:58 DEBUG : /autorun.inf: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/09/26 13:49:58 ERROR : /: Dir.Stat error: AuthorizationHeaderMalformed: The authorization header is malformed; the region is wrong; expecting 'newtaipei-1'.
        status code: 400, request id: 17185311F3D70AC6, host id:
2022/09/26 13:49:58 ERROR : IO error: AuthorizationHeaderMalformed: The authorization header is malformed; the region is wrong; expecting 'newtaipei-1'.
        status code: 400, request id: 17185311F3D70AC6, host id:
2022/09/26 13:49:58 DEBUG : /autorun.inf: >Getattr: errc=-5
2022/09/26 13:49:58 DEBUG : /autorun.inf: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/09/26 13:49:58 ERROR : /: Dir.Stat error: AuthorizationHeaderMalformed: The authorization header is malformed; the region is wrong; expecting 'newtaipei-1'.
        status code: 400, request id: 17185311F6C0F6A5, host id:
2022/09/26 13:49:58 ERROR : IO error: AuthorizationHeaderMalformed: The authorization header is malformed; the region is wrong; expecting 'newtaipei-1'.
        status code: 400, request id: 17185311F6C0F6A5, host id:
2022/09/26 13:49:58 DEBUG : /autorun.inf: >Getattr: errc=-5
2022/09/26 13:49:58 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/09/26 13:49:58 DEBUG : /: >Getattr: errc=0
2022/09/26 13:49:58 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/09/26 13:49:58 DEBUG : /: >Getattr: errc=0
2022/09/26 13:49:58 DEBUG : /: Opendir:
2022/09/26 13:49:58 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2022/09/26 13:49:58 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2022/09/26 13:49:58 DEBUG : /: >Opendir: errc=0, fh=0x0
2022/09/26 13:49:58 DEBUG : /: Releasedir: fh=0x0
2022/09/26 13:49:58 DEBUG : /: >Releasedir: errc=0
2022/09/26 13:49:58 DEBUG : /AutoRun.inf: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/09/26 13:49:58 ERROR : /: Dir.Stat error: AuthorizationHeaderMalformed: The authorization header is malformed; the region is wrong; expecting 'newtaipei-1'.
        status code: 400, request id: 17185311F9CB8791, host id:
2022/09/26 13:49:58 ERROR : IO error: AuthorizationHeaderMalformed: The authorization header is malformed; the region is wrong; expecting 'newtaipei-1'.
        status code: 400, request id: 17185311F9CB8791, host id:
2022/09/26 13:49:58 DEBUG : /AutoRun.inf: >Getattr: errc=-5

Hi 汝剛 吳,

Do you see the same if you try something more simple, e.g.

rclone lsd aspa:

if so, then please post the (redacted) output from

rclone lsd aspa: --dump headers
C:\>rclone lsd aspa:
          -1 2022-09-26 16:00:49        -1 test
          -1 2022-09-26 16:00:59        -1 vps1-nextcloud
          -1 2022-09-13 13:47:45        -1 yvonne-nas
C:\>rclone lsd aspa: --dump headers
2022/09/26 16:02:02 NOTICE: Automatically setting -vv as --dump is enabled
2022/09/26 16:02:02 DEBUG : rclone: Version "v1.59.2" starting with parameters ["rclone" "lsd" "aspa:" "--dump" "headers"]
2022/09/26 16:02:02 DEBUG : Creating backend with remote "aspa:"
2022/09/26 16:02:02 DEBUG : Using config file from "C:\\Users\\akong\\AppData\\Roaming\\rclone\\rclone.conf"
2022/09/26 16:02:02 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2022/09/26 16:02:02 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2022/09/26 16:02:02 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/09/26 16:02:02 DEBUG : HTTP REQUEST (req 0xc00083c200)
2022/09/26 16:02:02 DEBUG : GET / HTTP/1.1
Host: minio-newtp.aspa.idv.tw:9000
User-Agent: rclone/v1.59.2
Authorization: XXXX
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20220926T080202Z
Accept-Encoding: gzip

2022/09/26 16:02:02 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/09/26 16:02:02 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/09/26 16:02:03 DEBUG : HTTP RESPONSE (req 0xc00083c200)
2022/09/26 16:02:03 DEBUG : HTTP/1.1 200 OK
Content-Length: 552
Accept-Ranges: bytes
Content-Security-Policy: block-all-mixed-content
Content-Type: application/xml
Date: Mon, 26 Sep 2022 08:02:03 GMT
Server: MinIO
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Origin
Vary: Accept-Encoding
X-Amz-Bucket-Region: newtaipei-1
X-Amz-Request-Id: 17185A46E335CFEE
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block

2022/09/26 16:02:03 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
          -1 2022-09-26 16:00:49        -1 test
          -1 2022-09-26 16:02:03        -1 vps1-nextcloud
          -1 2022-09-13 13:47:45        -1 yvonne-nas
2022/09/26 16:02:03 DEBUG : 4 go routines active

Seems like everything is OK at this level, now try:

rclone lsd aspa:test --dump headers
C:\>rclone lsd aspa:test --dump headers
2022/09/26 17:10:12 NOTICE: Automatically setting -vv as --dump is enabled
2022/09/26 17:10:12 DEBUG : rclone: Version "v1.59.2" starting with parameters ["rclone" "lsd" "aspa:test" "--dump" "headers"]
2022/09/26 17:10:12 DEBUG : Creating backend with remote "aspa:test"
2022/09/26 17:10:12 DEBUG : Using config file from "C:\\Users\\akong\\AppData\\Roaming\\rclone\\rclone.conf"
2022/09/26 17:10:12 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2022/09/26 17:10:12 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2022/09/26 17:10:12 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/09/26 17:10:12 DEBUG : HTTP REQUEST (req 0xc0000dc300)
2022/09/26 17:10:12 DEBUG : GET /test?delimiter=%2F&encoding-type=url&list-type=2&max-keys=1000&prefix= HTTP/1.1
Host: minio-newtp.aspa.idv.tw:9000
User-Agent: rclone/v1.59.2
Authorization: XXXX
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20220926T091012Z
Accept-Encoding: gzip

2022/09/26 17:10:12 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/09/26 17:10:12 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/09/26 17:10:12 DEBUG : HTTP RESPONSE (req 0xc0000dc300)
2022/09/26 17:10:12 DEBUG : HTTP/1.1 400 Bad Request
Content-Length: 381
Accept-Ranges: bytes
Content-Security-Policy: block-all-mixed-content
Content-Type: application/xml
Date: Mon, 26 Sep 2022 09:10:12 GMT
Server: MinIO
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Origin
Vary: Accept-Encoding
X-Amz-Bucket-Region: newtaipei-1
X-Amz-Request-Id: 17185DFEFF92002F
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block

2022/09/26 17:10:12 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/09/26 17:10:12 ERROR : : error listing: AuthorizationHeaderMalformed: The authorization header is malformed; the region is wrong; expecting 'newtaipei-1'.
        status code: 400, request id: 17185DFEFF92002F, host id:
2022/09/26 17:10:12 DEBUG : 4 go routines active
2022/09/26 17:10:12 Failed to lsd with 2 errors: last error was: AuthorizationHeaderMalformed: The authorization header is malformed; the region is wrong; expecting 'newtaipei-1'.
        status code: 400, request id: 17185DFEFF92002F, host id:

Great, this makes it a lot easier to troubleshoot.

I never tried S3, so guessing a bit here based on other forum posts with similar symptoms...

Seems like this situation often occurs when there is a mismatch between the location of the bucket (test), the endpoint (https://minio-newtp.aspa.idv.tw:9000) and the location_constraint (newtaipei-1). So I would naively try checking the location of the bucket and removing either endpoint or location_constraint in the config.

If this doesn't help, then perhaps try reading the above linked forum posts, they may make more sense to you than to me.

Hope this helps, otherwise please let me know then I will ping somebody with more S3 knowledge (thinking on you Jojo).

I has already use qnap to connect and linux s3fs to mount it.It's all ok.
I has try delete location_constraint.It's show the same error.

Hi @asdffdsa, any ideas what may be the issue or how to troubleshoot further ?

fwiw, i have never used location_constraint, might try removing that and test.

Hi Jojo, good to see you and get some sparring

We already tried this:

Other ideas?

If I were in your situation, then I might try this little experiment:

Remove location_constraint from the config and then perform these commands:

rclone touch aspa:test2/testfile --dump headers
rclone lsl aspa:test2 --dump headers

just trying if it makes a difference how the bucket is created, perhaps you already tried?

the remote config you posted, does not use a region?
so can you post the current remote config

and yes, i do see the region in the dump headers.
but need to confirm your current config

please post the settings/configs that are working.
lets compare that to your rclone remote settings.

did you try the combination of
--- use a region
and
--- not use a location_constraint

Hello every friend.
I fix it.

[aspa]
type = s3
provider = Minio
access_key_id = vps1-user
secret_access_key = ********
endpoint = https://minio-newtp.aspa.idv.tw:9000
region = newtaipei-1

Default config is location_constraint.I edit to region it's all ok.
Maybe rclone config need fix generate for minio config.

good, that is what i suggested in the last post.

rclone asks for location_constraint, as sometimes it is required.
so i do not think rclone config needs to be fixed.

Could just for minio this server source?I know maybe other server source is use location_constraint.

you are welcome to open a new issue at rclone's github page.
https://github.com/rclone/rclone/issues

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.