MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.25k stars 21.41k forks source link

Unable to start container #23167

Closed viktoreinarsson closed 5 years ago

viktoreinarsson commented 5 years ago

When I try to use this as a module in the IoT Edge Simulator the latest image will not start. The error I receive is this:

[backend] [info] [Tid:1] [MetaStore.cc:95] [Initialize] Initialize MetaStore. Status:IO error: While fsync: a directory: Invalid argument ColdPathStorage | [2019-01-23 22:39:06.818] [backend] [error] [Tid:1] [MetaStore.cc:135] [Initialize] DB Open failed with Invalid argument: Column family not found: : Container_cf ColdPathStorage | dotnet: /source/blob-linux/MetaStore/MetaStore.cc:138: int CBlbMetaStore::Initialize(const char*): Assertion `status.ok()' failed.

Relevant parts from deployment.template.json file: "modules": { "ColdPathStorage": { "version": "1.0", "type": "docker", "status": "running", "restartPolicy": "always", "settings": { "image": "mcr.microsoft.com/azure-blob-storage:latest", "createOptions": { "Env": [ "LOCAL_STORAGE_ACCOUNT_NAME=blobaccount","LOCAL_STORAGE_ACCOUNT_KEY=izPvxuP1YWEZBcdqyQX/LQx9NYl8lN4tkI1yqudmOz+oW2cIJcJ4Ybwe5sIffv1SqhoHqklW84o7AAJqQSqUbg==" ], "HostConfig":{ "Binds": ["C:/ContainerData:/blobroot"], "PortBindings":{ "11002/tcp": [{"HostPort":"11002"}] } } } } }


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

AshokPeddakotla-MSFT commented 5 years ago

@viktoreinarsson Thanks for the feedback! We are currently investigating and will update you shortly.

asergaz commented 5 years ago

Hi @viktoreinarsson . Are you following all the Prerequisites? Thanks

qibozhu commented 5 years ago

Hi @viktoreinarsson, the log indicates that you were running on a Linux system. But the "Binds" in the configuration is for Windows system.

The "Binds" should look like this: Linux containers: :/blobroot. For example, /srv/containerdata:/blobroot. Or, my-volume:/blobroot.

LazarusX commented 5 years ago

Hi @viktoreinarsson, does the same deployment.json work with Edge runtime?

viktoreinarsson commented 5 years ago

Hi everyone.

@sergaz-msft : You are correct. I was trying to run this on my Windows 10 Enterprise (non-IoT).

We got this to work by running the IoT Edge Runtime on a Linux system by using the IoT Edge Dev image: https://github.com/Azure/iotedgedev.

It would be nice to be able to run this on a Windows 10 Enterprise host :)

asergaz commented 5 years ago

@viktoreinarsson to be honest I can't see a reason why this shouldn't work on a Windows 10 Enterprise Host with the October Update. There is no difference between the bits of a Windows 10 IoT Enterprise and Windows 10 Enterprise - just differs in the licensing.

Let me take a better look at it. Though as you write above, you didn't test it on a Windows 10 IoT Enterprise did you?

Thanks!

viktoreinarsson commented 5 years ago

@sergaz-msft ok that would be great.

The issue might be the current version of Windows, it´s 1803, which isn´t the October update. image

The reason is IT policy which manages the updates but I think some of my co-workers have the October update. I can get them to try it out.

LazarusX commented 5 years ago

Hi @viktoreinarsson, could you try changing C:/ContainerData to C:\\ContainerData? You can verify if the binding works by docker exec into the container.

viktoreinarsson commented 5 years ago

Hi @LazarusX: I have the same output:

ColdPathStorage | [2019-01-28 11:26:10.832] [backend] [info] [Tid:1] [MetaStore.cc:95] [Initialize] Initialize MetaStore. Status:IO error: While fsync: a directory: Invalid argument ColdPathStorage | [2019-01-28 11:26:10.886] [backend] [error] [Tid:1] [MetaStore.cc:135] [Initialize] DB Open failed with Invalid argument: Column family not found: : Container_cf ColdPathStorage | dotnet: /source/blob-linux/MetaStore/MetaStore.cc:138: int CBlbMetaStore::Initialize(const char*): Assertion `status.ok()' failed. ColdPathStorage exited with code 139

LazarusX commented 5 years ago

Could you run docker exec -it ColdPathStorage /bin/sh and verify if /blobroot contains the files you expect?

kgremban commented 5 years ago

@viktoreinarsson Do you have an update about whether you're still experiencing this issue?

There have been some questions about supported versions in this comment thread that I'll try to clear up. Windows 10 Enterprise (non-IoT SKUs) isn't supported for devices in production. For development and testing, though, most Windows 10 SKUs should work similarly.

It gets a little more complicated when you consider what type of container operating system you're using. It sounds like you're running (or want to run) Windows containers on your Windows machines. That setup does require the October update of Windows 10 (build 17763) because that build included some important components that the IoT Edge team needed. If you have an earlier version of Windows 10, you can develop and test with Linux containers instead. See https://docs.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge-windows for the prerequisites and installation steps for both configurations.

The important thing is consistency around container operating systems throughout your development, test, and deployment. If you're ultimately deploying a module to a Linux device (or a device running Linux containers, at least) then your development machine also needs to run Linux modules in order to successfully build those containers.

howlin0811 commented 5 years ago

I succeeded deploying azure blob storage module on Windows Server 2019 (RS5_17763), I didn't use the latest image, sharing my configuration below

edgeAgent: mcr.microsoft.com/azureiotedge-agent:1.0.6-rc1-windows-amd64 edgeHub: mcr.microsoft.com/azureiotedge-hub:1.0.6-rc1-windows-amd64 azure-blob-storage: mcr.microsoft.com/azure-blob-storage:1.0.1-nanoserver

image

asergaz commented 5 years ago

@kgremban , @howlin0811 can this issue be now closed? Thank you.

kgremban commented 5 years ago

@viktoreinarsson We haven't heard from you in a few weeks on this issue. Are you still experiencing the same errors, or have you been able to resolve them?

asergaz commented 5 years ago

Since we have not heard back from you we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.