简体   繁体   English

windows azure 开发存储 blob 服务未启动

[英]windows azure development storage blob service not starting

When I start development storage emulator, I get an error当我启动开发存储模拟器时,出现错误

The process cannot access the file because it is being used by another process

I guess this is happening only for BLOB, other services ie Queue and Tables start successfully我猜这只发生在 BLOB 上,其他服务如队列和表成功启动

What could be the problem?可能是什么问题呢? I am using Azure SDK v1.4我正在使用 Azure SDK v1.4

开发存储模拟器启动报错

Stop BitTorrent. 停止BitTorrent。 In my experience, this error is usually a port conflict, and BitTorrent does typically grab port 10000. If it's not BitTorrent, look for other apps that might be holding on to port 10000. Netstat can probably help. 根据我的经验,这个错误通常是端口冲突,而BitTorrent通常会抓取端口10000.如果它不是BitTorrent,请查找可能保留到端口10000的其他应用程序.Netstat可能会有所帮助。

This might be another process using the port that Azure dev storage is using. 这可能是使用Azure dev存储使用的端口的另一个进程。

To figure out which app is that, run netstat first: 要找出哪个应用程序,首先运行netstat

netstat -p tcp -ano | findstr :10000

You will get a process id (PID) in the last column: 您将在最后一列中获得进程ID(PID):

  TCP    0.0.0.0:10000          0.0.0.0:0              LISTENING       2204

It means that process listening to this port is ID 2204. Then run taklist : 这意味着侦听此端口的进程是ID taklist然后运行taklist

tasklist /fi "pid eq 2204"

So you will see something like this: 所以你会看到这样的东西:

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
SMSvcHost.exe                 2204 Services                   0     29 300 K

So now you know that SMSvcHost.exe is listening on that port. 所以现在你知道SMSvcHost.exe正在侦听该端口。

If you can't stop the process using the port, there's a way to remap the ports used by DevFabric. 如果您无法使用端口停止进程,则可以重新映射DevFabric使用的端口。 The solution is taken from this blog post : 该解决方案来自此博客文章

You could do that by navigating to C:\\Program Files\\Windows Azure SDK\\v1.4\\bin\\devstore (replace 1.4 with your SDK version) and opening DSService.exe.config . 您可以通过导航到C:\\ Program Files \\ Windows Azure SDK \\ v1.4 \\ bin \\ devstore(用SDK版本替换1.4)并打开DSService.exe.config来实现 From there you could change the configuration and make your services listen to other ports. 从那里,您可以更改配置并使您的服务侦听其他端口。

For me in v1.6 the path was C:\\Program Files\\Windows Azure Emulator\\emulator\\devstore\\DSService.exe.config 对于我在v1.6中的路径是C:\\Program Files\\Windows Azure Emulator\\emulator\\devstore\\DSService.exe.config

For SDK v2.5 / Storage v3.4 the path is %ProgramFiles(x86)%\\Microsoft SDKs\\Azure\\Storage Emulator\\WAStorageEmulator.exe.config 对于SDK v2.5 / Storage v3.4 ,路径为%ProgramFiles(x86)%\\Microsoft SDKs\\Azure\\Storage Emulator\\WAStorageEmulator.exe.config

For Emulator v4+ the path is %ProgramFiles(x86)%\\Microsoft SDKs\\Azure\\Storage Emulator\\AzureStorageEmulator.exe.config 对于Emulator v4 + ,路径为%ProgramFiles(x86)%\\Microsoft SDKs\\Azure\\Storage Emulator\\AzureStorageEmulator.exe.config

But be careful, because you will not be able to use UseDevelopmentStorage=true in your connection string anymore (eg connect with Azure Storage Explorer). 但要小心,因为您将无法再在连接字符串中使用UseDevelopmentStorage=true (例如,使用Azure Storage Explorer连接)。

In order to connect, use a custom connection string that is targeting the new endpoint ports you defined. 要进行连接,请使用定位您定义的新端点端口的自定义连接字符串。 You'll still want to connect using the standard, well-known storage emulator account name and key . 您仍然希望使用标准的,众所周知的存储模拟器帐户名和密钥进行连接 An example connection string can be found here . 可以在此处找到示例连接字符串。

I had the same issue, but in my case, the problem was somewhere else. 我有同样的问题,但就我而言,问题出在其他地方。 There was the process System (PID 4) listening on the port 10,000 , so it's obvious I wasn't able to kill such process. 进程系统 (PID 4)监听端口10,000 ,所以很明显我无法杀死这样的进程。 The only workaround was to reboot Windows (Windows 7 64-bit), but that's too extreme and time consuming. 唯一的解决方法是重启Windows(Windows 7 64位),但这太极端且耗时。

