Closed TiloWiklund closed 5 years ago
Thanks @TiloWiklund I can reproduce the error. Looking for root cause now...
@TiloWiklund My ability to reproduce this has vanished! The first time, it failed exactly as you show. But now it works successfuly. Did you try it more than once on the same machine? If not, it would be super-helpful if you could try it for a second time on one of the affected machines, and let me know what happens.
OK, I've made progress here. The root cause is that, if the authentication fails, AzCopy isn't handling the failure properly. Specifically, it is falling over with the nil reference issue (aka segfault) instead of displaying a nice error message.
To make sure it doesn't fail: (a) wait at least 5 minutes, after creating the client secret in Portal, before you use it in AzCopy. I think this is a propagation delay in ADD, but I'm just guessing there since the US-based team is asleep right now so I can't ask them. (b) Be careful to avoid typos etc when putting the client secret into the environment variable. If you've waited at least 5 mins, and its still failing, then probably the issue is in the way the environment variable is set.
BTW, I used
export AZCOPY_SPA_CLIENT_SECRET=Zpk-REDACTED-
./azcopy login --service-principal --application-id 144-REDACTED
and I tested on Ubuntu 18.x Azure VMs.
The task now for us on the AzCopy team is to fix the error handling. But, in the meantime, as long as you follow (a) and (b) above, the current release is fine to use.
Perfect! In my case the real problem was forgetting to specify the tenant-id.
Trying to login with service principal in linux using azcopy 10.2.0 results in a segfault. Running
with the service principal secret and application-id the client id results in a segfault with the following trace:
I've tried this both from an Ubuntu 18.04 Azure VM and my local Gentoo laptop, with the same results.