0

I try to run minio in azure gateway mode against/with azurite. I started azurite blob storage emulator and can successfully communicate with the emulator over http://127.0.0.1:10000. now I start minio in azure gateway mode like this:

docker run -p 9000:9000 --name azure-s3 \
 -e "END_POINT=http://127.0.0.1:10000"
 -e "MINIO_ACCESS_KEY=azurestorageaccountname" \
 -e "MINIO_SECRET_KEY=azurestorageaccountkey" \
 minio/minio gateway azure

and I get the following:

Created minio configuration file successfully at /root/.minio

 You are running an older version of Minio released 1 week ago 
 Update: docker pull minio/minio:RELEASE.2018-05-25T19-49-13Z 



Endpoint:  http://172.17.0.3:9000  http://127.0.0.1:9000
AccessKey: azurestorageaccountname 
SecretKey: azurestorageaccountkey 

Browser Access:
   http://172.17.0.3:9000  http://127.0.0.1:9000

Command-line Access: https://docs.minio.io/docs/minio-client-quickstart-guide
   $ mc config host add myazure http://172.17.0.3:9000 azurestorageaccountname azurestorageaccountkey

Object API (Amazon S3 compatible):
   Go:         https://docs.minio.io/docs/golang-client-quickstart-guide
   Java:       https://docs.minio.io/docs/java-client-quickstart-guide
   Python:     https://docs.minio.io/docs/python-client-quickstart-guide
   JavaScript: https://docs.minio.io/docs/javascript-client-quickstart-guide
   .NET:       https://docs.minio.io/docs/dotnet-client-quickstart-guide

If I now try create a bucket in the minio browser I get the following error: Put https://127.0.0.1:10000/azurestorageaccountname/test?restype=container: dial tcp 127.0.0.1:10000: connect: connection refused

I'm confused about that minio try a "https" call, I think that's the error. Any suggestions on that?

Manu Zi
  • 2,300
  • 6
  • 33
  • 67

1 Answers1

0

I tried the following command to connect to an azurite instance running on my system.

docker run -p 9000:9000 -e "MINIO_ACCESS_KEY=devstoreaccount1" -e "MINIO_SECRET_KEY=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" minio/minio gateway azure http://192.168.1.60:10000

I also got a similar error to what you were getting. Internally Minio's Gateway code uses Azure GO SDK to connect to the Azure blob storage. Looking into Azure's Go SDK code, https://github.com/Azure/azure-sdk-for-go/blob/94c47b0ea2e17193737d1d0939d2c7655ba82dd3/storage/client.go#L444 shows you that there is a check for the account name and if it is Storage Emulator Account which it is in the case of Azurite, it will convert the host to 127.0.0.1:10000

There are two options here. You can have both Azurite and Minio run as a binary on the same machine.

Else, you can use docker compose to make sure that the Azurite and Minio gateway are running on the same network.

r1j1m1n1
  • 345
  • 1
  • 4
  • 1
    I have create a docker compose file but I get the same error. Here the file: https://gist.github.com/ManuZiD/0ae8d3d19386aa87908940eadf03d1be – Manu Zi Jun 07 '18 at 20:20
  • I have to take back what I said about docker compose. The only option you have is to run `Azurite` and `Gateway` as a regular binary on same machine and not as containers. This way, the Gateway is able to talk to Azurite. – r1j1m1n1 Jun 08 '18 at 18:26