The most challenging part was to identify, why is the System process listening on that port. 最具挑战性的部分是识别,为什么系统进程会侦听该端口。 Google didn't help at all in this case. 在这种情况下,谷歌根本没有帮助。

So I simply tried to connect to the port 10,000 on localhost using Netcat (better Telnet) and send there something: 所以我只是尝试使用Netcat (更好的Telnet)连接到localhost上的端口10,000并发送一些内容:

$ nc 127.0.0.1 10000

I quickly noticed from the response, that there is an HTTP server listening on the port 10,000. 我很快从响应中注意到,有一个HTTP服务器监听端口10,000。 The most important information in the response was this header: 响应中最重要的信息是此标题:

Server: Microsoft-HTTPAPI/2.0

Then it was really fast to free this port for Azure Emulator. 然后,为Azure模拟器释放此端口真的很快。 Brief googling revealed the details about what is this thing actually doing: HTTP Server API , and most importantly who is it doing: Windows HTTP Services . 简要揭示了谷歌搜索什么是这个东西实际上做的细节: HTTP服务器API ,最重要的是在做: Windows HTTP服务

Then I went to Services Management Console , found the service called Service WinHTTP WPAD which was running and simply stopped it . 然后我去了服务管理控制台 ,找到了名为Service WinHTTP WPAD的服务,该服务正在运行并且只是停止了它 And voila, the port 10,000 is free as a bird now. 瞧,10,000港口现在可以像鸟一样自由了。


Does anyone know how does it work? 有谁知道它是如何工作的? I guess that some 3rd application creates a listening HTTP server on the port 10,000 using the WinHTTP WPAD service. 我想第三个应用程序使用WinHTTP WPAD服务在端口10,000上创建一个侦听HTTP服务器。 I doubt that it's anything from Microsoft since they wouldn't configure the Azure Emulator to use the port already used by them. 我怀疑这是微软的任何东西,因为他们不会将Azure仿真器配置为使用它们已经使用的端口。

In my case, there was no bit Torrent on my system. 就我而言,我的系统上没有Torrent。 However, the port 1000 was being used by some java.exe. 但是,某些java.exe正在使用端口1000。 I figured out that running HDInsight locally doesn't work with Azure blob storage. 我发现在本地运行HDInsight不适用于Azure blob存储。 So I went to Azure Storage Emulater UI and unchecked the blob. 所以我去了Azure Storage Emulater UI并取消选中了blob。 After that this issue got resolved. 之后,这个问题得到了解决。

this error really bothered me and finally I have figured out how to fix it.这个错误真的困扰了我,最后我想出了如何解决它。

Yes, the error is caused by port conflict, the port 10000 is used by another process, in my case, it is a process called "azurite"... not sure what it, but sounds like something relate to azure:)是的,错误是由端口冲突引起的,端口 10000 被另一个进程使用,在我的例子中,它是一个名为“azurite”的进程......不确定它是什么,但听起来像是与 azure 相关的东西:)

Anyways, this command to identify the PID of the process that uses 10000无论如何,此命令用于识别使用 10000 的进程的 PID

netstat -p tcp -ano | findstr :10000

The last number '132864' is the pid最后一个数字“132864”是 pid

在此处输入图像描述

run跑步

tasklist /fi "pid eq 132864"

to see the name of the process.查看进程的名称。

Finally kill it by最后杀死它

taskkill /pid 132864 /f

and then I can successfully run the emulator然后我可以成功运行模拟器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我们可以直接将Windows Azure移动服务与BLOB存储连接吗? - Can we directly connect Windows Azure mobile service with the BLOB storage? VB中的Windows Azure存储:不在托管服务或开发结构中运行 - Windows Azure Storage in VB: Not running in a hosted service or the Development Fabric 是否可以将Entity Framework与Windows Azure开发存储服务一起使用? - Is it possible to use Entity Framework with Windows Azure development storage service? TeamCity和Windows Azure Blob存储 - TeamCity and Windows Azure Blob Storage Azure Blob存储-将生产复制到开发中 - Azure Blob Storage - Copy production to development 无法使用Azure Storage Explorer在本地开发中找到Blob存储 - Unable to locate Blob Storage in local Development using Azure Storage Explorer 在上载到Blob存储上启动Azure容器服务 - Launch Azure Container Service on Upload to Blob Storage 在 ADF 中参数化 Azure Blob 存储链接服务 - Parameterize Azure Blob Storage Linked Service in ADF 使用服务主体访问 Azure blob 存储 - Using service principal to access Azure blob storage 将Microsoft无状态服务绑定到Azure存储Blob? - Bind Microsoft Stateless Service to Azure Storage Blob?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM