Skip to content
This repository was archived by the owner on Jul 26, 2022. It is now read-only.
This repository was archived by the owner on Jul 26, 2022. It is now read-only.

S3 plugin: target not writable (The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.) #547

@jldinh

Description

@jldinh

Setting up a backup on S3 fails.
Occurred on Windows 10, with Syncany installed from source. API key has full S3 access.

Debug output:

>sy -d init
debug
Application version: 0.4.8-alpha+SNAPSHOT.1601101227.gitc6e634a
11-1-16 20:54:23.465 | CommandLineClie | main           | INFO : Application ver
sion: 0.4.8-alpha+SNAPSHOT.1601101227.gitc6e634a
11-1-16 20:54:23.568 | Plugins         | main           | INFO : - org.syncany.p
lugins.dropbox.DropboxTransferPlugin
11-1-16 20:54:23.579 | Plugins         | main           | INFO : - org.syncany.p
lugins.gui.GuiPlugin
11-1-16 20:54:23.580 | Plugins         | main           | INFO : - org.syncany.p
lugins.local.LocalTransferPlugin
11-1-16 20:54:23.581 | Plugins         | main           | INFO : - org.syncany.p
lugins.s3.S3TransferPlugin
Choose a storage plugin. Available plugins are: dropbox, local, s3
Plugin: s3

Connection details for s3 connection:
- Access Key: <API key>
- Secret Key (not displayed):
- Bucket: <bucketname>
11-1-16 20:55:32.641 | org.syncany.cli | main           | FINE : Found enum opti
on, values are: ASIA_PACIFIC, ASIA_PACIFIC_NORTHEAST, ASIA_PACIFIC_SINGAPORE, AS
IA_PACIFIC_SOUTHEAST, ASIA_PACIFIC_SYDNEY, ASIA_PACIFIC_TOKYO, EU_FRANKFURT, EU_
IRELAND, EUROPE, GOVCLOUD_FIPS_US_WEST, GOVCLOUD_US_WEST, SOUTH_AMERICA_EAST, SO
UTH_AMERICA_SAO_PAULO, US_WEST, US_WEST_NORTHERN_CALIFORNIA, US_WEST_OREGON, GOO
GLE_US, GOOGLE_ASIA, GOOGLE_EU
- Location, choose from ASIA_PACIFIC, ASIA_PACIFIC_NORTHEAST, ASIA_PACIFIC_SINGA
PORE, ASIA_PACIFIC_SOUTHEAST, ASIA_PACIFIC_SYDNEY, ASIA_PACIFIC_TOKYO, EU_FRANKF
URT, EU_IRELAND, EUROPE, GOVCLOUD_FIPS_US_WEST, GOVCLOUD_US_WEST, SOUTH_AMERICA_
EAST, SOUTH_AMERICA_SAO_PAULO, US_WEST, US_WEST_NORTHERN_CALIFORNIA, US_WEST_ORE
GON, GOOGLE_US, GOOGLE_ASIA, GOOGLE_EU (US_WEST): EU_FRANKFURT
- Alternative S3-compatible endpoint, overrides location (optional, default is n
one):
11-1-16 20:56:03.786 | org.syncany.plu | main           | FINE : Validating requ
ired fields
11-1-16 20:56:03.786 | org.syncany.cli | main           | INFO : Settings are S3
TransferSettings{accessKey=<API key>, secretKey=<API secret>
<API secret (continued)>, bucket=<bucketname>, location=EU_FRANKFURT, endpoint=nu
ll}
11-1-16 20:56:04.236 | AbstractInitOpe | main           | INFO :
11-1-16 20:56:04.236 | AbstractInitOpe | main           | INFO : Running 'Init'
11-1-16 20:56:04.236 | AbstractInitOpe | main           | INFO : ---------------
-----------------------------
11-1-16 20:56:04.237 | org.syncany.plu | main           | FINE : Validating requ
ired fields
11-1-16 20:56:04.278 | TransferManager | main           | INFO : - With feature
ReadAfterWriteConsistent
11-1-16 20:56:04.279 | TransferManager | main           | FINE : - Checking if s
elected features supported ...
11-1-16 20:56:04.281 | TransferManager | main           | FINE : - Checking for
duplicate features ...
11-1-16 20:56:04.282 | TransferManager | main           | FINE : - Checking requ
ired feature TransactionAware in S3TransferManager ...
11-1-16 20:56:04.285 | TransferManager | main           | FINE : - Checking requ
ired feature Retriable in S3TransferManager ...
11-1-16 20:56:04.285 | TransferManager | main           | FINE : - Wrapping Tran
sferManager S3TransferManager in ReadAfterWriteConsistentFeatureTransferManager
11-1-16 20:56:04.286 | AbstractTransfe | main           | INFO : Performing stor
age test TM.test() ...
11-1-16 20:56:04.287 | AbstractTransfe | main           | INFO : - Running conne
ct() ...
11-1-16 20:56:04.316 | S3TransferManag | main           | INFO : Using Amazon S3
 endpoint, setting location.
