Azure / azurefile-dockervolumedriver

Docker Volume Driver for Azure File Service over SMB/CIFS :whale:
Apache License 2.0
169 stars 55 forks source link

docker volume create error #73

Closed TamasSzerb closed 8 years ago

TamasSzerb commented 8 years ago
sudo docker volume create -d azurefile -o share=myshare
Error response from daemon: create 5f6ae538d5df212a394b243fc3b1676070743813c4721e523aca36b33662a75c: VolumeDriver.Create: error creating azure file share: storage: service returned error: StatusCode=403, ErrorCode=AuthenticationFailed, ErrorMessage=Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:88ce1da0-001a-003b-24aa-36168a000000
Time:2016-11-04T14:46:47.3928182Z, RequestId=88ce1da0-001a-003b-24aa-36168a000000, QueryParameterName=, QueryParameterValue=
$ systemctl |grep azure
  azurefile-dockervolumedriver.service                                                                                      loaded active running   Azure File Service Docker Volume Driver
$ cat /etc/default/azurefile-dockervolumedriver
# Environment file for azurefile-dockervolumedriver.service
#
AF_OPTS=--debug
# AZURE_STORAGE_BASE=core.windows.net

AZURE_STORAGE_ACCOUNT=[redacted]
AZURE_STORAGE_ACCOUNT_KEY=[redacted]==

the key fetched from (the key1).

$ azure storage account keys list [redacted] --resource-group dcos
info:    Executing command storage account keys list
+ Getting storage account keys
data:    Name  Key                                                                                       Permissions
data:    ----  ----------------------------------------------------------------------------------------  -----------
data:    key1  [redacted]==  Full
data:    key2  [redacted]==  Full
info:    storage account keys list command OK

Where I installed the driver to the DC/OS nodes by:

sudo systemctl stop azurefile-dockervolumedriver && sudo wget -O /usr/bin/azurefile-dockervolumedriver --no-check-certificate https://github.com/Azure/azurefile-dockervolumedriver/releases/download/v0.5.1/azurefile-dockervolumedriver && sudo chmod +x /usr/bin/azurefile-dockervolumedriver && /usr/bin/azurefile-dockervolumedriver --version && sudo wget --no-check-certificate -O /etc/default/azurefile-dockervolumedriver https://raw.githubusercontent.com/Azure/azurefile-dockervolumedriver/master/contrib/init/systemd/azurefile-dockervolumedriver.default && sudo sed -i 's/AZURE_STORAGE_ACCOUNT=.*/AZURE_STORAGE_ACCOUNT=[redacted]/g;s/AZURE_STORAGE_ACCOUNT_KEY=.*/AZURE_STORAGE_ACCOUNT_KEY=[redacted]==/g' /etc/default/azurefile-dockervolumedriver && sudo wget --no-check-certificate -q https://raw.githubusercontent.com/Azure/azurefile-dockervolumedriver/master/contrib/init/systemd/azurefile-dockervolumedriver.service -O /etc/systemd/system/azurefile-dockervolumedriver.service && sudo systemctl daemon-reload && sudo systemctl enable azurefile-dockervolumedriver && sudo systemctl start azurefile-dockervolumedriver && sudo systemctl status azurefile-dockervolumedriver && echo OK

resulted OK.

Do you have any idea, where to fix it?

Thanks,

Tamas

ahmetb commented 8 years ago

I would suspect it's a user error either the credentials are wrong, or you got some spaces maybe after account name or the key while copy/pasting. I suggest typing those values again (perhaps with another storage account) and restarting the service.

TamasSzerb commented 8 years ago

Thanks, @ahmetalpbalkan indeed a whitespace issue.