Getting NULL error during connection test with the S3 bucket?

It was working for me on version 4.2.2 but stopped working after upgrade

until 4.2.2 - S3 was supported via JCloud library

 

From 4.3.0 onwards - S3 is supported via JetS3t library

 

During the initial restart of Artifactory with the S3 provider, there is a process of checking the connection with the bucket which includes uploading a test blob and then downloading it and deleting it.

For varied S3 internal providers this process might fail though bucket exists.

The logs will show a failure on the process on PUT request of the test blob:

[art-init] [DEBUG] (o.a.a.f.t.j.s.S3JetS3tBinaryProvider:236) - Starting to add item '78ea69964989af6fd7953bab4358d892163fc006' bucket 'mybucket' to s3

art-init] [ERROR] (o.a.a.f.t.j.s.S3JetS3tBinaryProvider:253) - null

 

By default, JetS3 always incorporates bucket names that are DNS-compatible into the host name of its requests.

For example, a request directed at the bucket named "mybucket" will be sent to the host name like this: "mybucket.s3.amazonaws.com". 

On the other hand, JCloud use the following convention when sending requests to the bucket : 'http://s3.amazonaws.com/mybucket'.

 

It might be that the convention of the provider you are using (which explain why it was working on 4.2.2) is the last one.

In this case you will need to add to your storage.properties file the following entry:

 

binary.provider.s3.env.s3service.disable-dns-buckets=true

 

(to change to the convention to 'http://s3.amazonaws.com/mybucket')

 

Here is more on the subject from the JetS3t library.