11-1-16 20:56:05.197 | S3TransferManag | main           | INFO : testTargetExist
s: Target exists.
11-1-16 20:56:05.198 | S3TransferManag | main           | FINE : - Uploading to
bucket <bucketname>: StorageObject [key=syncany-test-write, lastModified=nul
l, dataInputStream=java.io.ByteArrayInputStream@616fe72b, Metadata={Content-Leng
th=3, Content-Type=application/x-syncany}] ...
11-1-16 20:56:05.521 | S3TransferManag | main           | INFO : testTargetCanWr
ite: Cannot check write status for bucket.
org.jets3t.service.ServiceException: Service Error Message. -- ResponseCode: 400
, ResponseStatus: Bad Request, XML Error Message: <?xml version="1.0" encoding="
UTF-8"?><Error><Code>InvalidRequest</Code><Message>The authorization mechanism y
ou have provided is not supported. Please use AWS4-HMAC-SHA256.</Message><Reques
tId>69FC1755B4ED437F</RequestId><HostId>HdW2uP/wZ/+GcL+lSJHXpR5j8QZZhtJkUjub6erx
+kTHW74yxqPNQSv1dOhXaDdWfHZO6Cp81Xw=</HostId></Error>
        at org.jets3t.service.impl.rest.httpclient.RestStorageService.performReq
uest(RestStorageService.java:401)
        at org.jets3t.service.impl.rest.httpclient.RestStorageService.performReq
uest(RestStorageService.java:265)
        at org.jets3t.service.impl.rest.httpclient.RestStorageService.performRes
tPut(RestStorageService.java:1019)
        at org.jets3t.service.impl.rest.httpclient.RestStorageService.createObje
ctImpl(RestStorageService.java:1830)
        at org.jets3t.service.impl.rest.httpclient.RestStorageService.putObjectW
ithRequestEntityImpl(RestStorageService.java:1751)
        at org.jets3t.service.impl.rest.httpclient.RestStorageService.putObjectI
mpl(RestStorageService.java:1743)
        at org.jets3t.service.StorageService.putObject(StorageService.java:840)
        at org.syncany.plugins.s3.S3TransferManager.testTargetCanWrite(S3Transfe
rManager.java:383)
        at org.syncany.plugins.transfer.AbstractTransferManager.test(AbstractTra
nsferManager.java:83)
        at org.syncany.plugins.transfer.features.ReadAfterWriteConsistentFeature
TransferManager.test(ReadAfterWriteConsistentFeatureTransferManager.java:127)
        at org.syncany.operations.init.InitOperation.performRepoTest(InitOperati
on.java:184)
        at org.syncany.operations.init.InitOperation.execute(InitOperation.java:
82)
        at org.syncany.cli.InitCommand.execute(InitCommand.java:68)
        at org.syncany.cli.CommandLineClient.runLocally(CommandLineClient.java:3
92)
        at org.syncany.cli.CommandLineClient.runCommand(CommandLineClient.java:3
82)
        at org.syncany.cli.CommandLineClient.start(CommandLineClient.java:198)
        at org.syncany.Syncany.main(Syncany.java:52)
11-1-16 20:56:05.787 | S3TransferManag | main           | INFO : testRepoFileExi
sts: Retrieving repo file list does not exit.
org.jets3t.service.S3ServiceException: Service Error Message. -- ResponseCode: 4
00, ResponseStatus: Bad Request, XML Error Message: <?xml version="1.0" encoding
="UTF-8"?><Error><Code>InvalidRequest</Code><Message>The authorization mechanism
 you have provided is not supported. Please use AWS4-HMAC-SHA256.</Message><Requ
estId>F85455D270E0596C</RequestId><HostId>mwrzyxMoRQtyuTylFG5j3SKiSm2mTeTj8cBrHI
B9a/SHPS+0YQfKSz0hGe3hzuTybQcRHJiIbo8=</HostId></Error>
        at org.jets3t.service.S3Service.listObjects(S3Service.java:1430)
        at org.jets3t.service.S3Service.listObjects(S3Service.java:85)
        at org.syncany.plugins.s3.S3TransferManager.testRepoFileExists(S3Transfe
rManager.java:438)
        at org.syncany.plugins.transfer.AbstractTransferManager.test(AbstractTra
nsferManager.java:84)
        at org.syncany.plugins.transfer.features.ReadAfterWriteConsistentFeature
TransferManager.test(ReadAfterWriteConsistentFeatureTransferManager.java:127)
        at org.syncany.operations.init.InitOperation.performRepoTest(InitOperati
on.java:184)
        at org.syncany.operations.init.InitOperation.execute(InitOperation.java:
82)
        at org.syncany.cli.InitCommand.execute(InitCommand.java:68)
        at org.syncany.cli.CommandLineClient.runLocally(CommandLineClient.java:3
92)
        at org.syncany.cli.CommandLineClient.runCommand(CommandLineClient.java:3
82)
        at org.syncany.cli.CommandLineClient.start(CommandLineClient.java:198)
        at org.syncany.Syncany.main(Syncany.java:52)
11-1-16 20:56:05.789 | AbstractInitOpe | main           | INFO : Storage test re
sult ist StorageTestResult [targetExists=true, targetCanConnect=true, targetCanC
reate=true, targetCanWrite=false, repoFileExists=false]
11-1-16 20:56:05.790 | AbstractInitOpe | main           | INFO : --> NOT OKAY: I
nvalid target/repo state. Operation cannot be continued.
11-1-16 20:56:05.790 | AbstractInitOpe | main           | INFO : - Connecting to
 the repo failed, repo already exists or cannot be created: NOK_TEST_FAILED

ERROR: Repository cannot be initialized, because the target is not writable. Thi
s is probably
       a permission issue (does the user have write permissions to the target?).


Details:
- Target connect success: true
- Target exists:          true
- Target creatable:       true
- Target writable:        false
- Repo file exists:       false

Connection failure

Would you change the settings and retry the connection (y/n)?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions