-
Notifications
You must be signed in to change notification settings - Fork 27
CloudBlockBlob.StartCopyAsync fails with NotFound #157
Comments
I was able to reproduce the issue using with |
Small .NET Core project to reproduce the issue: https://github.com/thisisthekap/Azurite157Repro |
Thanks for reporting this @thisisthekap ! I will look into this within the next few days and try to release a fix asap. |
@thisisthekap : fix is released as part of |
@arafato Thank you for your effort, I just tried your fix. Even tough // proceeds without error now
await targetBlob.StartCopyAsync(sourceBlob);
// This call blocks for azurite, the blob storage seems to get entirely unusable after using StartCopyAsync.
var str = await targetBlob.DownloadTextAsync();
Console.WriteLine("Copied: " + str); Edit: It seems that I am unable to reopen the issue. Could you please grant me the appropriate permission, or reopen the issue yourself? |
@thisisthekap : this is strange, I cannot repro with your code. Code finishes (and outputs) as expected. Can you paste in the log output of Azurite? Also, what happens if you do a simple |
@arafato I have got no clue why, but now the issue is gone (the only thing which I have done in the meantime was to upgrade node, but I do not know the version it was before). |
@arafato When using the docker container version
|
@thisisthekap strange again, I cannot repro. Running the code against |
@arafato I am using it with docker compose. This is my compose file: version: "2.1"
services:
local-storage:
image: arafato/azurite:1.9.3
ports:
- 10010:10000
volumes:
- ./Data/:/opt/azurite/folder
environment:
- executable=blob Edit: The container that is running during the test is definitely using |
Ok, just to make sure: can you repro the bug when you start Azurite like so |
When using docker directly, everything works fine. When using docker-compose, I experience the issue described above. My suggestion: docker-compose creates a software defined network (SDN) by default. So I think that the address given to your validation logic is neither |
@thisisthekap ahhh, good point! In this case I will need to soften the validation rule to allow arbitrary prefixes before |
@arafato Yeah, so either you have to support all possible names of the host, or ignore the hostname entirely (which also would be not that good). |
Maybe we could solve it by using an environment variable to specify the whitelisted hostnames. The appropriate environment variables could then be specified in the docker-compose yaml file. |
@thisisthekap I think this might also be related to the port that is being exposed. You are exposing Azurite at 10010. The regex I'm using, however, checks for the port number 10000. At the end it depends how the SDK populates the I assume your code looks like the following (note the port) : Can you confirm? In this case there is no way to know what hostname or IP address, and port was given to this method (and hence check for in a regex / validation). So either the validation ignores the hostname and port, or (as you suggested) takes into account some environment variables. In order to keep it simple I would just ignore the hostname and port. At the end all I care is to get the right blobname after |
@arafato As azurite is not a production system and therefore security is not that big issue, I am fine with just ignoring host and port. |
@thisisthekap just released fix as part of |
@arafato Everything is working just fine now. Thank you once again for your effort! |
CloudBlockBlob.StartCopyAsync fails with NotFound when using azurite, works properly using azure storage account.
The text was updated successfully, but these errors were encountered: